We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 2ff6404 commit 0b6726dCopy full SHA for 0b6726d
1 file changed
src/Web/Grand.Web/Controllers/CommonController.cs
@@ -266,10 +266,11 @@ public virtual async Task<IActionResult> SetStore(
266
}
267
268
//prevent open redirection attack
269
- if (!Url.IsLocalUrl(returnUrl))
270
- returnUrl = Url.RouteUrl("HomePage");
+ var redirectUrl = Url.RouteUrl("HomePage");
+ if (Url.IsLocalUrl(returnUrl))
271
+ redirectUrl = returnUrl;
272
- return Redirect(returnUrl);
273
+ return Redirect(redirectUrl);
274
275
void SetStoreCookie(Domain.Stores.Store store)
276
{
0 commit comments