-
-
Notifications
You must be signed in to change notification settings - Fork 2.1k
Documentation incorrectly states that the room list always returns an empty list if disabled, while federation actually returns a 403 error #13102
Comments
@deepbluev7 Mentioned also that this might actually be an implementation bug, as https://spec.matrix.org/v1.3/server-server-api/#public-room-directory states that the docs mention the correct thing and 403 is not a valid response from the federation endpoint on fed side. (It's also not a valid response on client side according to https://spec.matrix.org/v1.3/client-server-api/#get_matrixclientv3publicrooms ) |
I think there are a few things going on here; I don't think your diagnosis is completely correct. The wording in question is ### `enable_room_list_search`
Set to false to disable searching the public room list. When disabled
blocks searching local and remote room lists for local and remote
users by always returning an empty list for all queries. Defaults to true. Where does this config value get used? I see three relevant reads: synapse/synapse/handlers/directory.py Lines 453 to 457 in a164a46
synapse/synapse/handlers/room_list.py Lines 86 to 87 in 888a29f
synapse/synapse/handlers/room_list.py Lines 373 to 374 in 888a29f
So AFAICS the comment accurately describes the behaviour of calls to The first snippet corresponds to
which sounds reasonable. I think one could argue that this wording makes the 403 return code okay. (An aside for @matrix-org/spec-core-team: it is never clear to me if a list of status codes in the spec is normative and/or exhaustive. I think in practice not, because servers can fall over and return 500 at any time.) In passing, I note that synapse supports a synapse/synapse/rest/client/directory.py Lines 157 to 166 in e24ff8e
|
TL;DR I don't think Synapse is doing anything obviously wrong (but I'm happy to discuss if you're not convinced). We should update the docs to better communicate that:
Ugh. The situation is a bit of a mess, isn't it? |
Hmm. On a re-read I'm now a bit confused.
In context, this snippet is propagating a 403 from the remote server forwards with another error message. synapse/synapse/federation/transport/client.py Lines 453 to 523 in d9f0922
But I can't immediately see where or why this happens. Can you be more precise about how this came aboute?
|
I was simply adding a remote server to my element Web server list. So it should be the client side room list endpoint I am requesting and where I saw the error message from.
The server runs the default docker image config of Synapse. Only modified fields are the required ones. On my own server it is the same. So my view was client side. The note about the spec came from @deepbluev7 iirc. Either way it feels a little confusing in view of spec. I don't think the Feature is wrong I just find the documentation confusing on this. The fact that element Web just gives a non descriptive error message for this didn't help either. It took quite some time for me to figure out why the room list wasn't reachable on a fresh server. |
@DMRobertson please definitely open an issue for this. |
Description
https://github.com/matrix-org/synapse/blob/develop/docs/usage/configuration/config_documentation.md?plain=1#L3337-L3339 states that both internally and externally synapse will return an empty list on ALL queries.
However
synapse/synapse/federation/transport/client.py
Line 491 in c52abc1
Steps to reproduce
Homeserver
Not relevant. This is a docs issue.
Synapse Version
1.61.0
Installation Method
Docker (matrixdotorg/synapse)
Platform
Not relevant. This is a docs issue.
Relevant log output
Anything else that would be useful to know?
No response
The text was updated successfully, but these errors were encountered: