Skip to content

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
richvdh merged 2 commits intomatrix-org:mainfrom
Johennes:johannes/size-limits
Jun 12, 2024
Merged

Move size limits for user, room and event IDs into the appendix and clarify that the length is to be measured in bytes#1850
richvdh merged 2 commits intomatrix-org:mainfrom
Johennes:johannes/size-limits

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 force-pushed the johannes/size-limits branch from 68a8ff8 to c35ba8f Compare June 7, 2024 19:19
@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

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.

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
@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