exchange

Base system with REST service to issue digital coins, run by the payment service provider
Log | Files | Refs | Submodules | README | LICENSE

commit d6639fd62c41aa978412111538b30c252d680bff
parent fd89c8dc8a27e53191af6c83c3b7e67e2a26a076
Author: Christian Grothoff <christian@grothoff.org>
Date:   Sun, 12 Jul 2026 21:46:14 +0200

enforce max-coins also on reserve open

Diffstat:
Msrc/exchange/taler-exchange-httpd_post-reserves-RESERVE_PUB-open.c | 8++++++++
1 file changed, 8 insertions(+), 0 deletions(-)

diff --git a/src/exchange/taler-exchange-httpd_post-reserves-RESERVE_PUB-open.c b/src/exchange/taler-exchange-httpd_post-reserves-RESERVE_PUB-open.c @@ -361,6 +361,14 @@ TEH_handler_reserves_open (struct TEH_RequestContext *rc, } } + if (json_array_size (payments) > TALER_MAX_COINS) + { + GNUNET_break_op (0); + return TALER_MHD_reply_with_error (rc->connection, + MHD_HTTP_BAD_REQUEST, + TALER_EC_GENERIC_PARAMETER_MALFORMED, + "payments"); + } rsc.payments_len = json_array_size (payments); rsc.payments = GNUNET_new_array (rsc.payments_len, struct TEH_PurseDepositedCoin);