diff options
| author | Orry Verducci <orry@orryverducci.co.uk> | 2020-08-10 22:17:13 +0100 |
|---|---|---|
| committer | Orry Verducci <orry@orryverducci.co.uk> | 2020-08-10 22:17:13 +0100 |
| commit | 2d6699fd470ba1f0fcabac9df4d5184205e0e351 (patch) | |
| tree | aa0f078df01baa798435ae25f3d5ee4945f7f501 /Emby.Server.Implementations/HttpServer/Security/AuthorizationContext.cs | |
| parent | ce51775e7426ff4e037d593715395684ebf9b08a (diff) | |
| parent | b82a3fee85298a1063069cae5ff4df3029e468b0 (diff) | |
Merge remote-tracking branch 'upstream/master' into deinterlace-improvements
Diffstat (limited to 'Emby.Server.Implementations/HttpServer/Security/AuthorizationContext.cs')
| -rw-r--r-- | Emby.Server.Implementations/HttpServer/Security/AuthorizationContext.cs | 13 |
1 files changed, 7 insertions, 6 deletions
diff --git a/Emby.Server.Implementations/HttpServer/Security/AuthorizationContext.cs b/Emby.Server.Implementations/HttpServer/Security/AuthorizationContext.cs index 078ce0d8a..fb93fae3e 100644 --- a/Emby.Server.Implementations/HttpServer/Security/AuthorizationContext.cs +++ b/Emby.Server.Implementations/HttpServer/Security/AuthorizationContext.cs @@ -99,6 +99,12 @@ namespace Emby.Server.Implementations.HttpServer.Security if (string.IsNullOrEmpty(token)) { + token = queryString["ApiKey"]; + } + + // TODO deprecate this query parameter. + if (string.IsNullOrEmpty(token)) + { token = queryString["api_key"]; } @@ -276,12 +282,7 @@ namespace Emby.Server.Implementations.HttpServer.Security private static string NormalizeValue(string value) { - if (string.IsNullOrEmpty(value)) - { - return value; - } - - return WebUtility.HtmlEncode(value); + return string.IsNullOrEmpty(value) ? value : WebUtility.HtmlEncode(value); } } } |
