8
0
Fork 0
mirror of https://gitlab2.federez.net/re2o/re2o synced 2024-12-26 00:43:46 +00:00

Merge branch 'fix_crypt_password' into 'master'

fix crypt password verification function

See merge request federez/re2o!419
This commit is contained in:
chirac 2019-04-25 22:26:31 +02:00
commit 3db44f592a

View file

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