mirror of
https://github.com/GSA/notifications-admin.git
synced 2026-09-05 14:38:24 -04:00
The verify view was not passing along the next param to the two factor
view. Now if it is passed and it is a url on the same domain that request originates from then it is used.
This commit is contained in:
@@ -4,7 +4,8 @@ from flask import (
|
||||
url_for,
|
||||
session,
|
||||
abort,
|
||||
flash
|
||||
flash,
|
||||
request
|
||||
)
|
||||
|
||||
from flask.ext.login import (current_user, login_fresh, confirm_login)
|
||||
@@ -41,7 +42,10 @@ def sign_in():
|
||||
return redirect(url_for('.verify'))
|
||||
elif user.is_active():
|
||||
users_dao.send_verify_code(user.id, 'sms', user.mobile_number)
|
||||
return redirect(url_for('.two_factor'))
|
||||
if request.args.get('next'):
|
||||
return redirect(url_for('.two_factor', next=request.args.get('next')))
|
||||
else:
|
||||
return redirect(url_for('.two_factor'))
|
||||
# Vague error message for login in case of user not known, locked, inactive or password not verified
|
||||
flash('Username or password is incorrect')
|
||||
|
||||
|
||||
Reference in New Issue
Block a user