Browse Source

Check `ReturnUrl` not null.

pull/12656/head
maliming 4 years ago
parent
commit
f01f534293
No known key found for this signature in database GPG Key ID: 96224957E51C89E
  1. 11
      modules/account/src/Volo.Abp.Account.Web/Pages/Account/Manage.cshtml.cs

11
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();

Loading…
Cancel
Save