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>
The CLI gift unwrap path skips seal signature verification that
nip59.GiftUnwrap() performs. Without this check, a forged seal
with an arbitrary pubkey would be trusted for decryption key
lookup and sender identity.
Fixes https://github.com/fiatjaf/nak/issues/110
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>