summary refs log tree commit diff
path: root/synapse/event_auth.py
diff options
context:
space:
mode:
authorPatrick Cloke <clokep@users.noreply.github.com>2020-10-05 10:24:17 -0400
committerGitHub <noreply@github.com>2020-10-05 10:24:17 -0400
commitda11cc22be37e8858c19774779ad7d02d64a458c (patch)
tree9fde7b9187b6ae784aa8f762309bd7a4d7636537 /synapse/event_auth.py
parentAllow ThirdPartyEventRules modules to manipulate public room state (#8292) (diff)
downloadsynapse-da11cc22be37e8858c19774779ad7d02d64a458c.tar.xz
Ensure that event.redacts is the proper type before handling it (#8457)
This fixes a bug when backfilling invalid events.
Diffstat (limited to 'synapse/event_auth.py')
-rw-r--r--synapse/event_auth.py2
1 files changed, 2 insertions, 0 deletions
diff --git a/synapse/event_auth.py b/synapse/event_auth.py
index 8c907ad596..56f8dc9caf 100644
--- a/synapse/event_auth.py
+++ b/synapse/event_auth.py
@@ -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