Skip to content

Commit

Permalink
fix totp infinite loop on back to /login
Browse files Browse the repository at this point in the history
  • Loading branch information
syrk4web committed May 22, 2024
1 parent e99937f commit caaa62b
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion src/ui/main.py
Original file line number Diff line number Diff line change
Expand Up @@ -470,7 +470,9 @@ def before_request():
and not request.path.startswith(("/css", "/images", "/js", "/json", "/webfonts"))
and request.path.endswith("/login")
):
return redirect(url_for("login", next=request.path))
logout_user()
session.clear()
return redirect(url_for("login"))

# Case not login page, keep on 2FA before any other access
if (
Expand Down

0 comments on commit caaa62b

Please sign in to comment.