[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
This commit is contained in:
Tim Graham 2016-01-02 06:44:06 -05:00
parent 151027beab
commit 2f4be218e1
2 changed files with 4 additions and 1 deletions

View File

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

View File

@ -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`).