From 1ef6084b75798e53abe672cd1e80915669619f63 Mon Sep 17 00:00:00 2001 From: Patrik Oldsberg Date: Wed, 28 Dec 2016 17:51:33 +0100 Subject: [PATCH 1/2] handlers/room_member: fix guest access check when joining rooms Signed-off-by: Patrik Oldsberg --- synapse/handlers/room_member.py | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) diff --git a/synapse/handlers/room_member.py b/synapse/handlers/room_member.py index ba49075a20..2f8782e522 100644 --- a/synapse/handlers/room_member.py +++ b/synapse/handlers/room_member.py @@ -232,10 +232,12 @@ class RoomMemberHandler(BaseHandler): is_host_in_room = yield self._is_host_in_room(current_state_ids) if effective_membership_state == Membership.JOIN: - if requester.is_guest and not self._can_guest_join(current_state_ids): - # 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 requester.is_guest: + guest_can_join = yield self._can_guest_join(current_state_ids) + if not guest_can_join: + # 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: inviter = yield self.get_inviter(target.to_string(), room_id) From b42a972b719c2f224fc8b83ced7625ff48ca5879 Mon Sep 17 00:00:00 2001 From: Mark Haines Date: Fri, 6 Jan 2017 14:44:28 +0000 Subject: [PATCH 2/2] Bump version and changelog --- CHANGES.rst | 7 +++++++ synapse/__init__.py | 2 +- 2 files changed, 8 insertions(+), 1 deletion(-) diff --git a/CHANGES.rst b/CHANGES.rst index c1a8dd7613..28be0bb974 100644 --- a/CHANGES.rst +++ b/CHANGES.rst @@ -1,3 +1,10 @@ +Changes in synapse v0.18.6 (2017-01-06) +======================================= + +Bug fixes: + +* Fix bug when checking if a guest user is allowed to join a room (PR #1772) + Changes in synapse v0.18.6-rc3 (2017-01-05) =========================================== diff --git a/synapse/__init__.py b/synapse/__init__.py index a1da92ef92..92690a48ac 100644 --- a/synapse/__init__.py +++ b/synapse/__init__.py @@ -16,4 +16,4 @@ """ This is a reference implementation of a Matrix home server. """ -__version__ = "0.18.6-rc3" +__version__ = "0.18.6"