Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Browse files

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

  • Loading branch information...
commit 87e0a75c03747c5b7ed87311c2e1f34d9fb20bee 1 parent cb38fd9
@andrewsmedina andrewsmedina authored claudep committed
Showing with 1 addition and 1 deletion.
  1. +1 −1  django/contrib/auth/hashers.py
View
2  django/contrib/auth/hashers.py
@@ -219,7 +219,7 @@ def encode(self, password, salt, iterations=None):
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):
Please sign in to comment.
Something went wrong with that request. Please try again.