[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[taler-exchange] 02/02: add more sanity checks
From: |
gnunet |
Subject: |
[taler-exchange] 02/02: add more sanity checks |
Date: |
Sun, 18 Feb 2024 11:39:25 +0100 |
This is an automated email from the git hooks/post-receive script.
grothoff pushed a commit to branch master
in repository exchange.
commit 51a281b4170d5efe663bd160f4dadeb1e7d6ad47
Author: Christian Grothoff <christian@grothoff.org>
AuthorDate: Sun Feb 18 11:39:20 2024 +0100
add more sanity checks
---
src/util/url.c | 19 +++++++++++++++++++
1 file changed, 19 insertions(+)
diff --git a/src/util/url.c b/src/util/url.c
index bf59ba6e..593aa9b5 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])
--
To stop receiving notification emails like this one, please contact
gnunet@gnunet.org.