summary refs log tree commit diff
path: root/synapse/api
diff options
context:
space:
mode:
authorDaniel Wagner-Hall <daniel@matrix.org>2015-09-01 11:53:31 +0100
committerDaniel Wagner-Hall <daniel@matrix.org>2015-09-01 11:53:31 +0100
commitb854a375b0a859f8c4e16adf9f2fcec75b5a6816 (patch)
treee22037ce53754e46913326b1493906f211162c90 /synapse/api
parentMerge branch 'develop' into redactyoself (diff)
downloadsynapse-b854a375b0a859f8c4e16adf9f2fcec75b5a6816.tar.xz
Check domain of events properly
Federated servers still need to delegate authority to owning servers
Diffstat (limited to '')
-rw-r--r--synapse/api/auth.py4
1 files changed, 3 insertions, 1 deletions
diff --git a/synapse/api/auth.py b/synapse/api/auth.py
index f63d2daad8..0c0d678562 100644
--- a/synapse/api/auth.py
+++ b/synapse/api/auth.py
@@ -561,7 +561,9 @@ class Auth(object):
         if user_level > redact_level:
             return False
 
-        if EventID.from_string(event.redacts).domain == self.hs.get_config().server_name:
+        redacter_domain = EventID.from_string(event.event_id).domain
+        redactee_domain = EventID.from_string(event.redacts).domain
+        if redacter_domain == redactee_domain:
             return True
 
         raise AuthError(