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:
committed by
Daniel D’Aquino
parent
a040a0244b
commit
d565eb20f7
@@ -4112,6 +4112,9 @@ static int ndb_query_plan_execute_author_kinds(
|
|||||||
if (pkey->timestamp < since)
|
if (pkey->timestamp < since)
|
||||||
break;
|
break;
|
||||||
|
|
||||||
|
if (memcmp(pkey->id, author, 32))
|
||||||
|
break;
|
||||||
|
|
||||||
note_id = *(uint64_t*)v.mv_data;
|
note_id = *(uint64_t*)v.mv_data;
|
||||||
if (!(note = ndb_get_note_by_key(txn, note_id, ¬e_size)))
|
if (!(note = ndb_get_note_by_key(txn, note_id, ¬e_size)))
|
||||||
goto next;
|
goto next;
|
||||||
|
|||||||
Reference in New Issue
Block a user