summary refs log tree commit diff
path: root/synapse/handlers
diff options
context:
space:
mode:
authorRichard van der Hoff <1389908+richvdh@users.noreply.github.com>2019-12-16 13:14:37 +0000
committerGitHub <noreply@github.com>2019-12-16 13:14:37 +0000
commit6920d88892e77aec787b6afc0e01e6e09dc36216 (patch)
tree660ed70a4d95cb3e48f387e3fb725430e3f761b8 /synapse/handlers
parentPersist auth/state events at backwards extremities when we fetch them (#6526) (diff)
downloadsynapse-6920d88892e77aec787b6afc0e01e6e09dc36216.tar.xz
Exclude rejected state events when calculating state at backwards extrems (#6527)
This fixes a weird bug where, if you were determined enough, you could end up with a rejected event forming part of the state at a backwards-extremity. Authing that backwards extrem would then lead to us trying to pull the rejected event from the db (with allow_rejected=False), which would fail with a 404.
Diffstat (limited to 'synapse/handlers')
-rw-r--r--synapse/handlers/federation.py2
1 files changed, 1 insertions, 1 deletions
diff --git a/synapse/handlers/federation.py b/synapse/handlers/federation.py
index 3f480f2056..3fccccfecd 100644
--- a/synapse/handlers/federation.py
+++ b/synapse/handlers/federation.py
@@ -605,7 +605,7 @@ class FederationHandler(BaseHandler):
             remote_event = event_map.get(event_id)
             if not remote_event:
                 raise Exception("Unable to get missing prev_event %s" % (event_id,))
-            if remote_event.is_state():
+            if remote_event.is_state() and remote_event.rejected_reason is None:
                 remote_state.append(remote_event)
 
         auth_chain = [event_map[e_id] for e_id in auth_event_ids if e_id in event_map]