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

Faster room joins: device_lists.left not emitted in /sync response when completing the join and discovering that a user is actually not in the room #13886

Open
squahtx opened this issue Sep 23, 2022 · 3 comments
Labels
A-Device-List-Tracking Telling clients about other devices. Often related to E2EE. A-Federated-Join joins over federation generally suck 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

@squahtx
Copy link
Contributor

squahtx commented Sep 23, 2022

See the commented out check in the TestPartialStateJoin/Device_list_tracking/Device_list_no_longer_tracked_for_user_incorrectly_believed_to_be_in_room complement test.

That test case is roughly:

  1. A room starts with @charlie:remote, @derek:remote (moderator) and @fred:remote (admin)
  2. @fred:remote leaves the room.
  3. @alice:local partial state joins the room.
  4. @elsie:remote joins the room.
  5. @fred:remote "bans" @derek:remote, citing their join event as auth. The local homeserver does not know that @fred:remote is no longer in the room and accepts the event.
  6. @derek:remote kicks @elsie:remote. The local homeserver incorrectly rejects the kick because it thinks @derek:remote has been banned.
  7. The partial state join completes and @elsie:remote is discovered to really have been kicked.
  8. No device_lists.left entry is emitted.
@squahtx squahtx added A-Federated-Join joins over federation generally suck S-Minor Blocks non-critical functionality, workarounds exist. O-Uncommon Most users are unlikely to come across this or unexpected workflow A-Device-List-Tracking Telling clients about other devices. Often related to E2EE. labels Sep 23, 2022
@H-Shay H-Shay added the T-Defect Bugs, crashes, hangs, security vulnerabilities, or other reported issues. label Sep 23, 2022
@squahtx
Copy link
Contributor Author

squahtx commented Sep 23, 2022

This bug likely also applies to /keys/changes both ways (missing changed when discovering a user is actually in a room and missing left when a user is actually not in a room). We only have a complement test for the missing left scenario.

@richvdh
Copy link
Member

richvdh commented Oct 4, 2022

This is likely already an issue if the user is state-reset out.

See also #13650

@DMRobertson
Copy link
Contributor

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
A-Device-List-Tracking Telling clients about other devices. Often related to E2EE. A-Federated-Join joins over federation generally suck 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

4 participants