gnunet-svn
[Top][All Lists]
Advanced

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

[gnunet] branch master updated: - actually urlencode parameters in recla


From: gnunet
Subject: [gnunet] branch master updated: - actually urlencode parameters in reclaim OIDC
Date: Sun, 02 Aug 2020 08:45:22 +0200

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

martin-schanzenbach pushed a commit to branch master
in repository gnunet.

The following commit(s) were added to refs/heads/master by this push:
     new c0b4041cb - actually urlencode parameters in reclaim OIDC
c0b4041cb is described below

commit c0b4041cbd9d27ce919e861ca05a74843648d7d0
Author: Martin Schanzenbach <mschanzenbach@posteo.de>
AuthorDate: Sun Aug 2 08:38:56 2020 +0200

    - actually urlencode parameters in reclaim OIDC
---
 src/reclaim/plugin_rest_openid_connect.c | 24 ++++++++++++++++++++----
 1 file changed, 20 insertions(+), 4 deletions(-)

diff --git a/src/reclaim/plugin_rest_openid_connect.c 
b/src/reclaim/plugin_rest_openid_connect.c
index 69bbb7af7..faa6e8351 100644
--- a/src/reclaim/plugin_rest_openid_connect.c
+++ b/src/reclaim/plugin_rest_openid_connect.c
@@ -856,6 +856,7 @@ login_redirect (void *cls)
 {
   char *login_base_url;
   char *new_redirect;
+  char *tmp;
   struct MHD_Response *resp;
   struct GNUNET_Buffer buf = { 0 };
   struct RequestHandle *handle = cls;
@@ -874,21 +875,32 @@ login_redirect (void *cls)
                               "&%s=%s",
                               OIDC_CLIENT_ID_KEY,
                               handle->oidc->client_id);
+    GNUNET_STRINGS_urlencode (handle->oidc->redirect_uri,
+                              strlen (handle->oidc->redirect_uri),
+                              &tmp);
     GNUNET_buffer_write_fstr (&buf,
                               "&%s=%s",
                               OIDC_REDIRECT_URI_KEY,
-                              handle->oidc->redirect_uri);
-
+                              tmp);
+    GNUNET_free (tmp);
+    GNUNET_STRINGS_urlencode (handle->oidc->scope,
+                              strlen (handle->oidc->scope),
+                              &tmp);
     GNUNET_buffer_write_fstr (&buf,
                               "&%s=%s",
                               OIDC_SCOPE_KEY,
-                              handle->oidc->scope);
+                              tmp);
+    GNUNET_free (tmp);
     if (NULL != handle->oidc->state)
     {
+      GNUNET_STRINGS_urlencode (handle->oidc->state,
+                                strlen (handle->oidc->state),
+                                &tmp);
       GNUNET_buffer_write_fstr (&buf,
                                 "&%s=%s",
                                 OIDC_STATE_KEY,
                                 handle->oidc->state);
+      GNUNET_free (tmp);
     }
     if (NULL != handle->oidc->code_challenge)
     {
@@ -906,10 +918,14 @@ login_redirect (void *cls)
     }
     if (NULL != handle->oidc->claims)
     {
+      GNUNET_STRINGS_urlencode (handle->oidc->claims,
+                                strlen (handle->oidc->claims),
+                                &tmp);
       GNUNET_buffer_write_fstr (&buf,
                                 "&%s=%s",
                                 OIDC_CLAIMS_KEY,
-                                handle->oidc->claims);
+                                tmp);
+      GNUNET_free (tmp);
     }
     new_redirect = GNUNET_buffer_reap_str (&buf);
     resp = GNUNET_REST_create_response ("");

-- 
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]