only check password if there is a store_hash

This commit is contained in:
Rodney Ewing 2013-07-08 16:27:43 -07:00
parent 5622cc44ed
commit b3c4cbd5c1

View File

@ -59,7 +59,10 @@ def gen_password_hash(raw_pass, extra_salt=None):
def check_password(raw_pass, stored_hash, extra_salt=None):
return auth_tools.bcrypt_check_password(raw_pass, stored_hash, extra_salt)
if stored_hash:
return auth_tools.bcrypt_check_password(raw_pass,
stored_hash, extra_salt)
return None
def auth():