diff --git a/changelog.d/18746.bugfix b/changelog.d/18746.bugfix new file mode 100644 index 000000000..b80a880c0 --- /dev/null +++ b/changelog.d/18746.bugfix @@ -0,0 +1 @@ +Fix a bug which could corrupt auth chains making it impossible to perform state resolution. diff --git a/synapse/handlers/federation_event.py b/synapse/handlers/federation_event.py index 2ef7e77b1..511394c66 100644 --- a/synapse/handlers/federation_event.py +++ b/synapse/handlers/federation_event.py @@ -1728,6 +1728,9 @@ class FederationEventHandler: event, auth_event_id, ) + # Drop the event from the auth_map too, else we may incorrectly persist + # events which depend on this dropped event. + auth_map.pop(event.event_id, None) return auth.append(ae)