nostrdb

an unfairly fast embedded nostr database backed by lmdb
git clone git://jb55.com/nostrdb
Log | Files | Refs | Submodules | README | LICENSE

commit b3b79e5a65a89691d3383d2188f738feb452e506
parent b2b6bc65ccf010bda4bda509edcdc31518c585cd
Author: William Casarin <jb55@jb55.com>
Date:   Thu, 17 Jul 2025 10:43:35 -0700

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>

Diffstat:
Msrc/nostrdb.c | 3+++
1 file changed, 3 insertions(+), 0 deletions(-)

diff --git a/src/nostrdb.c b/src/nostrdb.c @@ -4088,6 +4088,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;