Unintentional Mutation: SpaceJoin Publishes Signed Requests on Mount #263

Closed
opened 2026-05-03 11:48:44 +00:00 by Khushvendra · 1 comment
Contributor

Description

Opening the "Join Space" modal immediately fires off a signed RELAY_JOIN Nostr event to the relay before the user has actually confirmed their intent to join.

Code References

  • SpaceJoin.svelte (Line 77): onMount immediately calls attemptRelayAccess(url) to check for errors/access.
  • commands.ts (Lines 232-265): attemptRelayAccess connects to the socket, attempts auth, and on line 258 explicitly calls publishJoinRequest({url, claim}).
  • commands.ts (Lines 480-484): publishJoinRequest publishes a signed RELAY_JOIN event.

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.

### Description Opening the "Join Space" modal immediately fires off a signed `RELAY_JOIN` Nostr event to the relay before the user has actually confirmed their intent to join. ### Code References * `SpaceJoin.svelte` (Line 77): `onMount` immediately calls `attemptRelayAccess(url)` to check for errors/access. * `commands.ts` (Lines 232-265): `attemptRelayAccess` connects to the socket, attempts auth, and on line 258 explicitly calls `publishJoinRequest({url, claim})`. * `commands.ts` (Lines 480-484): `publishJoinRequest` publishes a signed `RELAY_JOIN` event. ### 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.
Owner

Fixed in 341c1b45b2

Fixed in 341c1b45b2f270e0402070b19a76de04e38050cb
Sign in to join this conversation.
2 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: coracle/flotilla#263