diff options
author | Christian Grothoff <christian@grothoff.org> | 2020-03-15 22:07:57 +0100 |
---|---|---|
committer | Christian Grothoff <christian@grothoff.org> | 2020-03-15 22:07:57 +0100 |
commit | c79a628348e87906d94401f74c702a3acebb0137 (patch) | |
tree | e4096989c83d01f42a80b3cff8f80680f7bb0024 | |
parent | 0fb7b9b4c2b8b1f83b2c2e7cb2eb0c3cbe9eb2e6 (diff) | |
download | merchant-c79a628348e87906d94401f74c702a3acebb0137.tar.gz merchant-c79a628348e87906d94401f74c702a3acebb0137.tar.bz2 merchant-c79a628348e87906d94401f74c702a3acebb0137.zip |
refactor to latest libgnunetcurl
-rw-r--r-- | src/backend/taler-merchant-httpd.c | 20 |
1 files changed, 1 insertions, 19 deletions
diff --git a/src/backend/taler-merchant-httpd.c b/src/backend/taler-merchant-httpd.c index 6e87c6d6..b47413c3 100644 --- a/src/backend/taler-merchant-httpd.c +++ b/src/backend/taler-merchant-httpd.c @@ -168,24 +168,6 @@ static struct GNUNET_CONFIGURATION_Handle *cfg; /** - * Return #GNUNET_YES if given a valid correlation ID and - * #GNUNET_NO otherwise. - * - * @returns #GNUNET_YES iff given a valid correlation ID - */ -static int -is_valid_correlation_id (const char *correlation_id) -{ - if (strlen (correlation_id) >= 64) - return GNUNET_NO; - for (size_t i = 0; i < strlen (correlation_id); i++) - if (! (isalnum (correlation_id[i]) || (correlation_id[i] == '-'))) - return GNUNET_NO; - return GNUNET_YES; -} - - -/** * Callback that frees all the elements in the hashmap * * @param cls closure, NULL @@ -1340,7 +1322,7 @@ url_handler (void *cls, MHD_HEADER_KIND, "Taler-Correlation-Id"); if ((NULL != correlation_id) && - (GNUNET_YES != is_valid_correlation_id (correlation_id))) + (GNUNET_YES != GNUNET_CURL_is_valid_scope_id (correlation_id))) { GNUNET_log (GNUNET_ERROR_TYPE_WARNING, "illegal incoming correlation ID\n"); |