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.release-v1.2.1
parent
70e18cee00
commit
0f2ecb961e
|
@ -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:
|
||||
|
|
Loading…
Reference in New Issue