commit b7c5ae7c26d957fe17eaa4e2a7fe89eb284101d6
parent 28269ff860960b15d01ac37b50e6f803fa3706ce
Author: Florian Dold <dold@taler.net>
Date: Mon, 27 Jul 2026 20:23:15 +0200
only apply max_age to the order listing when it was requested
Issue: https://bugs.taler.net/n/11688
Diffstat:
1 file changed, 9 insertions(+), 3 deletions(-)
diff --git a/src/backend/taler-merchant-httpd_get-private-orders.c b/src/backend/taler-merchant-httpd_get-private-orders.c
@@ -1495,10 +1495,16 @@ TMH_private_get_orders (const struct TMH_RequestHandler *rh,
}
}
}
- if (po->of.delta > 0)
+ if ( (po->of.delta > 0) &&
+ (NULL !=
+ MHD_lookup_connection_value (connection,
+ MHD_GET_ARGUMENT_KIND,
+ "max_age")) )
{
- struct GNUNET_TIME_Relative duration
- = GNUNET_TIME_UNIT_FOREVER_REL;
+ /* Only narrow the range if the client actually asked for it:
+ without the argument, the parser below would set @e duration
+ to zero and thus cut off everything created before *now*. */
+ struct GNUNET_TIME_Relative duration;
struct GNUNET_TIME_Absolute cut_off;
TALER_MHD_parse_request_rel_time (connection,