Commit 2f4be218 authored by Tim Graham's avatar Tim Graham
Browse files

[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 23529fb1.

Backport of f0ad6416 from master
parent 151027be
Loading
Loading
Loading
Loading
+1 −1
Original line number Diff line number Diff line
@@ -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()
+3 −0
Original line number Diff line number Diff line
@@ -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`).