mirror of
https://github.com/LBPUnion/ProjectLighthouse.git
synced 2025-05-18 07:32:27 +00:00
Fix bug in user redirection middleware
This commit is contained in:
parent
602f0c63d5
commit
b7c4f17298
1 changed files with 9 additions and 3 deletions
|
@ -25,10 +25,16 @@ public class UserRequiredRedirectMiddleware : MiddlewareDBContext
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (user.PasswordResetRequired && !ctx.Request.Path.StartsWithSegments("/passwordResetRequired") &&
|
if (user.PasswordResetRequired)
|
||||||
!ctx.Request.Path.StartsWithSegments("/passwordReset"))
|
|
||||||
{
|
{
|
||||||
ctx.Response.Redirect("/passwordResetRequired");
|
if (!ctx.Request.Path.StartsWithSegments("/passwordResetRequired") &&
|
||||||
|
!ctx.Request.Path.StartsWithSegments("/passwordReset"))
|
||||||
|
{
|
||||||
|
ctx.Response.Redirect("/passwordResetRequired");
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
|
await this.next(ctx);
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue