commit b9f0772bb43ee9c15cc70bd145c8a5167d083a03
parent 3e62f34f3fcb40333b2ca36f4821a174d1b6ea03
Author: Christian Grothoff <grothoff@gnunet.org>
Date: Thu, 28 Aug 2025 05:23:42 +0200
fix #10291
Diffstat:
1 file changed, 8 insertions(+), 8 deletions(-)
diff --git a/src/backenddb/pg_lookup_login_tokens.c b/src/backenddb/pg_lookup_login_tokens.c
@@ -1,6 +1,6 @@
/*
This file is part of TALER
- Copyright (C) 2022 Taler Systems SA
+ Copyright (C) 2025 Taler Systems SA
TALER is free software; you can redistribute it and/or modify it under the
terms of the GNU General Public License as published by the Free Software
@@ -14,8 +14,8 @@
TALER; see the file COPYING. If not, see <http://www.gnu.org/licenses/>
*/
/**
- * @file backenddb/pg_lookup_products.c
- * @brief Implementation of the lookup_products function for Postgres
+ * @file backenddb/pg_lookup_login_tokens.c
+ * @brief Implementation of the lookup_login_tokens function for Postgres
* @author Iván Ávalos
*/
#include "platform.h"
@@ -146,14 +146,14 @@ TMH_PG_lookup_login_tokens (void *cls,
" JOIN merchant_instances"
" USING (merchant_serial)"
" WHERE merchant_instances.merchant_id=$1"
- " AND expiration_time > $2"
+ " AND expiration_time > $2"
+ " AND serial > $3"
" ORDER BY serial ASC"
- " OFFSET $3"
" LIMIT $4");
PREPARE (pg,
"lookup_login_tokens_desc",
"SELECT"
- " token"
+ " token"
",serial"
",creation_time"
",expiration_time"
@@ -163,9 +163,9 @@ TMH_PG_lookup_login_tokens (void *cls,
" JOIN merchant_instances"
" USING (merchant_serial)"
" WHERE merchant_instances.merchant_id=$1"
- " AND expiration_time > $2"
+ " AND expiration_time > $2"
+ " AND serial < $3"
" ORDER BY serial DESC"
- " OFFSET $3"
" LIMIT $4");
qs = GNUNET_PQ_eval_prepared_multi_select (
pg->conn,