aboutsummaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorChristian Grothoff <christian@grothoff.org>2024-02-18 11:39:20 +0100
committerChristian Grothoff <christian@grothoff.org>2024-02-18 11:39:20 +0100
commit51a281b4170d5efe663bd160f4dadeb1e7d6ad47 (patch)
tree58c9f216797d7d6f12d5128d78fdd95c5793102d /src
parent99228c467a935c8e91a73d2b6c9d6acd593c05f5 (diff)
add more sanity checks
Diffstat (limited to 'src')
-rw-r--r--src/util/url.c19
1 files changed, 19 insertions, 0 deletions
diff --git a/src/util/url.c b/src/util/url.c
index bf59ba6ec..593aa9b54 100644
--- a/src/util/url.c
+++ b/src/util/url.c
@@ -222,6 +222,25 @@ TALER_url_join (const char *base_url,
"Empty base URL specified\n");
return NULL;
}
+ if (NULL != strchr (base_url,
+ '?'))
+ {
+ /* query parameters not supported */
+ GNUNET_log (GNUNET_ERROR_TYPE_ERROR,
+ "Query parameters not allowed in base URL `%s'\n",
+ base_url);
+ return NULL;
+ }
+ if (NULL != strchr (path,
+ '?'))
+ {
+ /* query parameters not supported */
+ GNUNET_log (GNUNET_ERROR_TYPE_ERROR,
+ "Query parameters not allowed in path `%s'\n",
+ path);
+ return NULL;
+ }
+
if ('\0' != path[0])
{
if ('/' != base_url[strlen (base_url) - 1])