mirror of
https://github.com/wassname/flask-security.git
synced 2026-09-09 11:22:35 +08:00
Merge pull request #193 from nickretallack/develop
Fix attempts to log in without a password, or without confirming your email
This commit is contained in:
@@ -228,6 +228,9 @@ class LoginForm(Form, NextFormMixin):
|
||||
if self.user is None:
|
||||
self.email.errors.append(get_message('USER_DOES_NOT_EXIST')[0])
|
||||
return False
|
||||
if not self.user.password:
|
||||
self.password.errors.append(get_message('PASSWORD_NOT_SET')[0])
|
||||
return False
|
||||
if not verify_and_update_password(self.password.data, self.user):
|
||||
self.password.errors.append(get_message('INVALID_PASSWORD')[0])
|
||||
return False
|
||||
|
||||
Reference in New Issue
Block a user