gnunet-svn
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[taler-exchange] branch master updated: -fix redirect_uri construction f


From: gnunet
Subject: [taler-exchange] branch master updated: -fix redirect_uri construction for Oauth 2.0
Date: Thu, 02 Nov 2023 19:14:54 +0100

This is an automated email from the git hooks/post-receive script.

grothoff pushed a commit to branch master
in repository exchange.

The following commit(s) were added to refs/heads/master by this push:
     new 94a1e4f6 -fix redirect_uri construction for Oauth 2.0
94a1e4f6 is described below

commit 94a1e4f6b60a3d3561d57d3e371f88ba0e4bbc93
Author: Christian Grothoff <christian@grothoff.org>
AuthorDate: Thu Nov 2 19:14:50 2023 +0100

    -fix redirect_uri construction for Oauth 2.0
---
 src/kyclogic/plugin_kyclogic_oauth2.c | 18 +++++++++---------
 src/testing/testing_api_cmd_oauth.c   |  2 +-
 2 files changed, 10 insertions(+), 10 deletions(-)

diff --git a/src/kyclogic/plugin_kyclogic_oauth2.c 
b/src/kyclogic/plugin_kyclogic_oauth2.c
index 65dcaf08..7344ac43 100644
--- a/src/kyclogic/plugin_kyclogic_oauth2.c
+++ b/src/kyclogic/plugin_kyclogic_oauth2.c
@@ -549,18 +549,18 @@ initiate_with_url (struct TALER_KYCLOGIC_InitiateHandle 
*ih,
       char *redirect_uri;
 
       GNUNET_asprintf (&redirect_uri,
-                       "%skyc-proof/%s?state=%s",
+                       "%skyc-proof/%s",
                        ps->exchange_base_url,
-                       pd->section,
-                       hps);
+                       pd->section);
       redirect_uri_encoded = TALER_urlencode (redirect_uri);
       GNUNET_free (redirect_uri);
     }
     GNUNET_asprintf (&url,
-                     "%s?response_type=code&client_id=%s&redirect_uri=%s",
+                     
"%s?response_type=code&client_id=%s&redirect_uri=%s&state=%s",
                      authorize_url,
                      pd->client_id,
-                     redirect_uri_encoded);
+                     redirect_uri_encoded,
+                     hps);
     GNUNET_free (redirect_uri_encoded);
   }
   ih->cb (ih->cb_cls,
@@ -1339,10 +1339,9 @@ oauth2_proof (void *cls,
       char *redirect_uri;
 
       GNUNET_asprintf (&redirect_uri,
-                       "%skyc-proof/%s?state=%s",
+                       "%skyc-proof/%s",
                        ps->exchange_base_url,
-                       pd->section,
-                       hps);
+                       pd->section);
       redirect_uri_encoded = TALER_urlencode (redirect_uri);
       GNUNET_free (redirect_uri);
     }
@@ -1360,9 +1359,10 @@ oauth2_proof (void *cls,
                                            0);
     GNUNET_assert (NULL != authorization_code);
     GNUNET_asprintf (&ph->post_body,
-                     
"client_id=%s&redirect_uri=%s&client_secret=%s&code=%s&grant_type=authorization_code",
+                     
"client_id=%s&redirect_uri=%s&state=%s&client_secret=%s&code=%s&grant_type=authorization_code",
                      client_id,
                      redirect_uri_encoded,
+                     hps,
                      client_secret,
                      authorization_code);
     curl_free (authorization_code);
diff --git a/src/testing/testing_api_cmd_oauth.c 
b/src/testing/testing_api_cmd_oauth.c
index b086d229..17f0eaa6 100644
--- a/src/testing/testing_api_cmd_oauth.c
+++ b/src/testing/testing_api_cmd_oauth.c
@@ -1,6 +1,6 @@
 /*
   This file is part of TALER
-  Copyright (C) 2021 Taler Systems SA
+  Copyright (C) 2021-2023 Taler Systems SA
 
   TALER is free software; you can redistribute it and/or modify
   it under the terms of the GNU General Public License as

-- 
To stop receiving notification emails like this one, please contact
gnunet@gnunet.org.



reply via email to

[Prev in Thread] Current Thread [Next in Thread]