summary refs log tree commit diff
path: root/synapse
diff options
context:
space:
mode:
authorMark Haines <mark.haines@matrix.org>2016-07-26 16:39:14 +0100
committerMark Haines <mark.haines@matrix.org>2016-07-26 16:39:14 +0100
commitc824b29e77cd1745f8ac14f2a73c3b8590acaac9 (patch)
tree8f0a217dd0b46266b6ea1b08b8f15237256e8c67 /synapse
parentFix typo (diff)
downloadsynapse-c824b29e77cd1745f8ac14f2a73c3b8590acaac9.tar.xz
Check if the user is banned when handling 3pid invites
Diffstat (limited to '')
-rw-r--r--synapse/api/auth.py4
1 files changed, 4 insertions, 0 deletions
diff --git a/synapse/api/auth.py b/synapse/api/auth.py
index eca8513905..f399aa8c7c 100644
--- a/synapse/api/auth.py
+++ b/synapse/api/auth.py
@@ -376,6 +376,10 @@ class Auth(object):
         if Membership.INVITE == membership and "third_party_invite" in event.content:
             if not self._verify_third_party_invite(event, auth_events):
                 raise AuthError(403, "You are not invited to this room.")
+            if target_banned:
+                raise AuthError(
+                    403, "%s is banned from the room" % (target_user_id,)
+                )
             return True
 
         if Membership.JOIN != membership: