From 79dadf7216836170af2ac5ef130bfc012b86821c Mon Sep 17 00:00:00 2001 From: Richard van der Hoff <1389908+richvdh@users.noreply.github.com> Date: Wed, 1 Jun 2022 12:29:51 +0100 Subject: Fix 404 on `/sync` when the last event is a redaction of an unknown/purged event (#12905) Currently, we try to pull the event corresponding to a sync token from the database. However, when we fetch redaction events, we check the target of that redaction (because we aren't allowed to send redactions to clients without validating them). So, if the sync token points to a redaction of an event that we don't have, we have a problem. It turns out we don't really need that event, and can just work with its ID and metadata, which sidesteps the whole problem. --- changelog.d/12905.bugfix | 1 + 1 file changed, 1 insertion(+) create mode 100644 changelog.d/12905.bugfix (limited to 'changelog.d') diff --git a/changelog.d/12905.bugfix b/changelog.d/12905.bugfix new file mode 100644 index 0000000000..67e95d0398 --- /dev/null +++ b/changelog.d/12905.bugfix @@ -0,0 +1 @@ +Fix a bug introduced in Synapse 1.58.0 where `/sync` would fail if the most recent event in a room was a redaction of an event that has since been purged. -- cgit 1.4.1