merchant

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

commit c410fd2f73033f7e178be2642d020e866bed8df0
parent 9c39c3c13dd0d9ff104173efbc8217722271a508
Author: Christian Grothoff <christian@grothoff.org>
Date:   Mon,  4 Nov 2024 21:35:35 +0100

-bugfix

Diffstat:
Msrc/backend/taler-merchant-httpd_private-get-transfers.c | 24++++++++++++++++++------
1 file changed, 18 insertions(+), 6 deletions(-)

diff --git a/src/backend/taler-merchant-httpd_private-get-transfers.c b/src/backend/taler-merchant-httpd_private-get-transfers.c @@ -1,6 +1,6 @@ /* This file is part of TALER - (C) 2014-2021 Taler Systems SA + (C) 2014-2024 Taler Systems SA TALER is free software; you can redistribute it and/or modify it under the terms of the GNU Affero General Public License as published by the Free Software @@ -96,7 +96,9 @@ TMH_private_get_transfers (const struct TMH_RequestHandler *rh, struct MHD_Connection *connection, struct TMH_HandlerContext *hc) { - struct TALER_FullPayto payto_uri; + struct TALER_FullPayto payto_uri = { + .full_payto = NULL + }; struct GNUNET_TIME_Timestamp before = GNUNET_TIME_UNIT_FOREVER_TS; struct GNUNET_TIME_Timestamp after = GNUNET_TIME_UNIT_ZERO_TS; int64_t limit = -20; @@ -104,10 +106,19 @@ TMH_private_get_transfers (const struct TMH_RequestHandler *rh, enum TALER_EXCHANGE_YesNoAll verified; (void) rh; - payto_uri.full_payto - = (char *) MHD_lookup_connection_value (connection, - MHD_GET_ARGUMENT_KIND, - "payto_uri"); + { + const char *esc_payto; + + esc_payto = MHD_lookup_connection_value (connection, + MHD_GET_ARGUMENT_KIND, + "payto_uri"); + if (NULL != esc_payto) + { + payto_uri.full_payto + = GNUNET_strdup (esc_payto); + MHD_http_unescape (payto_uri.full_payto); + } + } { const char *before_s; @@ -174,6 +185,7 @@ TMH_private_get_transfers (const struct TMH_RequestHandler *rh, verified, &transfer_cb, ja); + GNUNET_free (payto_uri.full_payto); if (0 > qs) { /* Simple select queries should not cause serialization issues */