summaryrefslogtreecommitdiff
path: root/src/backend/taler-merchant-httpd_private-post-orders.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/backend/taler-merchant-httpd_private-post-orders.c')
-rw-r--r--src/backend/taler-merchant-httpd_private-post-orders.c17
1 files 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
index 75707960..6208fdcf 100644
--- 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,