mirror of
https://github.com/block/buzz.git
synced 2026-11-29 12:42:49 +00:00
A v2 claim took the community-wide admission lock before looking up its token, so forged `v2.` codes from fresh keys could serialize a community's claims, bans and timeouts and hold shared writer-pool connections while queued. Check that the code exists with an indexed read first; the locked `FOR UPDATE` read stays authoritative. A restricted claimant presenting an unknown code now gets `invite_invalid`, which reveals nothing. Also from review: mint's owner-link 503 reuses `OWNER_LINK_ERROR` like the NIP-FI path; comments explain the admission wait behind membership snapshots, the defensive claim-owner revocation, and why issuer restrictions map to `invite_invalid`; TESTING.md notes that a rollback past 0074 needs `BUZZ_AUTO_MIGRATE` off (docs/database.md Rule 5). Co-authored-by: Elrond <28d6302a099e5225b02c4155ac4236e4912603df2ab08dbfc2f4fef08ce598c8@buzz.block.builderlab.xyz> Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Signed-off-by: Luke Tornquist <tornquist@squareup.com>