Skip to content

Commit 351dbb5

Browse files
committed
Enforces D Param Correctness in Lookup
1 parent fde3c09 commit 351dbb5

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

lib/postgres.js

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -302,6 +302,7 @@ class Postgres {
302302

303303
async _getItemData(links) {
304304
const aValues = links.map(e => utils.unsigned64ToSigned(e.getParams().a));
305+
const dValues = links.map(e => utils.unsigned64ToSigned(e.getParams().d));
305306

306307
const result = await this.pool.query(`
307308
SELECT *,
@@ -326,7 +327,7 @@ class Postgres {
326327
ORDER BY J.paintwear DESC
327328
LIMIT 1000) as b) AS high_rank
328329
FROM items S
329-
WHERE a= ANY($1::bigint[])`, [aValues]);
330+
WHERE a = ANY($1::bigint[]) AND d = ANY($2::bigint[])`, [aValues, dValues]);
330331

331332
return result.rows.map((item) => {
332333
delete item.updated;

0 commit comments

Comments
 (0)