merchant

Merchant backend to process payments, run by merchants
Log | Files | Refs | Submodules | README | LICENSE

commit 549e70fbc14fc18db7f5fe9266e91b7d13818671
parent b712481beaeb1dcc2e2a7195d0607a3c0f073665
Author: Christian Grothoff <christian@grothoff.org>
Date:   Wed, 17 May 2023 22:21:24 +0200

-fix crash reported by sebas

Diffstat:
Msrc/backend/taler-merchant-httpd_helper.c | 8++++++++
Msrc/bank/mb_parse.c | 5+++++
2 files changed, 13 insertions(+), 0 deletions(-)

diff --git a/src/backend/taler-merchant-httpd_helper.c b/src/backend/taler-merchant-httpd_helper.c @@ -177,6 +177,14 @@ TMH_accounts_array_valid (const json_t *accounts) return false; } } + if ( (NULL == credit_facade_url) != + (NULL == credit_facade_credentials) ) + { + GNUNET_log (GNUNET_ERROR_TYPE_WARNING, + "If credit_facade_url is given, credit_facade_credentials must also be specified (violated for %s)\n", + uri); + return false; + } if ( (NULL != credit_facade_url) || (NULL != credit_facade_credentials) ) { diff --git a/src/bank/mb_parse.c b/src/bank/mb_parse.c @@ -137,6 +137,11 @@ TALER_MERCHANT_BANK_auth_parse_json ( auth->wire_gateway_url = GNUNET_strdup (backend_url); method = json_string_value (json_object_get (cred, "type")); + if (NULL == method) + { + GNUNET_break_op (0); + return GNUNET_SYSERR; + } for (unsigned int i = 0; NULL != methods[i].m; i++) { if (0 == strcasecmp (method,