matrix-org / matrix-spec

The Matrix protocol specification
Apache License 2.0
170 stars 90 forks source link

Behaviour of restricted rooms with no valid conditions is not clear #1891

Open Kladki opened 4 days ago

Kladki commented 4 days ago

Link to problem area:

https://spec.matrix.org/v1.10/client-server-api/#restricted-rooms

Issue:

Currently, the spec states that:

If the room is restricted but no valid conditions are presented then the room is effectively invite only.

The problem here is that there seems to be multiple interpretations of this, those being:

The key difference between these two cases is that with the latter, a join can still be authorized via join_authorised_via_users_server, despite the fact that servers shouldn't be doing this. With the former, such a join wouldn't be authorized.

So which interpretation does the spec intend to abide by?

clokep commented 4 days ago

Taking this as a figure of speech, as for the most the room should act as if it was invite, since servers shouldn't ever authorize joins

It is not literal, it is meant to explain in normal words what happens if you fail to define any conditions.

The key difference between these two cases is that with the latter, a join can still be authorized via join_authorised_via_users_server, despite the fact that servers shouldn't be doing this. With the former, such a join wouldn't be authorized.

I don't think this was really considered, but I think the logic still holds up -- the user in join_authorised_via_users_server could have issued an invite so I don't think there's an "auth leak" of any sort. Shout if I'm wrong though!

Kladki commented 4 days ago

It is not literal, it is meant to explain in normal words what happens if you fail to define any conditions.

As I thought. I will try adjust the wording, since there was some confusion caused by this.