mirror of
https://gitlab2.federez.net/re2o/re2o
synced 2024-11-30 08:32:26 +00:00
fix md5 password verification function
This commit is contained in:
parent
074b944246
commit
4a14d6480c
1 changed files with 3 additions and 3 deletions
|
@ -157,9 +157,9 @@ class MD5PasswordHasher(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(
|
return constant_time_compare(self.algorithm + "$" +
|
||||||
b64encode(hashlib.md5(password.encode() + salt).digest() + salt),
|
b64encode(hashlib.md5(password.encode() + salt).digest() + salt).decode(),
|
||||||
encoded.encode())
|
encoded)
|
||||||
|
|
||||||
def safe_summary(self, encoded):
|
def safe_summary(self, encoded):
|
||||||
"""
|
"""
|
||||||
|
|
Loading…
Reference in a new issue