matrix-org / matrix-org/matrix-spec

/directory/room{roomAlias} leaks all involved homeservers

Open
#2,052 2 comments 0 reactions 0 assignees View on GitHub
clarification
Dominant language
HTML
Stars
330
Forks
150
Avg merge
2h 21m
Merged PRs (30d)
3

Description

**Link to problem area**:

https://spec.matrix.org/v1.11/client-server-api/#get_matrixclientv3directoryroomroomalias

**Issue**
What is wrong? How can we improve?

The spec for resolving [room aliases to IDs](https://spec.matrix.org/v1.11/client-server-api/#get_matrixclientv3directoryroomroomalias) doesn't specify any limits on the returned `servers` list resulting in strange occurences like ~400 servers (grew significantly since I raised the [synapse issue](https://github.com/element-hq/synapse/issues/17298)) on `#jellyfinorg:matrix.org` for example.

I believe this is wasteful and a privacy concern and that the list should be perhaps artifically capped and maybe ordered by the _size_ of the homeserver (number of active users?).

Contributor guide

Open the contributing guide

Research direction

Start with the GET /_matrix/client/v3/directory/room/{roomAlias} section in the linked Matrix Client-Server API specification and review the linked Synapse issue for the observed server-list behavior. Clarify the desired limit and ordering rules with the existing discussion; done means the specification records an agreed change that addresses the excessive disclosure and response size.

Written by the indexing model from the issue text.

Assessment

Domain
api, security
Issue type
Feature
Difficulty
5/5
Estimated time
Over a week
Activity status
Quiet
Clarity
Needs clarification
Newbie friendliness
30/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.