summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorChristian Grothoff <christian@grothoff.org>2021-08-04 18:27:03 +0200
committerChristian Grothoff <christian@grothoff.org>2021-08-04 18:27:03 +0200
commitc2f92c42c65346bde0bd5af01fbad51b2600a496 (patch)
tree5c7669fac6911694025c46cd0ba598a8b221d977
parent99eb36e490f5f0ca16cb451941ca873b03016b27 (diff)
downloadmerchant-c2f92c42c65346bde0bd5af01fbad51b2600a496.tar.gz
merchant-c2f92c42c65346bde0bd5af01fbad51b2600a496.tar.bz2
merchant-c2f92c42c65346bde0bd5af01fbad51b2600a496.zip
finish fix for #6953
-rw-r--r--src/backend/taler-merchant-httpd_private-post-orders.c8
-rw-r--r--src/lib/merchant_api_post_orders.c3
2 files changed, 8 insertions, 3 deletions
diff --git a/src/backend/taler-merchant-httpd_private-post-orders.c b/src/backend/taler-merchant-httpd_private-post-orders.c
index 5a10e449..20a50d23 100644
--- a/src/backend/taler-merchant-httpd_private-post-orders.c
+++ b/src/backend/taler-merchant-httpd_private-post-orders.c
@@ -400,15 +400,17 @@ execute_order (struct MHD_Connection *connection,
"order:products");
}
- if (! TALER_JSON_check_i18n (fulfillment_i18n))
+ if ( (NULL != fulfillment_i18n) &&
+ (! TALER_JSON_check_i18n (fulfillment_i18n)) )
{
GNUNET_JSON_parse_free (spec);
return TALER_MHD_reply_with_error (connection,
MHD_HTTP_BAD_REQUEST,
TALER_EC_GENERIC_PARAMETER_MALFORMED,
- "order:fulfillment_i18n");
+ "order:fulfillment_message_i18n");
}
- if (! TALER_JSON_check_i18n (summary_i18n))
+ if ( (NULL != summary_i18n) &&
+ (! TALER_JSON_check_i18n (summary_i18n)) )
{
GNUNET_JSON_parse_free (spec);
return TALER_MHD_reply_with_error (connection,
diff --git a/src/lib/merchant_api_post_orders.c b/src/lib/merchant_api_post_orders.c
index ae804ddf..b7e406f4 100644
--- a/src/lib/merchant_api_post_orders.c
+++ b/src/lib/merchant_api_post_orders.c
@@ -127,6 +127,9 @@ handle_post_order_finished (void *cls,
}
break;
case MHD_HTTP_BAD_REQUEST:
+ json_dumpf (json,
+ stderr,
+ JSON_INDENT (2));
por.hr.ec = TALER_JSON_get_error_code (json);
por.hr.hint = TALER_JSON_get_error_hint (json);
/* This should never happen, either us or