浏览代码

Url decode for auth value

Tommaso Stocchi 4 年之前
父节点
当前提交
6e2cfc6569
共有 1 个文件被更改,包括 7 次插入1 次删除
  1. 7 1
      Emby.Server.Implementations/HttpServer/Security/AuthorizationContext.cs

+ 7 - 1
Emby.Server.Implementations/HttpServer/Security/AuthorizationContext.cs

@@ -273,10 +273,16 @@ namespace Emby.Server.Implementations.HttpServer.Security
             {
             {
                 var param = item.Trim().Split('=', 2);
                 var param = item.Trim().Split('=', 2);
 
 
-                result[param[0]] = param[1].Trim('"');
+                var value =param[1].Trim('"');
+                result[param[0]] = value;
             }
             }
 
 
             return result;
             return result;
         }
         }
+
+        private static string NormalizeValue(string value)
+        {
+            return string.IsNullOrEmpty(value) ? value : WebUtility.UrlDecode(value);
+        }
     }
     }
 }
 }