8
0
Fork 0
mirror of https://gitlab2.federez.net/re2o/re2o synced 2024-11-25 22:22:26 +00:00

fix crypt password verification function

This commit is contained in:
Fardale 2019-04-24 23:36:25 +02:00 committed by root
parent 375d3fbd34
commit 074b944246

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