nostrdb: query: enforce author matches in author_kind queries

before we weren't checking this, meaning we were getting
results from other keys. oops.

Reported-by: Jeff Gardner
Fixes: #84
Signed-off-by: William Casarin <jb55@jb55.com>
This commit is contained in:
William Casarin
2025-07-17 10:43:35 -07:00
committed by Daniel D’Aquino
parent a040a0244b
commit d565eb20f7

View File

@@ -4112,6 +4112,9 @@ static int ndb_query_plan_execute_author_kinds(
if (pkey->timestamp < since)
break;
if (memcmp(pkey->id, author, 32))
break;
note_id = *(uint64_t*)v.mv_data;
if (!(note = ndb_get_note_by_key(txn, note_id, &note_size)))
goto next;