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

Récupération correcte du sel dans le mot de passe encodé

This commit is contained in:
Gabriel Detraz 2018-11-15 16:43:28 +01:00 committed by root
parent bb952c0ba0
commit 6e08d3f415

View file

@ -114,9 +114,9 @@ class CryptPasswordHasher(hashers.BasePasswordHasher):
Check password against encoded using CRYPT algorithm
"""
assert encoded.startswith(self.algorithm)
salt = hash_password_salt(challenge_password)
return constant_time_compare(crypt.crypt(password.encode(), salt),
challenge.encode())
salt = hash_password_salt(encoded)
return constant_time_compare(crypt.crypt(password, salt),
encoded)
def safe_summary(self, encoded):
"""