merchant

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

commit 290233090d74802f7f3168a116687d1446d1fb40
parent b5022969e8adf294094eb0cf92d058d466c0f1f6
Author: Christian Grothoff <grothoff@gnunet.org>
Date:   Thu, 16 Jul 2026 14:39:04 +0200

handle invalid response from donau nicely

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

diff --git a/src/backend/taler-merchant-httpd_post-orders-ORDER_ID-pay.c b/src/backend/taler-merchant-httpd_post-orders-ORDER_ID-pay.c @@ -2242,6 +2242,7 @@ merchant_donau_issue_receipt_cb ( const struct DONAU_BatchIssueResponse *resp) { struct PayContext *pc = cls; + /* Donau replies asynchronously, so we expect the PayContext * to be suspended. */ GNUNET_assert (GNUNET_YES == pc->suspended); @@ -2259,7 +2260,16 @@ merchant_donau_issue_receipt_cb ( resp->hr.hint); return; case MHD_HTTP_OK: - case MHD_HTTP_CREATED: + if (pc->parse_wallet_data.num_bkps != + resp->details.ok.num_blinded_sigs) + { + GNUNET_log (GNUNET_ERROR_TYPE_ERROR, + "Invalid number of signatures in batch issue response"); + resume_pay_with_error (pc, + TALER_EC_MERCHANT_GENERIC_DONAU_INVALID_RESPONSE, + "invalid number of signatures"); + return; + } if (TALER_EC_NONE != resp->hr.ec) { /* Most probably, it is just some small flaw from