Maintenance électrique le 12 août, nos services, et y compris Gitlab, seront fortement impactés autour de cette date. Retour à un état normal prévu dans le milieu de la semaine prochaine.

Commit 6e08d3f4 authored by Gabriel Detraz's avatar Gabriel Detraz Committed by root

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

parent bb952c0b
......@@ -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):
"""
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment