Kaydet (Commit) 87e0a75c authored tarafından Andrews Medina's avatar Andrews Medina Kaydeden (comit) Claude Paroz

[py3] Decoded base64-encoded hash in contrib.auth.hashers

üst cb38fd96
......@@ -219,7 +219,7 @@ class PBKDF2PasswordHasher(BasePasswordHasher):
if not iterations:
iterations = self.iterations
hash = pbkdf2(password, salt, iterations, digest=self.digest)
hash = base64.b64encode(hash).strip()
hash = base64.b64encode(hash).decode('ascii').strip()
return "%s$%d$%s$%s" % (self.algorithm, iterations, salt, hash)
def verify(self, password, 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