mirror of
https://git.anonymousland.org/anonymousland/synapse.git
synced 2024-12-25 22:29:24 -05:00
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.
This commit is contained in:
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
Block a user