Skip to content
This repository has been archived by the owner on Apr 26, 2024. It is now read-only.

Guests can't join a room that's created on a different homeserver until a real user has joined that room from the same homeserver (SYN-655) #1515

Closed
matrixbot opened this issue Mar 18, 2016 · 6 comments

Comments

@matrixbot
Copy link
Member

Submitted by @​dave:matrix.org

(Imported from https://matrix.org/jira/browse/SYN-655)

(Reported by @dbkr)

@matrixbot
Copy link
Member Author

Jira watchers: @dbkr @richvdh

@matrixbot
Copy link
Member Author

matrixbot commented Mar 18, 2016

Links exported from Jira:

relates to #1559

@matrixbot
Copy link
Member Author

Irrespective of peeking, apparently.

Just says, "Guest access not allowed"

-- @dbkr

@matrixbot
Copy link
Member Author

Any idea why this might be? It sounds like a relatively easy fix?

-- @richvdh

@matrixbot matrixbot changed the title Guests can't join a room that's created on a different homeserver until a real user has joined that room from the same homeserver (SYN-655) Guests can't join a room that's created on a different homeserver until a real user has joined that room from the same homeserver (https://github.com/matrix-org/synapse/issues/1515) Nov 7, 2016
@matrixbot matrixbot changed the title Guests can't join a room that's created on a different homeserver until a real user has joined that room from the same homeserver (https://github.com/matrix-org/synapse/issues/1515) Guests can't join a room that's created on a different homeserver until a real user has joined that room from the same homeserver (SYN-655) Nov 7, 2016
@Half-Shot
Copy link
Collaborator

Got hit by this when working on https://github.com/Half-Shot/matrix-presents, because sharing a presentation between lots of folks is only really useful if some of them aren't required to log in.

Looks like

if effective_membership_state == Membership.JOIN:
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)
if inviter and not self.hs.is_mine(inviter):
remote_room_hosts.append(inviter.domain)
content["membership"] = Membership.JOIN
profile = self.profile_handler
if not content_specified:
content["displayname"] = yield profile.get_displayname(target)
content["avatar_url"] = yield profile.get_avatar_url(target)
if requester.is_guest:
content["kind"] = "guest"
remote_join_response = yield self._remote_join(
requester, remote_room_hosts, room_id, target, content
)
return remote_join_response
checks the room's state for whether the guest can join a room, which obviously fails if we don't have the state for the room. I don't know whether the guest should try to join, and then leave if the permissions do not allow it (because effectively a guest is a real user over federation, and respecting the join rules for guests is more of a curtsey thing)

@richvdh
Copy link
Member

richvdh commented Jul 3, 2020

gonna close this as a dup of #2065, because that one is clearer and has a link to a sytest

@richvdh richvdh closed this as completed Jul 3, 2020
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants