summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorTim Graham <timograham@gmail.com>2016-08-04 10:57:37 -0400
committerTim Graham <timograham@gmail.com>2016-08-04 10:57:57 -0400
commit4a0c9e0545231fcf5fca1ec37cb292486c4c0767 (patch)
tree65801cb69f8444dd0699e903d750621178b7b7c7
parent6757c94662ef07e35eafcf3ac8bdae07a3d9326a (diff)
[1.10.x] Fixed #27010 -- Made Argon2PasswordHasher decode with ASCII.
The underlying hasher only generates strings containing ASCII characters so this is merely a cosmetic change. Backport of 967aa7f6cc720b11e38b7e0cbeffc2c95c64fa05 from master
-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 8673b95cef..1165bf6a78 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()