summary refs log tree commit diff
diff options
context:
space:
mode:
-rw-r--r--changelog.d/8350.bugfix1
-rw-r--r--synapse/federation/federation_client.py8
2 files changed, 4 insertions, 5 deletions
diff --git a/changelog.d/8350.bugfix b/changelog.d/8350.bugfix
new file mode 100644
index 0000000000..0e493c0282
--- /dev/null
+++ b/changelog.d/8350.bugfix
@@ -0,0 +1 @@
+Partially mitigate bug where newly joined servers couldn't get past events in a room when there is a malformed event.
\ No newline at end of file
diff --git a/synapse/federation/federation_client.py b/synapse/federation/federation_client.py
index a2e8d96ea2..d42930d1b9 100644
--- a/synapse/federation/federation_client.py
+++ b/synapse/federation/federation_client.py
@@ -217,11 +217,9 @@ class FederationClient(FederationBase):
             for p in transaction_data["pdus"]
         ]
 
-        # FIXME: We should handle signature failures more gracefully.
-        pdus[:] = await make_deferred_yieldable(
-            defer.gatherResults(
-                self._check_sigs_and_hashes(room_version, pdus), consumeErrors=True,
-            ).addErrback(unwrapFirstError)
+        # Check signatures and hash of pdus, removing any from the list that fail checks
+        pdus[:] = await self._check_sigs_and_hash_and_fetch(
+            dest, pdus, outlier=True, room_version=room_version
         )
 
         return pdus