From 3fa6b47995bfbb74190d5d6e709270317902841a Mon Sep 17 00:00:00 2001 From: Jarrod Johnson Date: Mon, 2 Dec 2024 16:50:13 -0500 Subject: [PATCH] Do not json dumps a string that is already json --- confluent_server/confluent/webauthn.py | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/confluent_server/confluent/webauthn.py b/confluent_server/confluent/webauthn.py index 509a7584..4ca39057 100644 --- a/confluent_server/confluent/webauthn.py +++ b/confluent_server/confluent/webauthn.py @@ -238,7 +238,6 @@ def authentication_request(username, APP_RELYING_PARTY): challenge = Challenge(options.challenge) user_model.add(challenge) user_model.save() - opts = options_to_json(options) return opts @@ -300,7 +299,7 @@ def handle_api_request(url, env, start_response, username, cfm, headers, reqbody cfm.set_user(username, {'webauthid': b64authid}) opts = registration_request(username, cfm, APP_RELYING_PARTY) start_response('200 OK', headers) - yield json.dumps(opts) + yield opts elif url.startswith('/registered_credentials/'): username = url.rsplit('/', 1)[-1] userinfo = cfm.get_user(username) @@ -308,7 +307,7 @@ def handle_api_request(url, env, start_response, username, cfm, headers, reqbody username = username.encode('utf8') opts = authentication_request(username, APP_RELYING_PARTY) start_response('200 OK', headers) - yield json.dumps(opts) + yield opts elif url.startswith('/validate/'): username = url.rsplit('/', 1)[-1] userinfo = cfm.get_user(username)