mirror of
https://github.com/Kozea/Radicale.git
synced 2025-06-26 16:45:52 +00:00
Repair SSHA method
This commit is contained in:
parent
99bda37839
commit
fc309562da
1 changed files with 3 additions and 3 deletions
|
@ -169,11 +169,11 @@ class Auth(BaseAuth):
|
||||||
written with e.g. openssl, and nginx can parse it.
|
written with e.g. openssl, and nginx can parse it.
|
||||||
|
|
||||||
"""
|
"""
|
||||||
hash_value = hash_value.replace(
|
hash_value = base64.b64decode(hash_value.replace(
|
||||||
"{SSHA}", "").encode("ascii").decode("base64")
|
"{SSHA}", "").encode("ascii"))
|
||||||
password = password.encode(self.configuration.get("encoding", "stock"))
|
password = password.encode(self.configuration.get("encoding", "stock"))
|
||||||
hash_value = hash_value[:20]
|
|
||||||
salt_value = hash_value[20:]
|
salt_value = hash_value[20:]
|
||||||
|
hash_value = hash_value[:20]
|
||||||
sha1 = hashlib.sha1()
|
sha1 = hashlib.sha1()
|
||||||
sha1.update(password)
|
sha1.update(password)
|
||||||
sha1.update(salt_value)
|
sha1.update(salt_value)
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue