|
|
|
@ -64,7 +64,7 @@ namespace Jellyfin.Api.Controllers
|
|
|
|
|
var transcodePath = _serverConfigurationManager.GetTranscodePath();
|
|
|
|
|
file = Path.GetFullPath(Path.Combine(transcodePath, file));
|
|
|
|
|
var fileDir = Path.GetDirectoryName(file);
|
|
|
|
|
if (string.IsNullOrEmpty(fileDir) || !fileDir.StartsWith(transcodePath))
|
|
|
|
|
if (string.IsNullOrEmpty(fileDir) || !fileDir.StartsWith(transcodePath, StringComparison.InvariantCulture))
|
|
|
|
|
{
|
|
|
|
|
return BadRequest("Invalid segment.");
|
|
|
|
|
}
|
|
|
|
@ -90,7 +90,7 @@ namespace Jellyfin.Api.Controllers
|
|
|
|
|
var transcodePath = _serverConfigurationManager.GetTranscodePath();
|
|
|
|
|
file = Path.GetFullPath(Path.Combine(transcodePath, file));
|
|
|
|
|
var fileDir = Path.GetDirectoryName(file);
|
|
|
|
|
if (string.IsNullOrEmpty(fileDir) || !fileDir.StartsWith(transcodePath) || Path.GetExtension(file) != ".m3u8")
|
|
|
|
|
if (string.IsNullOrEmpty(fileDir) || !fileDir.StartsWith(transcodePath, StringComparison.InvariantCulture) || Path.GetExtension(file) != ".m3u8")
|
|
|
|
|
{
|
|
|
|
|
return BadRequest("Invalid segment.");
|
|
|
|
|
}
|
|
|
|
@ -144,7 +144,7 @@ namespace Jellyfin.Api.Controllers
|
|
|
|
|
|
|
|
|
|
file = Path.GetFullPath(Path.Combine(transcodeFolderPath, file));
|
|
|
|
|
var fileDir = Path.GetDirectoryName(file);
|
|
|
|
|
if (string.IsNullOrEmpty(fileDir) || !fileDir.StartsWith(transcodeFolderPath))
|
|
|
|
|
if (string.IsNullOrEmpty(fileDir) || !fileDir.StartsWith(transcodeFolderPath, StringComparison.InvariantCulture))
|
|
|
|
|
{
|
|
|
|
|
return BadRequest("Invalid segment.");
|
|
|
|
|
}
|
|
|
|
|