diff options
author | Patrick Cloke <clokep@users.noreply.github.com> | 2020-03-19 08:22:56 -0400 |
---|---|---|
committer | GitHub <noreply@github.com> | 2020-03-19 08:22:56 -0400 |
commit | c2db6599c820d97e3c8a02d782e90af80121c903 (patch) | |
tree | a2510329ff2115136ec4a9cef23035ff0ce4ce23 /synapse/federation/federation_server.py | |
parent | Change device list streams to have one row per ID (#7010) (diff) | |
download | synapse-c2db6599c820d97e3c8a02d782e90af80121c903.tar.xz |
Fix a bug in the federation API which could cause occasional "Failed to get PDU" errors (#7089).
Diffstat (limited to '')
-rw-r--r-- | synapse/federation/federation_server.py | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/synapse/federation/federation_server.py b/synapse/federation/federation_server.py index 275b9c99d7..89d521bc31 100644 --- a/synapse/federation/federation_server.py +++ b/synapse/federation/federation_server.py @@ -409,7 +409,7 @@ class FederationServer(FederationBase): pdu = event_from_pdu_json(content, room_version) origin_host, _ = parse_server_name(origin) await self.check_server_matches_acl(origin_host, pdu.room_id) - pdu = await self._check_sigs_and_hash(room_version.identifier, pdu) + pdu = await self._check_sigs_and_hash(room_version, pdu) ret_pdu = await self.handler.on_invite_request(origin, pdu, room_version) time_now = self._clock.time_msec() return {"event": ret_pdu.get_pdu_json(time_now)} @@ -425,7 +425,7 @@ class FederationServer(FederationBase): logger.debug("on_send_join_request: pdu sigs: %s", pdu.signatures) - pdu = await self._check_sigs_and_hash(room_version.identifier, pdu) + pdu = await self._check_sigs_and_hash(room_version, pdu) res_pdus = await self.handler.on_send_join_request(origin, pdu) time_now = self._clock.time_msec() @@ -455,7 +455,7 @@ class FederationServer(FederationBase): logger.debug("on_send_leave_request: pdu sigs: %s", pdu.signatures) - pdu = await self._check_sigs_and_hash(room_version.identifier, pdu) + pdu = await self._check_sigs_and_hash(room_version, pdu) await self.handler.on_send_leave_request(origin, pdu) return {} @@ -611,7 +611,7 @@ class FederationServer(FederationBase): logger.info("Accepting join PDU %s from %s", pdu.event_id, origin) # We've already checked that we know the room version by this point - room_version = await self.store.get_room_version_id(pdu.room_id) + room_version = await self.store.get_room_version(pdu.room_id) # Check signature. try: |