diff options
author | Richard van der Hoff <1389908+richvdh@users.noreply.github.com> | 2022-02-21 19:27:35 +0000 |
---|---|---|
committer | GitHub <noreply@github.com> | 2022-02-21 19:27:35 +0000 |
commit | 3070af4809016f547adf55fb02dbe9e569590f7e (patch) | |
tree | 370845e3044592c664a30f564f53b2799a68db5f /synapse/federation/federation_client.py | |
parent | Minor typing fixes (#12034) (diff) | |
download | synapse-3070af4809016f547adf55fb02dbe9e569590f7e.tar.xz |
remote join processing: get create event from state, not auth_chain (#12039)
A follow-up to #12005, in which I apparently missed that there are a bunch of other places that assume the create event is in the auth chain.
Diffstat (limited to 'synapse/federation/federation_client.py')
-rw-r--r-- | synapse/federation/federation_client.py | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/synapse/federation/federation_client.py b/synapse/federation/federation_client.py index 9f56f97d99..48c90bf0bb 100644 --- a/synapse/federation/federation_client.py +++ b/synapse/federation/federation_client.py @@ -870,13 +870,15 @@ class FederationClient(FederationBase): for s in signed_state: s.internal_metadata = copy.deepcopy(s.internal_metadata) - # double-check that the same create event has ended up in the auth chain + # double-check that the auth chain doesn't include a different create event auth_chain_create_events = [ e.event_id for e in signed_auth if (e.type, e.state_key) == (EventTypes.Create, "") ] - if auth_chain_create_events != [create_event.event_id]: + if auth_chain_create_events and auth_chain_create_events != [ + create_event.event_id + ]: raise InvalidResponseError( "Unexpected create event(s) in auth chain: %s" % (auth_chain_create_events,) |