summaryrefslogtreecommitdiff
path: root/src/lib/auditor_api_handle.c
diff options
context:
space:
mode:
authorChristian Grothoff <christian@grothoff.org>2021-03-05 21:41:55 +0100
committerChristian Grothoff <christian@grothoff.org>2021-03-05 21:41:55 +0100
commitca5f0c4d6f2969bfbde9d8cb5fc7f90a95c3d712 (patch)
tree96018c9e83f98bae837c6fd27c594ce6aad2c0d7 /src/lib/auditor_api_handle.c
parent5985f73d4219fd9bbfbc640aeaca409cdf571b27 (diff)
downloadexchange-ca5f0c4d6f2969bfbde9d8cb5fc7f90a95c3d712.tar.gz
exchange-ca5f0c4d6f2969bfbde9d8cb5fc7f90a95c3d712.tar.bz2
exchange-ca5f0c4d6f2969bfbde9d8cb5fc7f90a95c3d712.zip
fix #6786: do not die on bogus URL
Diffstat (limited to 'src/lib/auditor_api_handle.c')
-rw-r--r--src/lib/auditor_api_handle.c21
1 files changed, 15 insertions, 6 deletions
diff --git a/src/lib/auditor_api_handle.c b/src/lib/auditor_api_handle.c
index d3cecf75b..1d5522141 100644
--- a/src/lib/auditor_api_handle.c
+++ b/src/lib/auditor_api_handle.c
@@ -407,13 +407,10 @@ char *
TALER_AUDITOR_path_to_url_ (struct TALER_AUDITOR_Handle *h,
const char *path)
{
- char *ret;
GNUNET_assert ('/' == path[0]);
- ret = TALER_url_join (h->url,
- path + 1,
- NULL);
- GNUNET_assert (NULL != ret);
- return ret;
+ return TALER_url_join (h->url,
+ path + 1,
+ NULL);
}
@@ -481,6 +478,18 @@ request_version (void *cls)
vr->auditor = auditor;
vr->url = TALER_AUDITOR_path_to_url_ (auditor,
"/version");
+ if (NULL == vr->url)
+ {
+ struct TALER_AUDITOR_HttpResponse hr = {
+ .ec = TALER_EC_GENERIC_CONFIGURATION_INVALID
+ };
+
+ auditor->version_cb (auditor->version_cb_cls,
+ &hr,
+ NULL,
+ TALER_AUDITOR_VC_PROTOCOL_ERROR);
+ return;
+ }
GNUNET_log (GNUNET_ERROR_TYPE_INFO,
"Requesting auditor version with URL `%s'.\n",
vr->url);