summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--django/contrib/auth/hashers.py4
-rw-r--r--docs/releases/1.6.1.txt14
-rw-r--r--docs/releases/index.txt1
3 files changed, 18 insertions, 1 deletions
diff --git a/django/contrib/auth/hashers.py b/django/contrib/auth/hashers.py
index e9e8215c09..ab46fc23e7 100644
--- a/django/contrib/auth/hashers.py
+++ b/django/contrib/auth/hashers.py
@@ -322,8 +322,10 @@ class BCryptSHA256PasswordHasher(BasePasswordHasher):
# 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)
diff --git a/docs/releases/1.6.1.txt b/docs/releases/1.6.1.txt
new file mode 100644
index 0000000000..128a2e99c5
--- /dev/null
+++ b/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).
diff --git a/docs/releases/index.txt b/docs/releases/index.txt
index 8c5ef72197..bcbb00bb8d 100644
--- a/docs/releases/index.txt
+++ b/docs/releases/index.txt
@@ -23,6 +23,7 @@ Final releases
:maxdepth: 1
1.6
+ 1.6.1
1.5 release
-----------