diff options
author | Christian Grothoff <christian@grothoff.org> | 2024-02-18 11:39:20 +0100 |
---|---|---|
committer | Christian Grothoff <christian@grothoff.org> | 2024-02-18 11:39:20 +0100 |
commit | 51a281b4170d5efe663bd160f4dadeb1e7d6ad47 (patch) | |
tree | 58c9f216797d7d6f12d5128d78fdd95c5793102d /src/util/url.c | |
parent | 99228c467a935c8e91a73d2b6c9d6acd593c05f5 (diff) | |
download | exchange-51a281b4170d5efe663bd160f4dadeb1e7d6ad47.tar.xz |
add more sanity checks
Diffstat (limited to 'src/util/url.c')
-rw-r--r-- | src/util/url.c | 19 |
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]) |