Updated msg for the failed login.

This commit is contained in:
Nicholas Staples
2016-04-26 12:14:06 +01:00
parent 3122500ce0
commit 9225c0813c
2 changed files with 9 additions and 4 deletions

View File

@@ -5,7 +5,8 @@ from flask import (
session,
flash,
request,
abort
abort,
Markup
)
from flask.ext.login import (
@@ -69,7 +70,11 @@ def sign_in():
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')
flash(Markup((
"The username or password you entered is incorrect.<br/>"
" If you need to, you can <a href={password_reset}>reset "
"your password</a>").format(password_reset=url_for('.forgot_password'))
))
return render_template('views/signin.html', form=form)