mirror of
https://mau.dev/maunium/synapse.git
synced 2024-10-31 03:39:06 +01:00
Merge pull request #1772 from matrix-org/markjh/fix_guest_access_check
handlers/room_member: fix guest access check when joining rooms
This commit is contained in:
commit
2c8ac84a26
1 changed files with 6 additions and 4 deletions
|
@ -232,10 +232,12 @@ class RoomMemberHandler(BaseHandler):
|
||||||
is_host_in_room = yield self._is_host_in_room(current_state_ids)
|
is_host_in_room = yield self._is_host_in_room(current_state_ids)
|
||||||
|
|
||||||
if effective_membership_state == Membership.JOIN:
|
if effective_membership_state == Membership.JOIN:
|
||||||
if requester.is_guest and not self._can_guest_join(current_state_ids):
|
if requester.is_guest:
|
||||||
# This should be an auth check, but guests are a local concept,
|
guest_can_join = yield self._can_guest_join(current_state_ids)
|
||||||
# so don't really fit into the general auth process.
|
if not guest_can_join:
|
||||||
raise AuthError(403, "Guest access not allowed")
|
# This should be an auth check, but guests are a local concept,
|
||||||
|
# so don't really fit into the general auth process.
|
||||||
|
raise AuthError(403, "Guest access not allowed")
|
||||||
|
|
||||||
if not is_host_in_room:
|
if not is_host_in_room:
|
||||||
inviter = yield self.get_inviter(target.to_string(), room_id)
|
inviter = yield self.get_inviter(target.to_string(), room_id)
|
||||||
|
|
Loading…
Reference in a new issue