diff options
author | Erik Johnston <erik@matrix.org> | 2015-05-19 14:15:05 +0100 |
---|---|---|
committer | Erik Johnston <erik@matrix.org> | 2015-05-19 14:16:08 +0100 |
commit | 722312991694846045fae31ec6e0cbbbc59c6a33 (patch) | |
tree | ca3bb2ecfb73f1e9c884ff7a61e08dddfe1130fd | |
parent | Don't always hit get_server_verify_key_v1_direct (diff) | |
download | synapse-722312991694846045fae31ec6e0cbbbc59c6a33.tar.xz |
Don't apply new room join hack if depth > 5
Diffstat (limited to '')
-rw-r--r-- | synapse/handlers/federation.py | 9 |
1 files changed, 6 insertions, 3 deletions
diff --git a/synapse/handlers/federation.py b/synapse/handlers/federation.py index 03f8444ad5..d85b1cf5de 100644 --- a/synapse/handlers/federation.py +++ b/synapse/handlers/federation.py @@ -924,9 +924,12 @@ class FederationHandler(BaseHandler): # This is a hack to fix some old rooms where the initial join event # didn't reference the create event in its auth events. if event.type == EventTypes.Member and not event.auth_events: - if len(event.prev_events) == 1: - c = yield self.store.get_event(event.prev_events[0][0]) - if c.type == EventTypes.Create: + if len(event.prev_events) == 1 and event.depth < 5: + c = yield self.store.get_event( + event.prev_events[0][0], + allow_none=True, + ) + if c and c.type == EventTypes.Create: auth_events[(c.type, c.state_key)] = c try: |