From 178d7928855f4f118c98d010a261e9ee81b07c2f Mon Sep 17 00:00:00 2001 From: Christian Grothoff Date: Sat, 20 Feb 2021 00:29:02 +0100 Subject: fix #6762 --- .../taler-merchant-httpd_private-patch-instances-ID.c | 14 +++++++++++++- 1 file changed, 13 insertions(+), 1 deletion(-) (limited to 'src/backend/taler-merchant-httpd_private-patch-instances-ID.c') diff --git a/src/backend/taler-merchant-httpd_private-patch-instances-ID.c b/src/backend/taler-merchant-httpd_private-patch-instances-ID.c index 521dfe36..637ded04 100644 --- a/src/backend/taler-merchant-httpd_private-patch-instances-ID.c +++ b/src/backend/taler-merchant-httpd_private-patch-instances-ID.c @@ -304,7 +304,19 @@ TMH_private_patch_instances_ID (const struct TMH_RequestHandler *rh, GNUNET_assert (NULL != wm->j_wire); wm->wire_method = TALER_payto_get_method (ad.payto_uri); - GNUNET_assert (NULL != wm->wire_method); + if (NULL == wm->wire_method) + { + GNUNET_break_op (0); + TMH_db->rollback (TMH_db->cls); + GNUNET_JSON_parse_free (spec); + json_decref (wm->j_wire); + GNUNET_free (wm); + return TALER_MHD_reply_with_error (connection, + MHD_HTTP_BAD_REQUEST, + TALER_EC_GENERIC_PAYTO_URI_MALFORMED, + ad.payto_uri); + + } /* This also tests for things like the IBAN being malformed */ if (GNUNET_OK != TALER_JSON_merchant_wire_signature_hash (wm->j_wire, -- cgit v1.2.3