gnunet-svn
[Top][All Lists]
Advanced

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

[taler-exchange] 01/02: allow ';' in URLs, needed for data URLs


From: gnunet
Subject: [taler-exchange] 01/02: allow ';' in URLs, needed for data URLs
Date: Tue, 03 Aug 2021 22:01:36 +0200

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

grothoff pushed a commit to branch master
in repository exchange.

commit 06676e72cb063c7abb264cbfd527f5c2d414dc7c
Author: Christian Grothoff <christian@grothoff.org>
AuthorDate: Tue Aug 3 21:50:54 2021 +0200

    allow ';' in URLs, needed for data URLs
---
 src/util/url.c | 12 ++++++------
 1 file changed, 6 insertions(+), 6 deletions(-)

diff --git a/src/util/url.c b/src/util/url.c
index cae36299..19986344 100644
--- a/src/util/url.c
+++ b/src/util/url.c
@@ -27,8 +27,8 @@
  * be urlencoded.
  *
  * @param c character to look at
- * @return #GNUNET_YES if @a c needs to be urlencoded,
- *         #GNUNET_NO otherwise
+ * @return true if @a c needs to be urlencoded,
+ *         false otherwise
  */
 static bool
 is_reserved (char c)
@@ -48,11 +48,11 @@ is_reserved (char c)
   case 'P': case 'Q': case 'R': case 'S': case 'T':
   case 'U': case 'V': case 'W': case 'X': case 'Y': case 'Z':
   case '-': case '.': case '_': case '~':
-    return GNUNET_NO;
+    return false;
   default:
     break;
   }
-  return GNUNET_YES;
+  return true;
 }
 
 
@@ -68,7 +68,7 @@ urlencode_len (const char *s)
 {
   size_t len = 0;
   for (; *s != '\0'; len++, s++)
-    if (GNUNET_YES == is_reserved (*s))
+    if (is_reserved (*s))
       len += 2;
   return len;
 }
@@ -372,7 +372,7 @@ TALER_url_valid_charset (const char *url)
   for (unsigned int i = 0; '\0' != url[i]; i++)
   {
 #define ALLOWED_CHARACTERS \
-  "abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789/:&?-.,=_~%"
+  "abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789/:;&?-.,=_~%"
     if (NULL == strchr (ALLOWED_CHARACTERS,
                         (int) url[i]))
       return false;

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