commit adfd806648d1a58e7ab67f7988f6a4e98500a8a3
parent 7202823d81e868d411b733fcce61906ba268f932
Author: Christian Grothoff <christian@grothoff.org>
Date: Thu, 9 Jan 2020 12:18:46 +0100
fix #6015
Diffstat:
1 file changed, 11 insertions(+), 1 deletion(-)
diff --git a/src/backend/taler-merchant-httpd_order.c b/src/backend/taler-merchant-httpd_order.c
@@ -463,7 +463,6 @@ proposal_put (struct MHD_Connection *connection,
{
return MHD_YES;
}
-
/* other internal errors might have occurred */
if (GNUNET_SYSERR == res)
{
@@ -473,6 +472,17 @@ proposal_put (struct MHD_Connection *connection,
TALER_EC_PROPOSAL_ORDER_PARSE_ERROR,
"Impossible to parse the order");
}
+ if (0 !=
+ strcasecmp (total.currency,
+ TMH_currency))
+ {
+ GNUNET_break_op (0);
+ return TALER_MHD_reply_with_error
+ (connection,
+ MHD_HTTP_BAD_REQUEST,
+ TALER_EC_PROPOSAL_ORDER_BAD_CURRENCY,
+ "Total amount must be in currency supported by backend");
+ }
if (wire_transfer_deadline.abs_value_us <
refund_deadline.abs_value_us)