diff options
author | Christian Grothoff <christian@grothoff.org> | 2023-05-17 22:21:24 +0200 |
---|---|---|
committer | Christian Grothoff <christian@grothoff.org> | 2023-05-17 22:21:24 +0200 |
commit | 549e70fbc14fc18db7f5fe9266e91b7d13818671 (patch) | |
tree | db2eda44394abaa3ecc51e2f042d9c7576f7ef80 | |
parent | b712481beaeb1dcc2e2a7195d0607a3c0f073665 (diff) |
-fix crash reported by sebas
-rw-r--r-- | src/backend/taler-merchant-httpd_helper.c | 8 | ||||
-rw-r--r-- | src/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 index 61b935f5..75639af6 100644 --- 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 index c92dead4..275fdc92 100644 --- 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, |