summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorTim Graham <timograham@gmail.com>2016-01-02 06:44:06 -0500
committerTim Graham <timograham@gmail.com>2016-01-02 06:55:29 -0500
commit2f4be218e1e6605ecbb84365d761c206c241e221 (patch)
treeb4e50270a0dfcde388d2bb6469a6352450421cfe
parent151027beabc9827b72cb14326bffc594b0a13f10 (diff)
[1.9.x] Fixed #26016 -- Restored contrib.auth hashers compatibility with py-bcrypt.
Reverted "Explicitly passed rounds as rounds to bcrypt.gensalt()" This reverts commit 23529fb19594ffcc6ba6d716356b828157200288. Backport of f0ad641628a3ddc4e1c208e481b9cd0e9304dc3d from master
-rw-r--r--django/contrib/auth/hashers.py2
-rw-r--r--docs/releases/1.9.1.txt3
2 files changed, 4 insertions, 1 deletions
diff --git a/django/contrib/auth/hashers.py b/django/contrib/auth/hashers.py
index 3d585be5cc..0188f4a4e7 100644
--- a/django/contrib/auth/hashers.py
+++ b/django/contrib/auth/hashers.py
@@ -286,7 +286,7 @@ class BCryptSHA256PasswordHasher(BasePasswordHasher):
def salt(self):
bcrypt = self._load_library()
- return bcrypt.gensalt(rounds=self.rounds)
+ return bcrypt.gensalt(self.rounds)
def encode(self, password, salt):
bcrypt = self._load_library()
diff --git a/docs/releases/1.9.1.txt b/docs/releases/1.9.1.txt
index a01eb09d19..46e4f25807 100644
--- a/docs/releases/1.9.1.txt
+++ b/docs/releases/1.9.1.txt
@@ -76,3 +76,6 @@ Bugfixes
* Made ``loaddata`` skip disabling and enabling database constraints when it
doesn't load any fixtures (:ticket:`23372`).
+
+* Restored ``contrib.auth`` hashers compatibility with py-bcrypt
+ (:ticket:`26016`).