summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorChristian Grothoff <christian@grothoff.org>2021-08-03 21:50:54 +0200
committerChristian Grothoff <christian@grothoff.org>2021-08-03 21:50:54 +0200
commit06676e72cb063c7abb264cbfd527f5c2d414dc7c (patch)
tree64b153e89e3bf72895dbcab9e037408ec4b33ef2
parent5fc2e72a2a42434495237e7551af8ec054718171 (diff)
downloadexchange-06676e72cb063c7abb264cbfd527f5c2d414dc7c.tar.gz
exchange-06676e72cb063c7abb264cbfd527f5c2d414dc7c.tar.bz2
exchange-06676e72cb063c7abb264cbfd527f5c2d414dc7c.zip
allow ';' in URLs, needed for data URLs
-rw-r--r--src/util/url.c12
1 files changed, 6 insertions, 6 deletions
diff --git a/src/util/url.c b/src/util/url.c
index cae36299f..199863448 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;