mirror of
https://github.com/matrix-org/matrix-spec
synced 2026-03-23 19:44:09 +01:00
Move size limits for user, room and event IDs into the appendix and clarify that the length is to be measured in bytes
Fixes: #1826 Relates to: #1001 Signed-off-by: Johannes Marbach <n0-0ne+github@mailbox.org>
This commit is contained in:
parent
7d5b506555
commit
c35ba8f77c
1
changelogs/appendices/newsfragments/1850.clarification
Normal file
1
changelogs/appendices/newsfragments/1850.clarification
Normal file
|
|
@ -0,0 +1 @@
|
||||||
|
Move size limits for user, room and event IDs into the appendix and clarify that the length is to be measured in bytes.
|
||||||
|
|
@ -0,0 +1 @@
|
||||||
|
Move size limits for user, room and event IDs into the appendix and clarify that the length is to be measured in bytes.
|
||||||
|
|
@ -556,7 +556,7 @@ The `domain` of a user ID is the [server name](#server-name) of the
|
||||||
homeserver which allocated the account.
|
homeserver which allocated the account.
|
||||||
|
|
||||||
The length of a user ID, including the `@` sigil and the domain, MUST
|
The length of a user ID, including the `@` sigil and the domain, MUST
|
||||||
NOT exceed 255 characters.
|
NOT exceed 255 bytes.
|
||||||
|
|
||||||
The complete grammar for a legal user ID is:
|
The complete grammar for a legal user ID is:
|
||||||
|
|
||||||
|
|
@ -663,6 +663,9 @@ Room IDs are case-sensitive. They are not meant to be
|
||||||
human-readable. They are intended to be treated as fully opaque strings
|
human-readable. They are intended to be treated as fully opaque strings
|
||||||
by clients.
|
by clients.
|
||||||
|
|
||||||
|
The length of a room ID, including the `!` sigil and the domain, MUST
|
||||||
|
NOT exceed 255 bytes.
|
||||||
|
|
||||||
#### Room Aliases
|
#### Room Aliases
|
||||||
|
|
||||||
A room may have zero or more aliases. A room alias has the format:
|
A room may have zero or more aliases. A room alias has the format:
|
||||||
|
|
@ -673,8 +676,8 @@ The `domain` of a room alias is the [server name](#server-name) of the
|
||||||
homeserver which created the alias. Other servers may contact this
|
homeserver which created the alias. Other servers may contact this
|
||||||
homeserver to look up the alias.
|
homeserver to look up the alias.
|
||||||
|
|
||||||
Room aliases MUST NOT exceed 255 bytes (including the `#` sigil and the
|
The length of a room alias, including the `#` sigil and the domain, MUST
|
||||||
domain).
|
NOT exceed 255 bytes.
|
||||||
|
|
||||||
#### Event IDs
|
#### Event IDs
|
||||||
|
|
||||||
|
|
@ -689,6 +692,8 @@ whereas more recent versions omit the domain and use a base64-encoded hash inste
|
||||||
Event IDs are case-sensitive. They are not meant to be human-readable. They are
|
Event IDs are case-sensitive. They are not meant to be human-readable. They are
|
||||||
intended to be treated as fully opaque strings by clients.
|
intended to be treated as fully opaque strings by clients.
|
||||||
|
|
||||||
|
The length of an event ID MUST NOT exceed 255 bytes.
|
||||||
|
|
||||||
|
|
||||||
### URIs
|
### URIs
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -1842,16 +1842,15 @@ updates not being sent.
|
||||||
|
|
||||||
The complete event MUST NOT be larger than 65536 bytes, when formatted
|
The complete event MUST NOT be larger than 65536 bytes, when formatted
|
||||||
with the [federation event format](#room-event-format), including any
|
with the [federation event format](#room-event-format), including any
|
||||||
signatures, and encoded as [Canonical
|
signatures, and encoded as [Canonical JSON](/appendices#canonical-json).
|
||||||
JSON](/appendices#canonical-json).
|
|
||||||
|
|
||||||
There are additional restrictions on sizes per key:
|
There are additional restrictions on sizes per key:
|
||||||
|
|
||||||
- `sender` MUST NOT exceed 255 bytes (including domain).
|
- `sender` MUST NOT exceed the size limit for [user IDs](/appendices/#user-identifiers).
|
||||||
- `room_id` MUST NOT exceed 255 bytes.
|
- `room_id` MUST NOT exceed the size limit for [room IDs](/appendices/#room-ids).
|
||||||
- `state_key` MUST NOT exceed 255 bytes.
|
- `state_key` MUST NOT exceed 255 bytes.
|
||||||
- `type` MUST NOT exceed 255 bytes.
|
- `type` MUST NOT exceed 255 bytes.
|
||||||
- `event_id` MUST NOT exceed 255 bytes.
|
- `event_id` MUST NOT exceed the size limit for [event IDs](/appendices/#event-ids).
|
||||||
|
|
||||||
Some event types have additional size restrictions which are specified
|
Some event types have additional size restrictions which are specified
|
||||||
in the description of the event. Additional keys have no limit other
|
in the description of the event. Additional keys have no limit other
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue