mirror of
https://github.com/jellyfin/jellyfin.git
synced 2025-12-18 23:13:06 +03:00
Fix index out of range and add reg tests
This commit is contained in:
@@ -55,7 +55,7 @@ namespace Jellyfin.Server.Middleware
|
||||
// Unencode and re-parse querystring.
|
||||
var unencodedKey = HttpUtility.UrlDecode(key);
|
||||
|
||||
if (string.Equals(unencodedKey, key, System.StringComparison.Ordinal))
|
||||
if (string.Equals(unencodedKey, key, StringComparison.Ordinal))
|
||||
{
|
||||
// Don't do anything if it's not encoded.
|
||||
_store = value;
|
||||
@@ -72,7 +72,7 @@ namespace Jellyfin.Server.Middleware
|
||||
if (i == -1)
|
||||
{
|
||||
// encoded is an equals.
|
||||
pairs.Add(pair[..i].ToString(), StringValues.Empty);
|
||||
pairs.Add(pair.ToString(), StringValues.Empty);
|
||||
continue;
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user