Skip to content

Commit a01adc5

Browse files
committed
Use safe redirect after registration
Replaces direct Redirect with RedirectSafelyAsync after user registration to enhance security when handling return URLs.
1 parent 7487878 commit a01adc5

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

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

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -137,7 +137,7 @@ public virtual async Task<IActionResult> OnPostAsync()
137137
await RegisterLocalUserAsync();
138138
}
139139

140-
return Redirect(ReturnUrl ?? "~/"); //TODO: How to ensure safety? IdentityServer requires it however it should be checked somehow!
140+
return await RedirectSafelyAsync(ReturnUrl ?? "~/");
141141
}
142142
catch (BusinessException e)
143143
{

0 commit comments

Comments
 (0)