exchange

Base system with REST service to issue digital coins, run by the payment service provider
Log | Files | Refs | Submodules | README | LICENSE

commit 9935cbc3fbce43da38bc6188fce8c5a7ed2a821d
parent e1c22e0a66614bb80c9cc3d9f934491963ed2a7e
Author: Christian Grothoff <grothoff@gnunet.org>
Date:   Sat, 11 Jul 2026 19:26:19 +0200

URL-encode client-id and scope just in case they use unreserved chars

Diffstat:
Msrc/kyclogic/plugin_kyclogic_oauth2.c | 14++++++++++----
1 file changed, 10 insertions(+), 4 deletions(-)

diff --git a/src/kyclogic/plugin_kyclogic_oauth2.c b/src/kyclogic/plugin_kyclogic_oauth2.c @@ -614,6 +614,8 @@ initiate_with_url (struct TALER_KYCLOGIC_InitiateHandle *ih, sizeof (ih->h_payto)); { char *redirect_uri_encoded; + char *client_id_encoded; + char *scope_encoded; { char *redirect_uri; @@ -625,15 +627,19 @@ initiate_with_url (struct TALER_KYCLOGIC_InitiateHandle *ih, redirect_uri_encoded = TALER_urlencode (redirect_uri); GNUNET_free (redirect_uri); } + client_id_encoded = TALER_urlencode (pd->client_id); + scope_encoded = TALER_urlencode (NULL != pd->scope + ? pd->scope + : ""); GNUNET_asprintf (&url, "%s?response_type=code&client_id=%s&redirect_uri=%s&state=%s&scope=%s", authorize_url, - pd->client_id, + client_id_encoded, redirect_uri_encoded, hps, - NULL != pd->scope - ? pd->scope - : ""); + scope_encoded); + GNUNET_free (scope_encoded); + GNUNET_free (client_id_encoded); GNUNET_free (redirect_uri_encoded); } ih->cb (ih->cb_cls,