1
0
mirror of https://github.com/Sonarr/Sonarr.git synced 2025-01-25 11:13:39 +02:00

Fixed: Limit redirects after login to local paths

This commit is contained in:
Mark McDowall 2024-08-20 14:46:36 -07:00 committed by Mark McDowall
parent da7d17f5e8
commit 14005d8d10

View File

@ -47,7 +47,7 @@ namespace Sonarr.Http.Authentication
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 + "/");
}