mirror of
https://github.com/GSA/notifications-admin.git
synced 2026-07-29 04:09:07 -04:00
109526036: Updates as per comments made on pull request.
This commit is contained in:
@@ -6,7 +6,7 @@ from wtforms import StringField, PasswordField
|
||||
from wtforms.validators import DataRequired, Email, Length, Regexp
|
||||
|
||||
from app.main.dao import verify_codes_dao
|
||||
from app.main.encryption import checkpw
|
||||
from app.main.encryption import check_hash
|
||||
from app.main.validators import Blacklist
|
||||
|
||||
|
||||
@@ -75,7 +75,7 @@ def validate_code(field, code):
|
||||
field.errors.append('Code has expired')
|
||||
return False
|
||||
if field.data is not None:
|
||||
if checkpw(field.data, code.code) is False:
|
||||
if check_hash(field.data, code.code) is False:
|
||||
field.errors.append('Code does not match')
|
||||
return False
|
||||
else:
|
||||
|
||||
Reference in New Issue
Block a user