Return also None as new hash from check_password when there is no hash

issue9712
review306701002
This commit is contained in:
Adrià Tarroja Caubet committed 2020-10-13 18:27:22 +02:00
1 parent b935077397
commit 714c08130e
1 file changed
+1 -1
+1 -1
View File
@@ -209,7 +209,7 @@ class User(DeactivableMixin, ModelSQL, ModelView):
@classmethod
def check_password(cls, password, hash_):
if not hash_:
return False
return False, None
try:
return CRYPT_CONTEXT.verify_and_update(password, hash_)
except ValueError: