Fixed: Limit redirects after login to local paths

pull/7130/head v4.0.8.2223
Mark McDowall 6 months ago committed by Mark McDowall
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);
if (returnUrl.IsNullOrWhiteSpace())
if (returnUrl.IsNullOrWhiteSpace() || !Url.IsLocalUrl(returnUrl))
{
return Redirect(_configFileProvider.UrlBase + "/");
}

Loading…
Cancel
Save