From 87e0a75c03747c5b7ed87311c2e1f34d9fb20bee Mon Sep 17 00:00:00 2001 From: Andrews Medina Date: Sat, 11 Aug 2012 00:18:33 +0200 Subject: [PATCH] [py3] Decoded base64-encoded hash in contrib.auth.hashers --- django/contrib/auth/hashers.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/django/contrib/auth/hashers.py b/django/contrib/auth/hashers.py index 45c1f88ab2..cdaf75636f 100644 --- a/django/contrib/auth/hashers.py +++ b/django/contrib/auth/hashers.py @@ -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):