Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Move size limits for user, room and event IDs into the appendix and clarify that the length is to be measured in bytes #1850

Merged
merged 2 commits into from
Jun 12, 2024

Conversation

Johennes
Copy link
Contributor

@Johennes Johennes commented Jun 7, 2024

Fixes: #1826
Relates to: #1001

Pull Request Checklist

Preview: https://pr1850--matrix-spec-previews.netlify.app

…larify that the length is to be measured in bytes

Fixes: matrix-org#1826
Relates to: matrix-org#1001
Signed-off-by: Johannes Marbach <n0-0ne+github@mailbox.org>
@Johennes Johennes marked this pull request as ready for review June 7, 2024 19:22
@Johennes Johennes requested a review from a team as a code owner June 7, 2024 19:22
@@ -556,7 +556,7 @@ The `domain` of a user ID is the [server name](#server-name) of the
homeserver which allocated the account.

The length of a user ID, including the `@` sigil and the domain, MUST
NOT exceed 255 characters.
NOT exceed 255 bytes.
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

For future reference: this restriction comes from the fact that a user ID must fit inside a state key (in the m.room.member event), and state keys have always been limited to 255 bytes (since 6a0595b)

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Do you think this and #1850 (comment) should also go into the spec?

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

no, that's fine. I just wanted to make a record so that when, in a few months, we come to look at this PR, we remember the thought process.

Comment on lines +666 to +667
The length of a room ID, including the `!` sigil and the domain, MUST
NOT exceed 255 bytes.
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This was also previously specified in the C-S API, also going back to 6a0595b.

content/appendices.md Outdated Show resolved Hide resolved
Co-authored-by: Richard van der Hoff <1389908+richvdh@users.noreply.github.com>
Copy link
Member

@richvdh richvdh left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks!

@richvdh richvdh merged commit 7916032 into matrix-org:main Jun 12, 2024
12 checks passed
@Kladki Kladki mentioned this pull request Jun 15, 2024
53 tasks
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Clarify Room ID requirements
2 participants