Merge pull request #986 from chlupac/returnurl

Fix - return to url during login fail when returnurl contains "/"
This commit is contained in:
Shaun Walker 2020-12-07 17:06:04 -05:00 committed by GitHub
commit d953587e4b
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 3 additions and 3 deletions

View File

@ -22,7 +22,7 @@ namespace Oqtane.Themes.Controls
{ {
returnurl += "/" + PageState.Page.Path; returnurl += "/" + PageState.Page.Path;
} }
NavigationManager.NavigateTo(NavigateUrl("login", "returnurl=" + returnurl)); NavigationManager.NavigateTo(NavigateUrl("login", "?returnurl=" + returnurl));
} }
protected async Task LogoutUser() protected async Task LogoutUser()

View File

@ -300,7 +300,7 @@
if (user == null) if (user == null)
{ {
// redirect to login page // redirect to login page
NavigationManager.NavigateTo(Utilities.NavigateUrl(alias.Path, "login", "returnurl=" + path)); NavigationManager.NavigateTo(Utilities.NavigateUrl(alias.Path, "login", "?returnurl=" + path));
} }
else else
{ {
@ -565,4 +565,4 @@
=> RuntimeInformation.IsOSPlatform(OSPlatform.Create("BROWSER")) => RuntimeInformation.IsOSPlatform(OSPlatform.Create("BROWSER"))
? Oqtane.Shared.Runtime.WebAssembly ? Oqtane.Shared.Runtime.WebAssembly
: Oqtane.Shared.Runtime.Server; : Oqtane.Shared.Runtime.Server;
} }