diff options
author | Christian Grothoff <christian@grothoff.org> | 2024-11-04 21:35:35 +0100 |
---|---|---|
committer | Christian Grothoff <christian@grothoff.org> | 2024-11-05 10:38:39 +0100 |
commit | c410fd2f73033f7e178be2642d020e866bed8df0 (patch) | |
tree | 3f2db0c8af9ec1025f1e1bc26e902f393c4d2fa9 | |
parent | 9c39c3c13dd0d9ff104173efbc8217722271a508 (diff) |
-bugfix
-rw-r--r-- | src/backend/taler-merchant-httpd_private-get-transfers.c | 24 |
1 files 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 index 0646cb88..94410877 100644 --- 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 */ |