diff options
author | Christian Grothoff <christian@grothoff.org> | 2022-05-18 18:05:32 +0200 |
---|---|---|
committer | Christian Grothoff <christian@grothoff.org> | 2022-05-18 18:05:32 +0200 |
commit | 344c53c51dac9d5bb09c261c36f3e4d58de1a321 (patch) | |
tree | be65f9f78ca8d39add84a5fc31098e8f806c9555 /src/lib | |
parent | 492d501570106cb2eefa684820d0c64966c153f9 (diff) |
enforce valid payto:// URI in exchange /wire response
Diffstat (limited to 'src/lib')
-rw-r--r-- | src/lib/exchange_api_management_wire_enable.c | 12 |
1 files changed, 12 insertions, 0 deletions
diff --git a/src/lib/exchange_api_management_wire_enable.c b/src/lib/exchange_api_management_wire_enable.c index c4d5b13b4..6e3dbad19 100644 --- a/src/lib/exchange_api_management_wire_enable.c +++ b/src/lib/exchange_api_management_wire_enable.c @@ -138,6 +138,18 @@ TALER_EXCHANGE_management_enable_wire ( CURL *eh; json_t *body; + { + char *msg = TALER_payto_validate (payto_uri); + + if (NULL != msg) + { + GNUNET_log (GNUNET_ERROR_TYPE_ERROR, + "payto URI is malformed: %s\n", + msg); + GNUNET_free (msg); + return NULL; + } + } wh = GNUNET_new (struct TALER_EXCHANGE_ManagementWireEnableHandle); wh->cb = cb; wh->cb_cls = cb_cls; |