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

Drop incoming events from federation for unknown rooms #4166

Merged
merged 6 commits into from
Nov 9, 2018

Conversation

erikjohnston
Copy link
Member

We need to do this as in future we'll need to know the version of the room before being able to parse the event fully.

When we receive events over federation we will need to know the room
version to be able to correctly handle them, e.g. once we start changing
event formats. Currently, we attempt to handle events in unknown rooms.
@erikjohnston erikjohnston requested a review from a team November 8, 2018 12:35
Copy link
Member

@richvdh richvdh left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

looks good so far.

There is some code in FederationHandler.on_receive_pdu which checks if we're currently in a room for a given event, and if we're not, then allows the event through in the special case that we have never been in that room. I think that should be simplified.

synapse/federation/federation_server.py Outdated Show resolved Hide resolved
synapse/federation/federation_server.py Outdated Show resolved Hide resolved
@richvdh
Copy link
Member

richvdh commented Nov 8, 2018

Fixes #3422?

@erikjohnston erikjohnston requested a review from richvdh November 9, 2018 11:37
Copy link
Member

@richvdh richvdh left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

\o/ lgtm

@erikjohnston erikjohnston merged commit db5a1c0 into develop Nov 9, 2018
@erikjohnston erikjohnston deleted the erikj/drop_unknown_events branch December 12, 2018 15:44
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants