gnunet-svn
[Top][All Lists]
Advanced

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

[taler-anastasis] branch master updated: improve curl backwards compatib


From: gnunet
Subject: [taler-anastasis] branch master updated: improve curl backwards compatibility, de-duplicate code
Date: Mon, 08 Jan 2024 19:22:26 +0100

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

grothoff pushed a commit to branch master
in repository anastasis.

The following commit(s) were added to refs/heads/master by this push:
     new 2a7c03c  improve curl backwards compatibility, de-duplicate code
2a7c03c is described below

commit 2a7c03c03bacc4e7a57b8f22552ea221d9c15f45
Author: Christian Grothoff <christian@grothoff.org>
AuthorDate: Mon Jan 8 19:22:21 2024 +0100

    improve curl backwards compatibility, de-duplicate code
---
 src/restclient/anastasis_api_curl_defaults.c | 23 ++---------------------
 1 file changed, 2 insertions(+), 21 deletions(-)

diff --git a/src/restclient/anastasis_api_curl_defaults.c 
b/src/restclient/anastasis_api_curl_defaults.c
index 02a570a..6115280 100644
--- a/src/restclient/anastasis_api_curl_defaults.c
+++ b/src/restclient/anastasis_api_curl_defaults.c
@@ -34,31 +34,12 @@ ANASTASIS_curl_easy_get_ (const char *url)
                  curl_easy_setopt (eh,
                                    CURLOPT_URL,
                                    url));
-  GNUNET_assert (CURLE_OK ==
-                 curl_easy_setopt (eh,
-                                   CURLOPT_FOLLOWLOCATION,
-                                   1L));
-  if (0 == strcasecmp (url,
-                       "https://";))
-    GNUNET_assert (CURLE_OK ==
-                   curl_easy_setopt (eh,
-                                     CURLOPT_REDIR_PROTOCOLS_STR,
-                                     "https"));
-  else
-    GNUNET_assert (CURLE_OK ==
-                   curl_easy_setopt (eh,
-                                     CURLOPT_REDIR_PROTOCOLS_STR,
-                                     "http,https"));
+  TALER_curl_set_secure_redirect_policy (eh,
+                                         url);
   GNUNET_assert (CURLE_OK ==
                  curl_easy_setopt (eh,
                                    CURLOPT_TCP_FASTOPEN,
                                    1L));
-  /* limit MAXREDIRS to 5 as a simple security measure against
-      a potential infinite loop caused by a malicious target */
-  GNUNET_assert (CURLE_OK ==
-                 curl_easy_setopt (eh,
-                                   CURLOPT_MAXREDIRS,
-                                   5L));
   /* Enable compression (using whatever curl likes), see
      https://curl.se/libcurl/c/CURLOPT_ACCEPT_ENCODING.html  */
   GNUNET_break (CURLE_OK ==

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