summary refs log tree commit diff
diff options
context:
space:
mode:
authorMark Haines <mjark@negativecurvature.net>2016-07-26 19:20:56 +0100
committerGitHub <noreply@github.com>2016-07-26 19:20:56 +0100
commitc63b1697f441fd09de6c4b6ae4181d39c7a66e0c (patch)
tree5361907ff2c506b91219457c5f732be1ae59f9da
parentMerge pull request #953 from matrix-org/rav/requester (diff)
parentCheck if the user is banned when handling 3pid invites (diff)
downloadsynapse-c63b1697f441fd09de6c4b6ae4181d39c7a66e0c.tar.xz
Merge pull request #952 from matrix-org/markjh/more_fixes
Check if the user is banned when handling 3pid invites
-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 eecf3b0b2a..59db76debc 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: