Skip to content
This repository has been archived by the owner on Apr 26, 2024. It is now read-only.

Disinviting users over federation doesn't work #4808

Open
turt2live opened this issue Mar 6, 2019 · 2 comments
Open

Disinviting users over federation doesn't work #4808

turt2live opened this issue Mar 6, 2019 · 2 comments
Labels
A-Federation A-Invite Inviting users to rooms and accepting invites O-Uncommon Most users are unlikely to come across this or unexpected workflow S-Minor Blocks non-critical functionality, workarounds exist. T-Defect Bugs, crashes, hangs, security vulnerabilities, or other reported issues.

Comments

@turt2live
Copy link
Member

turt2live commented Mar 6, 2019

Riot issue: element-hq/element-web#7318

As mentioned in element-hq/element-web#7318 (comment), this is a different case from #2181 due to Synapse not sending the disinvite over federation to the target homeserver.

As a simple test case:

  1. Create a room on Server A
  2. Invite a user from Server B to the room
  3. Before they accept, disinvite them
  4. That user now has a stuck invite

Server A never notifies Server B of the disinvite (leave event), and therefore Server B can't really do anything about it. If the user tries to respond to the event, Server B could realize that 403 on join (or declination of the invite) means it should be locally rejected. At that point, you're in #2181 territory.

When Server A is modified to make calls to Server B by sending the disinvite in a transaction, Server B accepts the transaction but ignores the event because it cannot determine the room version (and therefore the event format version). A lightly tested and highly unstable branch for modifying Server A to send the event is available here: 16c8b4e...travis/fix-stuck-invites

Patching Server B's behaviour is non-trivial to me, otherwise I'd just fix it. Would be good if this fix was partnered with spec to clarify that disinvite (leave) events should be sent to target hosts, and that target hosts should expect them. I don't think this is introducing anything new, and shouldn't need a dedicated endpoint either.

@turt2live
Copy link
Member Author

worth noting that fixing this would also fix #1563 (probably)

@richvdh richvdh added the A-Stuck-Invite Incoming invitations that won't go away label Mar 6, 2019
@ara4n ara4n added z-bug (Deprecated Label) p1 labels May 28, 2019
@richvdh
Copy link
Member

richvdh commented Jul 9, 2020

This is no longer a stuck-invite issue thanks to the fix for #2181; however it's still a bug because the invite should disappear when the user is disinvited.

@richvdh richvdh added z-p2 (Deprecated Label) and removed A-Stuck-Invite Incoming invitations that won't go away p1 labels Jul 9, 2020
@MadLittleMods MadLittleMods added A-Invite Inviting users to rooms and accepting invites T-Defect Bugs, crashes, hangs, security vulnerabilities, or other reported issues. labels May 16, 2022
@erikjohnston erikjohnston added S-Minor Blocks non-critical functionality, workarounds exist. O-Uncommon Most users are unlikely to come across this or unexpected workflow and removed z-bug (Deprecated Label) z-p2 (Deprecated Label) labels Nov 15, 2022
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
A-Federation A-Invite Inviting users to rooms and accepting invites O-Uncommon Most users are unlikely to come across this or unexpected workflow S-Minor Blocks non-critical functionality, workarounds exist. T-Defect Bugs, crashes, hangs, security vulnerabilities, or other reported issues.
Projects
None yet
Development

No branches or pull requests

6 participants