changeset 4256:c14e904eee13

core: fix SCRAM challenge parsing.
author Goffi <goffi@goffi.org>
date Sat, 01 Jun 2024 22:35:47 +0200
parents 32e49c389bfd
children 810f2b80146b
files libervia/backend/core/patches.py
diffstat 1 files changed, 3 insertions(+), 1 deletions(-) [+]
line wrap: on
line diff
--- a/libervia/backend/core/patches.py	Fri May 31 15:15:42 2024 +0200
+++ b/libervia/backend/core/patches.py	Sat Jun 01 22:35:47 2024 +0200
@@ -88,7 +88,9 @@
         @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"])