mirror of
https://gitlab2.federez.net/re2o/re2o
synced 2024-11-22 19:33:11 +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
|
Check password against encoded using CRYPT algorithm
|
||||||
"""
|
"""
|
||||||
assert encoded.startswith(self.algorithm)
|
assert encoded.startswith(self.algorithm)
|
||||||
salt = hash_password_salt(challenge_password)
|
salt = hash_password_salt(encoded)
|
||||||
return constant_time_compare(crypt.crypt(password.encode(), salt),
|
return constant_time_compare(crypt.crypt(password, salt),
|
||||||
challenge.encode())
|
encoded)
|
||||||
|
|
||||||
def safe_summary(self, encoded):
|
def safe_summary(self, encoded):
|
||||||
"""
|
"""
|
||||||
|
|
Loading…
Reference in a new issue