mirror of
https://github.com/Sonarr/Sonarr.git
synced 2025-01-27 11:21:43 +02:00
Fixed: Limit redirects after login to local paths
This commit is contained in:
parent
da7d17f5e8
commit
14005d8d10
@ -47,7 +47,7 @@ namespace Sonarr.Http.Authentication
|
|||||||
|
|
||||||
await HttpContext.SignInAsync(AuthenticationType.Forms.ToString(), new ClaimsPrincipal(new ClaimsIdentity(claims, "Cookies", "user", "identifier")), authProperties);
|
await HttpContext.SignInAsync(AuthenticationType.Forms.ToString(), new ClaimsPrincipal(new ClaimsIdentity(claims, "Cookies", "user", "identifier")), authProperties);
|
||||||
|
|
||||||
if (returnUrl.IsNullOrWhiteSpace())
|
if (returnUrl.IsNullOrWhiteSpace() || !Url.IsLocalUrl(returnUrl))
|
||||||
{
|
{
|
||||||
return Redirect(_configFileProvider.UrlBase + "/");
|
return Redirect(_configFileProvider.UrlBase + "/");
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user