Skip to content
Snippets Groups Projects
Commit 0f2ecb96 authored by Richard van der Hoff's avatar Richard van der Hoff
Browse files

Fix DoS when there is a cycle in redaction events

Make sure that synapse doesn't explode when a redaction redacts itself, or
there is a larger cycle.
parent 70e18cee
No related branches found
No related tags found
No related merge requests found
......@@ -637,6 +637,10 @@ class EventsWorkerStore(SQLBaseStore):
# we choose to ignore redactions of m.room.create events.
return None
if original_ev.type == "m.room.redaction":
# ... and redaction events
return None
redaction_map = yield self._get_events_from_cache_or_db(redactions)
for redaction_id in redactions:
......
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