Unintentional Mutation: SpaceJoin Publishes Signed Requests on Mount
#263
Reference in New Issue
Block a user
Delete Branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Description
Opening the "Join Space" modal immediately fires off a signed
RELAY_JOINNostr event to the relay before the user has actually confirmed their intent to join.Code References
SpaceJoin.svelte(Line 77):onMountimmediately callsattemptRelayAccess(url)to check for errors/access.commands.ts(Lines 232-265):attemptRelayAccessconnects to the socket, attempts auth, and on line 258 explicitly callspublishJoinRequest({url, claim}).commands.ts(Lines 480-484):publishJoinRequestpublishes a signedRELAY_JOINevent.Impact
If a user merely clicks a space link to view the modal and then clicks "Go back" or "Cancel", their client has already signed and broadcast a join request. This irreversibly mutates relay-side membership state without explicit user consent.
Fixed in
341c1b45b2