core: fix SCRAM challenge parsing.

This commit is contained in:
Goffi 2024-06-01 22:35:47 +02:00
commit 8752c60a84

View file

@ -88,7 +88,9 @@ class ScramSha:
@param challenge: Challenge string from the server.
@return: Client proof.
"""
challenge_parts = dict(item.split("=") for item in challenge.decode().split(","))
challenge_parts = dict(
item.split("=", 1) for item in challenge.decode().split(",")
)
self.server_nonce = challenge_parts["r"]
salt = base64.b64decode(challenge_parts["s"])
iterations = int(challenge_parts["i"])