Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

[1.6.x] Fixed #21398 -- Fixed BCryptSHA256PasswordHasher with py-bcry…

…pt and Python 3.

Thanks arjan at anymore.nl for the report.

Backport of d15985d from master
  • Loading branch information...
commit 4b9e932fd46eaac4774d229c40c2ee75f8fb759b 1 parent c9076a4
@timgraham timgraham authored
View
4 django/contrib/auth/hashers.py
@@ -322,8 +322,10 @@ def verify(self, password, encoded):
# Ensure that our data is a bytestring
data = force_bytes(data)
+ # force_bytes() necessary for py-bcrypt compatibility
+ hashpw = force_bytes(bcrypt.hashpw(password, data))
- return constant_time_compare(data, bcrypt.hashpw(password, data))
+ return constant_time_compare(data, hashpw)
def safe_summary(self, encoded):
algorithm, empty, algostr, work_factor, data = encoded.split('$', 4)
View
14 docs/releases/1.6.1.txt
@@ -0,0 +1,14 @@
+==========================
+Django 1.6.1 release notes
+==========================
+
+*Under development*
+
+This is Django 1.6.1, a bugfix release for Django 1.6.
+
+...
+
+Bug fixes
+=========
+
+* Fixed ``BCryptSHA256PasswordHasher`` with py-bcrypt and Python 3 (#21398).
View
1  docs/releases/index.txt
@@ -23,6 +23,7 @@ Final releases
:maxdepth: 1
1.6
+ 1.6.1
1.5 release
-----------
Please sign in to comment.
Something went wrong with that request. Please try again.