mirror of
https://github.com/fiatjaf/nak.git
synced 2026-06-05 02:01:27 +02:00
gift unwrap: override rumor pubkey from seal and recompute ID
NIP-17 requires clients verify that the kind:14 pubkey matches the kind:13 pubkey to prevent sender impersonation. The CLI gift unwrap path outputs the rumor as-is without setting the pubkey from the verified seal or recomputing the event ID. This mirrors nip59.GiftUnwrap() which does both operations. The override is placed after the ZeroID sentinel check to preserve decryption failure detection. Fixes https://github.com/fiatjaf/nak/issues/110 Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
This commit is contained in:
Reference in New Issue
Block a user