diff --git a/modules/account/src/Volo.Abp.Account.Web/Pages/Account/Manage.cshtml.cs b/modules/account/src/Volo.Abp.Account.Web/Pages/Account/Manage.cshtml.cs index 746992822c..d669ec41a1 100644 --- a/modules/account/src/Volo.Abp.Account.Web/Pages/Account/Manage.cshtml.cs +++ b/modules/account/src/Volo.Abp.Account.Web/Pages/Account/Manage.cshtml.cs @@ -34,11 +34,14 @@ public class ManageModel : AccountPageModel await contributor.ConfigureAsync(ProfileManagementPageCreationContext); } - if (!Url.IsLocalUrl(ReturnUrl) && - !ReturnUrl.StartsWith(UriHelper.BuildAbsolute(Request.Scheme, Request.Host, Request.PathBase).RemovePostFix("/")) && - !AppUrlProvider.IsRedirectAllowedUrl(ReturnUrl)) + if (ReturnUrl != null) { - ReturnUrl = null; + if (!Url.IsLocalUrl(ReturnUrl) && + !ReturnUrl.StartsWith(UriHelper.BuildAbsolute(Request.Scheme, Request.Host, Request.PathBase).RemovePostFix("/")) && + !AppUrlProvider.IsRedirectAllowedUrl(ReturnUrl)) + { + ReturnUrl = null; + } } return Page();