1
0

Exclude rejected state events when calculating state at backwards extrems (#6527)

* commit '6920d8889':
  Exclude rejected state events when calculating state at backwards extrems (#6527)
This commit is contained in:
Andrew Morgan
2020-03-19 18:01:47 +00:00
2 changed files with 2 additions and 1 deletions

1
changelog.d/6527.bugfix Normal file
View File

@@ -0,0 +1 @@
Fix a bug which could cause the federation server to incorrectly return errors when handling certain obscure event graphs.

View File

@@ -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]