Merge pull request #2507 from sbwalker/dev

fix #2502 - invalid logic checking querystring parameter
This commit is contained in:
Shaun Walker 2022-11-23 11:26:21 -05:00 committed by GitHub
commit e8b1aca45c
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -97,7 +97,7 @@
// reload the client application from the server if there is a forced reload or the user navigated to a site with a different alias // reload the client application from the server if there is a forced reload or the user navigated to a site with a different alias
if (querystring.ContainsKey("reload") || (!NavigationManager.ToBaseRelativePath(_absoluteUri).ToLower().StartsWith(SiteState.Alias.Path.ToLower()) && !string.IsNullOrEmpty(SiteState.Alias.Path))) if (querystring.ContainsKey("reload") || (!NavigationManager.ToBaseRelativePath(_absoluteUri).ToLower().StartsWith(SiteState.Alias.Path.ToLower()) && !string.IsNullOrEmpty(SiteState.Alias.Path)))
{ {
if (querystring["reload"] == "post") if (querystring.ContainsKey("reload") && querystring["reload"] == "post")
{ {
// post back so that the cookies are set correctly - required on any change to the principal // post back so that the cookies are set correctly - required on any change to the principal
var interop = new Interop(JSRuntime); var interop = new Interop(JSRuntime);