diff --git a/src/Lidarr.Http/Authentication/AuthenticationController.cs b/src/Lidarr.Http/Authentication/AuthenticationController.cs index 447ea4c22..2fc588dd2 100644 --- a/src/Lidarr.Http/Authentication/AuthenticationController.cs +++ b/src/Lidarr.Http/Authentication/AuthenticationController.cs @@ -47,7 +47,7 @@ namespace Lidarr.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 + "/"); }