From dc261b815f4ce5fbace33e787902636c43618881 Mon Sep 17 00:00:00 2001 From: Tommaso Stocchi Date: Thu, 3 Jun 2021 17:12:16 +0200 Subject: [PATCH] -fix AuthorizationHeader parameter name --- .../HttpServer/Security/AuthorizationContext.cs | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/Emby.Server.Implementations/HttpServer/Security/AuthorizationContext.cs b/Emby.Server.Implementations/HttpServer/Security/AuthorizationContext.cs index c9b94cfde..ab43e088b 100644 --- a/Emby.Server.Implementations/HttpServer/Security/AuthorizationContext.cs +++ b/Emby.Server.Implementations/HttpServer/Security/AuthorizationContext.cs @@ -273,7 +273,7 @@ namespace Emby.Server.Implementations.HttpServer.Security /// /// The authorization header. /// string - public static Dictionary GetParts(string authtorizationHeader) + public static Dictionary GetParts(string authorizationHeader) { var result = new Dictionary(); var escaped = false; @@ -281,9 +281,9 @@ namespace Emby.Server.Implementations.HttpServer.Security string key = string.Empty; int i; - for (i = 0; i < authtorizationHeader.Length; i++) + for (i = 0; i < authorizationHeader.Length; i++) { - var token = authtorizationHeader[i]; + var token = authorizationHeader[i]; if (token == '"' || token == ',') { // Applying a XOR logic to evaluate whether it is opening or closing a value @@ -293,7 +293,7 @@ namespace Emby.Server.Implementations.HttpServer.Security // Meeting a comma after a closing escape char means the value is complete if (start < i) { - result[key] = WebUtility.UrlDecode(authtorizationHeader[start..i].Trim('"')); + result[key] = WebUtility.UrlDecode(authorizationHeader[start..i].Trim('"')); key = string.Empty; } @@ -302,7 +302,7 @@ namespace Emby.Server.Implementations.HttpServer.Security } else if (!escaped && token == '=') { - key = authtorizationHeader[start.. i]; + key = authorizationHeader[start.. i]; start = i + 1; } } @@ -310,7 +310,7 @@ namespace Emby.Server.Implementations.HttpServer.Security // Add last value if (start < i) { - result[key] = WebUtility.UrlDecode(authtorizationHeader[start..i].Trim('"')); + result[key] = WebUtility.UrlDecode(authorizationHeader[start..i].Trim('"')); } return result;