aharshit123456 57a7d3d955 fix: verify signature before dedup in GeohashMessageHandler
Per Codex review on PR #743: the previous ordering called dedupe(event.id)
before isValidSignature(), so a forged event (bad signature, but a
content-derived id matching a legitimate event) would get its id marked
as "seen" and dropped — permanently poisoning the dedup cache. When the
genuine, validly-signed copy of the same event later arrived (e.g. via a
different relay), it was then silently discarded too, as an apparent
duplicate.

Move the signature check ahead of dedupe() so only genuinely-authenticated
event ids are ever cached, matching the ordering already used correctly in
NostrClient.handleGeohashMessage() and LocationNotesManager.handleEvent().

Adds a regression test that reproduces the exact scenario: a forged event
is rejected first, then a genuine event with the same id must still be
rendered (previously failed against the pre-fix ordering).

Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
2026-07-26 14:48:27 +05:30
..
2026-06-25 22:48:26 +02:00
2025-12-14 21:55:41 +07:00