Files
floonet-strfry/plugin
2ro 55231dabb8 plugin: reject expiration tags and malformed recipients on gift wraps
strfry's only automatic event-deletion trigger is a NIP-40 expiration tag,
reaped every ~9s. A Grin payment gift wrap (kind 1059) must never carry
one, so add a write-policy check that rejects it at admission. Also
require exactly one well-formed p tag (32-byte hex recipient) on 1059s so
a malformed gift wrap the recipient's client cannot route never lands on
the relay either.

Two new checks (check_giftwrap_expiration, check_giftwrap_recipient),
wired into CHECKS right after the kind whitelist so only already-allowed
1059s are inspected. Both fail closed on malformed tags, matching every
other check in this plugin. No change to the allowlist, auth, or paid-write
gate.
2026-07-09 19:47:43 -04:00
..