summaryrefslogtreecommitdiff
path: root/django/contrib/auth/hashers.py
diff options
context:
space:
mode:
Diffstat (limited to 'django/contrib/auth/hashers.py')
-rw-r--r--django/contrib/auth/hashers.py3
1 files changed, 1 insertions, 2 deletions
diff --git a/django/contrib/auth/hashers.py b/django/contrib/auth/hashers.py
index c52f31db59..49b4fa5b14 100644
--- a/django/contrib/auth/hashers.py
+++ b/django/contrib/auth/hashers.py
@@ -419,8 +419,7 @@ class BCryptSHA256PasswordHasher(BasePasswordHasher):
# Hash the password prior to using bcrypt to prevent password
# truncation as described in #20138.
if self.digest is not None:
- # Use binascii.hexlify() because a hex encoded bytestring is
- # Unicode on Python 3.
+ # Use binascii.hexlify() because a hex encoded bytestring is str.
password = binascii.hexlify(self.digest(force_bytes(password)).digest())
else:
password = force_bytes(password)