Files
npub1mn7jgtj4w2pd0g0zeuhxsa6jy6p0rewxz4kujt98my82ahfmp72sxjexk7andWill Pfleger 9dc0dd48db feat(relay): add BUZZ_AGENT_SHARING_DISABLED flag and tighten channel_add_policy default
Security: any relay member could add any agent to any channel because
channel_add_policy defaulted to 'anyone'. Two targeted fixes:

1. Migration 0005 changes the column default from 'anyone' to 'owner_only'
   so new agents start safe on all relays.

2. BUZZ_AGENT_SHARING_DISABLED=true enables relay-wide enforcement:
   - kind:9000 PUT_USER targeting an agent is rejected unless the actor
     is the agent's owner (pre-storage, returns NIP-01 NOTICE).
   - kind:10100 setting channel_add_policy='anyone' is blocked (the DB
     column is not updated; the event is stored but has no effect).
   - On startup, all existing channel_add_policy='anyone' rows are
     clamped to 'owner_only' (idempotent, runs every restart while
     the flag is set).

Co-authored-by: Will Pfleger <pfleger.will@gmail.com>
Signed-off-by: Will Pfleger <pfleger.will@gmail.com>
2026-06-25 18:23:35 -04:00
..