109526036: Updates as per comments made on pull request.

This commit is contained in:
Rebecca Law
2015-12-10 15:21:06 +00:00
parent b5c65525af
commit 2b4097dd2d
6 changed files with 11 additions and 11 deletions

View File

@@ -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: