Skip to content
Snippets Groups Projects
Unverified Commit 6920d888 authored by Richard van der Hoff's avatar Richard van der Hoff Committed by GitHub
Browse files

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.
parent bc7de876
No related branches found
No related tags found
No related merge requests found
Fix a bug which could cause the federation server to incorrectly return errors when handling certain obscure event graphs.
\ No newline at end of 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]
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment