summary refs log tree commit diff
path: root/synapse/federation/federation_server.py
diff options
context:
space:
mode:
authorErik Johnston <erik@matrix.org>2019-01-29 17:21:48 +0000
committerErik Johnston <erik@matrix.org>2019-01-29 18:02:02 +0000
commit840068bd787dbf4a8640549578af5ad39b8fb156 (patch)
tree1eebdfefb93f1d3c58698f5bf5921615472d3d94 /synapse/federation/federation_server.py
parentUse event origin for filtering incoming events (diff)
downloadsynapse-840068bd787dbf4a8640549578af5ad39b8fb156.tar.xz
Only check event ID domain for signatures for V1 events
In future version events won't have an event ID, so we won't be able to
do this check.
Diffstat (limited to 'synapse/federation/federation_server.py')
-rw-r--r--synapse/federation/federation_server.py5
1 files changed, 4 insertions, 1 deletions
diff --git a/synapse/federation/federation_server.py b/synapse/federation/federation_server.py
index 5c3784c560..aeadc9c564 100644
--- a/synapse/federation/federation_server.py
+++ b/synapse/federation/federation_server.py
@@ -645,9 +645,12 @@ class FederationServer(FederationBase):
                     pdu.event_id, origin
                 )
 
+        # We've already checked that we know the room version by this point
+        room_version = yield self.store.get_room_version(pdu.room_id)
+
         # Check signature.
         try:
-            pdu = yield self._check_sigs_and_hash(pdu)
+            pdu = yield self._check_sigs_and_hash(room_version, pdu)
         except SynapseError as e:
             raise FederationError(
                 "ERROR",