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:
parent
bb952c0ba0
commit
6e08d3f415
1 changed files with 3 additions and 3 deletions
|
@ -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):
|
||||
"""
|
||||
|
|
Loading…
Reference in a new issue