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

Creating a room with invitees from non-federated HS fails, but the room is created though. #8137

Open
bmarty opened this issue Aug 20, 2020 · 3 comments
Labels
A-Create-Room A-Federation A-Invite Inviting users to rooms and accepting invites O-Uncommon Most users are unlikely to come across this or unexpected workflow S-Minor Blocks non-critical functionality, workarounds exist. T-Defect Bugs, crashes, hangs, security vulnerabilities, or other reported issues. Z-Help-Wanted We know exactly how to fix this issue, and would be grateful for any contribution

Comments

@bmarty
Copy link

bmarty commented Aug 20, 2020

When a client creates a room with invite and federation is denied with the invitee HS, the client get a 403 with body

{"errcode":"M_FORBIDDEN","error":"Federation denied with matrix.org."}

which is nice, but the room is actually created (no invitation is sent), which is a bit weird.

Synapse should ensure that it will be able to send invitations before creating the room, or create the room in memory and destroy it if something went wrong when sending the invitations.

Related workaround: element-hq/element-android#1969

@clokep clokep added z-bug (Deprecated Label) A-Federation z-p2 (Deprecated Label) labels Aug 20, 2020
@richvdh
Copy link
Member

richvdh commented Aug 27, 2020

I'd expect us to have an issue for this already somewere.

@MadLittleMods
Copy link
Contributor

Related issue to add a test for this scenario: #6122

@MadLittleMods MadLittleMods added the T-Defect Bugs, crashes, hangs, security vulnerabilities, or other reported issues. label May 16, 2022
@DMRobertson DMRobertson added S-Minor Blocks non-critical functionality, workarounds exist. O-Uncommon Most users are unlikely to come across this or unexpected workflow and removed z-bug (Deprecated Label) z-p2 (Deprecated Label) labels Nov 23, 2022
@DMRobertson
Copy link
Contributor

DMRobertson commented Nov 23, 2022

To do this:

for i in invite_list:
try:
uid = UserID.from_string(i)
parse_and_validate_server_name(uid.domain)
except Exception:
raise SynapseError(400, "Invalid user_id: %s" % (i,))
should also check that we can federate with uid.domain. If not, raise an appropriate SynapseError.

@MadLittleMods MadLittleMods added the Z-Help-Wanted We know exactly how to fix this issue, and would be grateful for any contribution label Nov 23, 2022
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
A-Create-Room A-Federation A-Invite Inviting users to rooms and accepting invites O-Uncommon Most users are unlikely to come across this or unexpected workflow S-Minor Blocks non-critical functionality, workarounds exist. T-Defect Bugs, crashes, hangs, security vulnerabilities, or other reported issues. Z-Help-Wanted We know exactly how to fix this issue, and would be grateful for any contribution
Projects
None yet
Development

No branches or pull requests

5 participants