diff options
author | Mark Haines <mjark@negativecurvature.net> | 2016-07-26 19:20:56 +0100 |
---|---|---|
committer | GitHub <noreply@github.com> | 2016-07-26 19:20:56 +0100 |
commit | c63b1697f441fd09de6c4b6ae4181d39c7a66e0c (patch) | |
tree | 5361907ff2c506b91219457c5f732be1ae59f9da /synapse/api/auth.py | |
parent | Merge pull request #953 from matrix-org/rav/requester (diff) | |
parent | Check if the user is banned when handling 3pid invites (diff) | |
download | synapse-c63b1697f441fd09de6c4b6ae4181d39c7a66e0c.tar.xz |
Merge pull request #952 from matrix-org/markjh/more_fixes
Check if the user is banned when handling 3pid invites
Diffstat (limited to 'synapse/api/auth.py')
-rw-r--r-- | synapse/api/auth.py | 4 |
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: |