summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorTim Graham <timograham@gmail.com>2016-08-04 10:57:37 -0400
committerGitHub <noreply@github.com>2016-08-04 10:57:37 -0400
commit967aa7f6cc720b11e38b7e0cbeffc2c95c64fa05 (patch)
tree66552b5a008909f48046f7fb5b9a1caea735cdad
parent272eccf7ff0ced609e5a5e3bb6b4a40e773e0e66 (diff)
Fixed #27010 -- Made Argon2PasswordHasher decode with ASCII.
The underlying hasher only generates strings containing ASCII characters so this is merely a cosmetic change.
-rw-r--r--django/contrib/auth/hashers.py2
1 files changed, 1 insertions, 1 deletions
diff --git a/django/contrib/auth/hashers.py b/django/contrib/auth/hashers.py
index cadbb809be..8056ec010a 100644
--- a/django/contrib/auth/hashers.py
+++ b/django/contrib/auth/hashers.py
@@ -323,7 +323,7 @@ class Argon2PasswordHasher(BasePasswordHasher):
hash_len=argon2.DEFAULT_HASH_LENGTH,
type=argon2.low_level.Type.I,
)
- return self.algorithm + data.decode('utf-8')
+ return self.algorithm + data.decode('ascii')
def verify(self, password, encoded):
argon2 = self._load_library()