mirror of
https://git.anonymousland.org/anonymousland/synapse.git
synced 2025-05-03 11:44:51 -04:00
Ensure that event.redacts is the proper type before handling it (#8457)
This fixes a bug when backfilling invalid events.
This commit is contained in:
parent
0991a2da93
commit
da11cc22be
2 changed files with 3 additions and 0 deletions
|
@ -446,6 +446,8 @@ def check_redaction(
|
|||
|
||||
if room_version_obj.event_format == EventFormatVersions.V1:
|
||||
redacter_domain = get_domain_from_id(event.event_id)
|
||||
if not isinstance(event.redacts, str):
|
||||
return False
|
||||
redactee_domain = get_domain_from_id(event.redacts)
|
||||
if redacter_domain == redactee_domain:
|
||||
return True
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue