fix #2578 - error notification sent via email includes direct link to specific log item, however redirect was causing an infinite loop. This resolves the problem and also preserves url querystring parameters during login/logout.

This commit is contained in:
Shaun Walker
2023-02-06 16:44:25 -05:00
parent 1f2ad4e884
commit 56e4dcc11e
6 changed files with 33 additions and 16 deletions

View File

@ -250,7 +250,7 @@
if (user == null)
{
// redirect to login page if user not logged in as they may need to be authenticated
NavigationManager.NavigateTo(Utilities.NavigateUrl(SiteState.Alias.Path, "login", "?returnurl=" + route.AbsolutePath));
NavigationManager.NavigateTo(Utilities.NavigateUrl(SiteState.Alias.Path, "login", "?returnurl=" + WebUtility.UrlEncode(route.PathAndQuery)));
}
else
{