1
0
mirror of https://github.com/django/django.git synced 2025-04-15 04:44:37 +00:00

[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
This commit is contained in:
Tim Graham 2016-08-04 10:57:37 -04:00
parent 6757c94662
commit 4a0c9e0545

View File

@ -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()