8
0
Fork 0
mirror of https://gitlab2.federez.net/re2o/re2o synced 2024-09-10 08:13:12 +00:00

fix crypt password verification function

This commit is contained in:
Fardale 2019-04-24 23:36:25 +02:00
parent a8dbe4621f
commit 814fec7d2a

View file

@ -115,7 +115,7 @@ class CryptPasswordHasher(hashers.BasePasswordHasher):
"""
assert encoded.startswith(self.algorithm)
salt = hash_password_salt(encoded)
return constant_time_compare(crypt.crypt(password, salt),
return constant_time_compare(self.algorithm + crypt.crypt(password, salt),
encoded)
def safe_summary(self, encoded):