mirror of
https://github.com/jellyfin/jellyfin.git
synced 2024-09-06 11:34:57 +02:00
fixes #1075 - XSS in "Active Devices" Panel of Admin Dashboard
This commit is contained in:
parent
da5fc95612
commit
9c3119808b
1 changed files with 12 additions and 1 deletions
|
@ -175,11 +175,22 @@ namespace MediaBrowser.Server.Implementations.HttpServer.Security
|
|||
|
||||
if (param.Length == 2)
|
||||
{
|
||||
result.Add(param[0], param[1].Trim(new[] { '"' }));
|
||||
var value = NormalizeValue (param[1].Trim(new[] { '"' }));
|
||||
result.Add(param[0], value);
|
||||
}
|
||||
}
|
||||
|
||||
return result;
|
||||
}
|
||||
|
||||
private string NormalizeValue(string value)
|
||||
{
|
||||
if (string.IsNullOrWhiteSpace (value))
|
||||
{
|
||||
return value;
|
||||
}
|
||||
|
||||
return System.Net.WebUtility.HtmlEncode(value);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue