diff options
author | Richard van der Hoff <1389908+richvdh@users.noreply.github.com> | 2019-10-08 09:35:37 +0100 |
---|---|---|
committer | Amber Brown <hawkowl@atleastfornow.net> | 2019-10-08 09:35:37 +0100 |
commit | b94a401852a5b6d87455285ea050c4e0731dd6ab (patch) | |
tree | 7d692b4049d13ea066e2bee57525caa5e3ca31d8 | |
parent | fix changelog (diff) | |
download | synapse-b94a401852a5b6d87455285ea050c4e0731dd6ab.tar.xz |
Fix /federation/v1/state for recent room versions (#6170)
* Fix /federation/v1/state for recent room versions Turns out this endpoint was completely broken for v3 rooms. Hopefully this re-signing code is irrelevant nowadays anyway.
Diffstat (limited to '')
-rw-r--r-- | changelog.d/6170.bugfix | 1 | ||||
-rw-r--r-- | synapse/federation/federation_server.py | 13 |
2 files changed, 1 insertions, 13 deletions
diff --git a/changelog.d/6170.bugfix b/changelog.d/6170.bugfix new file mode 100644 index 0000000000..52f7ea233c --- /dev/null +++ b/changelog.d/6170.bugfix @@ -0,0 +1 @@ +Fix /federation/v1/state endpoint for recent room versions. diff --git a/synapse/federation/federation_server.py b/synapse/federation/federation_server.py index da06ab379d..21e52c9695 100644 --- a/synapse/federation/federation_server.py +++ b/synapse/federation/federation_server.py @@ -36,7 +36,6 @@ from synapse.api.errors import ( UnsupportedRoomVersionError, ) from synapse.api.room_versions import KNOWN_ROOM_VERSIONS -from synapse.crypto.event_signing import compute_event_signature from synapse.events import room_version_to_event_format from synapse.federation.federation_base import FederationBase, event_from_pdu_json from synapse.federation.persistence import TransactionActions @@ -322,18 +321,6 @@ class FederationServer(FederationBase): pdus = yield self.handler.get_state_for_pdu(room_id, event_id) auth_chain = yield self.store.get_auth_chain([pdu.event_id for pdu in pdus]) - for event in auth_chain: - # We sign these again because there was a bug where we - # incorrectly signed things the first time round - if self.hs.is_mine_id(event.event_id): - event.signatures.update( - compute_event_signature( - event.get_pdu_json(), - self.hs.hostname, - self.hs.config.signing_key[0], - ) - ) - return { "pdus": [pdu.get_pdu_json() for pdu in pdus], "auth_chain": [pdu.get_pdu_json() for pdu in auth_chain], |