diff options
| author | Claus Vium <cvium@users.noreply.github.com> | 2021-03-28 00:15:57 +0100 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2021-03-28 00:15:57 +0100 |
| commit | 25c6388e234b02fe224c6367ff77991e6b24fa2c (patch) | |
| tree | b06639d6f34dbee6f593c3f7afd8715bcfb6efb1 /Jellyfin.Api/Controllers/HlsSegmentController.cs | |
| parent | 3dda25412c2090b6060e1467ce61681d950ee70f (diff) | |
| parent | 8f16e10fc6b138c817d3c21f6cd9a760d30e6d13 (diff) | |
Merge pull request #5600 from cvium/fix-hls-defaults-10.7
Fix hls defaults for 10.7
Diffstat (limited to 'Jellyfin.Api/Controllers/HlsSegmentController.cs')
| -rw-r--r-- | Jellyfin.Api/Controllers/HlsSegmentController.cs | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/Jellyfin.Api/Controllers/HlsSegmentController.cs b/Jellyfin.Api/Controllers/HlsSegmentController.cs index af272a617..4f28cb448 100644 --- a/Jellyfin.Api/Controllers/HlsSegmentController.cs +++ b/Jellyfin.Api/Controllers/HlsSegmentController.cs @@ -66,7 +66,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.Ordinal)) { return BadRequest("Invalid segment."); } @@ -92,7 +92,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.Ordinal) || Path.GetExtension(file) != ".m3u8") { return BadRequest("Invalid segment."); } @@ -146,7 +146,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.Ordinal)) { return BadRequest("Invalid segment."); } |
