merchant

Merchant backend to process payments, run by merchants
Log | Files | Refs | Submodules | README | LICENSE

commit f544525b67c45c9ccc94ca4c224eb0dd84365729
parent 6983e57aca28fcc9c358510bc5e2e0b79821859a
Author: Christian Grothoff <christian@grothoff.org>
Date:   Fri,  9 Oct 2026 22:54:30 +0200

cap lock UUID array length

Diffstat:
Msrc/backend/taler-merchant-httpd_post-private-orders.c | 11++++++++++-
1 file changed, 10 insertions(+), 1 deletion(-)

diff --git a/src/backend/taler-merchant-httpd_post-private-orders.c b/src/backend/taler-merchant-httpd_post-private-orders.c @@ -94,7 +94,7 @@ * refuses a forced download. */ #define MAX_KEYS_WAIT \ - GNUNET_TIME_relative_multiply (GNUNET_TIME_UNIT_MILLISECONDS, 2500) + GNUNET_TIME_relative_multiply (GNUNET_TIME_UNIT_MILLISECONDS, 2500) /** * Generate the base URL for the given merchant instance. @@ -3868,6 +3868,15 @@ phase_parse_request (struct OrderContext *oc) /* parse the lock_uuids (optionally given) */ if (NULL != uuid) { + if (json_array_size (uuid) > MAX_PRODUCTS) + { + GNUNET_break_op (0); + reply_with_error (oc, + MHD_HTTP_BAD_REQUEST, + TALER_EC_GENERIC_PARAMETER_MALFORMED, + "lock_uuids (too many)"); + return; + } GNUNET_array_grow (oc->parse_request.uuids, oc->parse_request.uuids_length, json_array_size (uuid));