Browse Source

Use safe redirect after registration

Replaces direct Redirect with RedirectSafelyAsync after user registration to enhance security when handling return URLs.
pull/24059/head
enisn 3 months ago
parent
commit
a01adc5846
No known key found for this signature in database GPG Key ID: A052619F04155D1C
  1. 2
      modules/account/src/Volo.Abp.Account.Web/Pages/Account/Register.cshtml.cs

2
modules/account/src/Volo.Abp.Account.Web/Pages/Account/Register.cshtml.cs

@ -137,7 +137,7 @@ public class RegisterModel : AccountPageModel
await RegisterLocalUserAsync();
}
return Redirect(ReturnUrl ?? "~/"); //TODO: How to ensure safety? IdentityServer requires it however it should be checked somehow!
return await RedirectSafelyAsync(ReturnUrl ?? "~/");
}
catch (BusinessException e)
{

Loading…
Cancel
Save