mirror of
https://github.com/Kozea/Radicale.git
synced 2025-06-26 16:45:52 +00:00
Use replace instead of lstrip in htpasswd ACL (Thanks Simon!).
This commit is contained in:
parent
4abe4b8784
commit
a75bb261ed
1 changed files with 1 additions and 1 deletions
|
@ -40,7 +40,7 @@ def _crypt(hash, password):
|
||||||
return crypt.crypt(password, hash) == hash
|
return crypt.crypt(password, hash) == hash
|
||||||
|
|
||||||
def _sha1(hash, password):
|
def _sha1(hash, password):
|
||||||
hash = hash.lstrip("{SHA}").encode("ascii")
|
hash = hash.replace("{SHA}", "").encode("ascii")
|
||||||
password = password.encode(config.get("encoding", "stock"))
|
password = password.encode(config.get("encoding", "stock"))
|
||||||
sha1 = hashlib.sha1()
|
sha1 = hashlib.sha1()
|
||||||
sha1.update(password)
|
sha1.update(password)
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue