mirror of
https://github.com/Sonarr/Sonarr
synced 2026-05-08 21:21:47 +02:00
Fixed: Limit redirects after login to local paths
This commit is contained in:
parent
da7d17f5e8
commit
14005d8d10
1 changed files with 1 additions and 1 deletions
|
|
@ -47,7 +47,7 @@ public async Task<IActionResult> Login([FromForm] LoginResource resource, [FromQ
|
|||
|
||||
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 + "/");
|
||||
}
|
||||
|
|
|
|||
Loading…
Reference in a new issue