Skip to content

Commit

Permalink
passlib: use hash() instead of deprecated encrypt()
Browse files Browse the repository at this point in the history
  • Loading branch information
Unrud committed Sep 8, 2018
1 parent 94bb4fb commit 1a26df8
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion radicale/auth/htpasswd.py
Original file line number Diff line number Diff line change
Expand Up @@ -57,7 +57,7 @@ def __init__(self, configuration):
# A call to `encrypt` raises passlib.exc.MissingBackendError with a
# good error message if bcrypt backend is not available. Trigger
# this here.
bcrypt.encrypt("test-bcrypt-backend")
bcrypt.hash("test-bcrypt-backend")
self.verify = functools.partial(self._bcrypt, bcrypt)
elif self.encryption == "crypt":
try:
Expand Down
2 changes: 1 addition & 1 deletion radicale/tests/test_auth.py
Original file line number Diff line number Diff line change
Expand Up @@ -106,7 +106,7 @@ def test_htpasswd_bcrypt(self):
except ImportError:
pytest.skip("passlib is not installed")
try:
bcrypt.encrypt("test-bcrypt-backend")
bcrypt.hash("test-bcrypt-backend")
except MissingBackendError:
pytest.skip("bcrypt backend for passlib is not installed")
self._test_htpasswd(
Expand Down

0 comments on commit 1a26df8

Please sign in to comment.