diff options
| author | Orry Verducci <orry@orryverducci.co.uk> | 2021-12-01 22:13:52 +0000 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2021-12-01 22:13:52 +0000 |
| commit | e446e9fde935ad5744500e6efaab8fcacf89b600 (patch) | |
| tree | 9012e91423660bf4bc9992f06cf26f53e826fb65 /Jellyfin.Api/Controllers/HlsSegmentController.cs | |
| parent | 9abe9e7e54cc454667ba2128b5d321631b5ece51 (diff) | |
| parent | f6d8c19a7ac41c6c7c217d9e9ccbf98f78122327 (diff) | |
Merge branch 'master' into mbaff-interlace-detection
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 71caa0fe0..7325dca0a 100644 --- a/Jellyfin.Api/Controllers/HlsSegmentController.cs +++ b/Jellyfin.Api/Controllers/HlsSegmentController.cs @@ -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."); } |
