From 85a02216d8a1926f2a528e0bae64c76410a6263d Mon Sep 17 00:00:00 2001 From: Christian Grothoff Date: Mon, 6 Jul 2020 10:52:24 +0200 Subject: fix #5930 --- src/backend/taler-merchant-httpd_private-post-orders.c | 11 ++++++++++- 1 file changed, 10 insertions(+), 1 deletion(-) diff --git a/src/backend/taler-merchant-httpd_private-post-orders.c b/src/backend/taler-merchant-httpd_private-post-orders.c index 06fd562b..5ccad64d 100644 --- a/src/backend/taler-merchant-httpd_private-post-orders.c +++ b/src/backend/taler-merchant-httpd_private-post-orders.c @@ -673,8 +673,17 @@ patch_order (struct MHD_Connection *connection, /* Fill in merchant information if necessary */ - if (NULL == json_object_get (order, + if (NULL != json_object_get (order, "merchant")) + { + GNUNET_break_op (0); + return TALER_MHD_reply_with_error ( + connection, + MHD_HTTP_BAD_REQUEST, + TALER_EC_PROPOSAL_ORDER_PARSE_ERROR, + "'merchant' field already set, but must be provided by backend"); + } + else { const char *mj = NULL; const char *ma = NULL; -- cgit v1.2.3