commit 0f66ec87f8613795effdf11cc27db7b2f2ba71e4
parent 23b4c5eb9d830fa272c8011b62ac20ef7749f246
Author: Christian Grothoff <christian@grothoff.org>
Date: Wed, 16 Jun 2021 22:35:28 +0200
identify where #6904 breaks
Diffstat:
1 file changed, 17 insertions(+), 0 deletions(-)
diff --git a/src/backend/taler-merchant-httpd_private-post-orders.c b/src/backend/taler-merchant-httpd_private-post-orders.c
@@ -980,6 +980,23 @@ patch_order (struct MHD_Connection *connection,
"merchant_pub",
GNUNET_JSON_from_data_auto (
&hc->instance->merchant_pub)));
+ /* FIXME: #6904: transform 'true' in $forgettable into random salts! */
+ /* sanity check result */
+ {
+ struct GNUNET_HashCode hc;
+
+ if (GNUNET_OK !=
+ TALER_JSON_contract_hash (order,
+ &hc))
+ {
+ GNUNET_break (0);
+ return TALER_MHD_reply_with_error (
+ connection,
+ MHD_HTTP_INTERNAL_SERVER_ERROR,
+ TALER_EC_GENERIC_FAILED_COMPUTE_JSON_HASH,
+ "could not compute hash of patched order");
+ }
+ }
return execute_order (connection,
hc,
h_post_data,