2
0
mirror of https://github.com/xcat2/confluent.git synced 2025-02-23 22:11:19 +00:00

Do not json dumps a string that is already json

This commit is contained in:
Jarrod Johnson 2024-12-02 16:50:13 -05:00
parent f1f433041c
commit 3fa6b47995

View File

@ -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)