Explorar o código

redirect to login page instead

Son NK %!s(int64=5) %!d(string=hai) anos
pai
achega
837ab8258e
Modificáronse 1 ficheiros con 2 adicións e 2 borrados
  1. 2 2
      app/auth/views/mfa.py

+ 2 - 2
app/auth/views/mfa.py

@@ -22,13 +22,13 @@ def mfa():
     # user access this page directly without passing by login page
     if not user_id:
         flash("Unknown error, redirect back to main page", "warning")
-        return redirect(url_for("dashboard.index"))
+        return redirect(url_for("auth.login"))
 
     user = User.get(user_id)
 
     if not (user and user.enable_otp):
         flash("Only user with MFA enabled should go to this page", "warning")
-        return redirect(url_for("dashboard.index"))
+        return redirect(url_for("auth.login"))
 
     otp_token_form = OtpTokenForm()
     next_url = request.args.get("next")