The Free Software Media System - Server Backend & API
Added comments
Tommaso Stocchi7c7f2316faa3
diff --git a/Emby.Server.Implementations/HttpServer/Security/AuthorizationContext.cs b/Emby.Server.Implementations/HttpServer/Security/AuthorizationContext.csindex 74a678aa62..855c616826 100644--- a/Emby.Server.Implementations/HttpServer/Security/AuthorizationContext.cs+++ b/Emby.Server.Implementations/HttpServer/Security/AuthorizationContext.cs@@ -285,6 +285,11 @@ namespace Emby.Server.Implementations.HttpServer.Securityreturn string.IsNullOrEmpty(value) ? value : WebUtility.UrlDecode(value);}+ /// <summary>+ /// Get the authorization header components.+ /// </summary>+ /// <param name="authtorizationHeader">The authorization header.</param>+ /// <returns>string</returns>public static string[] GetParts(string authtorizationHeader){var result = new List<string>();@@ -301,6 +306,7 @@ namespace Emby.Server.Implementations.HttpServer.Security}else{+ // Applying a XOR logic to evaluate wether it is opening or closing a valueescaped = (!escaped) == (authtorizationHeaderChars[i] == '"');if(authtorizationHeaderChars[i] == ','){@@ -310,6 +316,7 @@ namespace Emby.Server.Implementations.HttpServer.Security}else{+ // Meeting a comma after a closing escape char means the value is completeresult.Add(new string(value.ToArray()));value = new List<char>();}