mirror of
https://github.com/matrix-org/matrix-spec
synced 2026-04-29 22:04:08 +02:00
Compare commits
4 commits
411a10a468
...
3d8cbf53f3
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
3d8cbf53f3 | ||
|
|
c578129bed | ||
|
|
d9f5a1e97c | ||
|
|
fe6c97f498 |
1
changelogs/client_server/newsfragments/2299.feature
Normal file
1
changelogs/client_server/newsfragments/2299.feature
Normal file
|
|
@ -0,0 +1 @@
|
||||||
|
Clients supporting the `ol` HTML element must also support the `start` attribute, as per [MSC4313](https://github.com/matrix-org/matrix-spec-proposals/pull/4313).
|
||||||
|
|
@ -0,0 +1 @@
|
||||||
|
Remove the post-1.16 release note for room version 12.
|
||||||
|
|
@ -0,0 +1 @@
|
||||||
|
Specified input validation for PDUs passed to federation membership endpoints.
|
||||||
|
|
@ -84,6 +84,10 @@ Additionally, web clients should ensure that *all* `a` tags get a
|
||||||
`rel="noopener"` to prevent the target page from referencing the
|
`rel="noopener"` to prevent the target page from referencing the
|
||||||
client's tab/window.
|
client's tab/window.
|
||||||
|
|
||||||
|
{{% added-in v="1.18" %}} Clients that support rendering numbered lists via the
|
||||||
|
`ol` tag MUST also support the `start` attribute in order to prevent loss of
|
||||||
|
meaning of a message due to the numbering of list items.
|
||||||
|
|
||||||
Tags must not be nested more than 100 levels deep. Clients should only
|
Tags must not be nested more than 100 levels deep. Clients should only
|
||||||
support the subset of tags they can render, falling back to other
|
support the subset of tags they can render, falling back to other
|
||||||
representations of the tags where possible. For example, a client may
|
representations of the tags where possible. For example, a client may
|
||||||
|
|
|
||||||
|
|
@ -56,19 +56,6 @@ Clients should not ask room administrators to upgrade their rooms if the
|
||||||
room is running a stable version. Servers SHOULD use **room version 12** as
|
room is running a stable version. Servers SHOULD use **room version 12** as
|
||||||
the default room version when creating new rooms.
|
the default room version when creating new rooms.
|
||||||
|
|
||||||
{{% boxes/note %}}
|
|
||||||
|
|
||||||
{{% added-in v="1.16" %}}
|
|
||||||
|
|
||||||
Room version 12 is introduced and made default in this specification release.
|
|
||||||
Servers are encouraged to continue using room version 11 as the default room
|
|
||||||
version for the early days and weeks following this specification release,
|
|
||||||
and then gradually switch the default over when they deem appropriate.
|
|
||||||
|
|
||||||
<!-- TODO(SCT): Remove this note box in Matrix 1.17 -->
|
|
||||||
|
|
||||||
{{% /boxes/note %}}
|
|
||||||
|
|
||||||
The available room versions are:
|
The available room versions are:
|
||||||
|
|
||||||
- [Version 1](/rooms/v1) - **Stable**. The initial room version.
|
- [Version 1](/rooms/v1) - **Stable**. The initial room version.
|
||||||
|
|
|
||||||
|
|
@ -172,6 +172,17 @@ paths:
|
||||||
}
|
}
|
||||||
"400":
|
"400":
|
||||||
description: |-
|
description: |-
|
||||||
|
The `M_INVALID_PARAM` error code is used to indicate one or more of the following:
|
||||||
|
|
||||||
|
* The invite event fails a [signature check](/server-server-api/#validating-hashes-and-signatures-on-received-events).
|
||||||
|
* The event type is not `m.room.member`.
|
||||||
|
* The `membership` field inside the event content is not `invite`.
|
||||||
|
* The event sender is not a user ID on the origin server.
|
||||||
|
* The `state_key` is not a user ID on the receiving server.
|
||||||
|
|
||||||
|
Servers MUST apply the validation above to the invite event before
|
||||||
|
signing it regardless of room version.
|
||||||
|
|
||||||
The `M_MISSING_PARAM` error code is used to indicate one or more of
|
The `M_MISSING_PARAM` error code is used to indicate one or more of
|
||||||
the following:
|
the following:
|
||||||
|
|
||||||
|
|
@ -186,9 +197,9 @@ paths:
|
||||||
Servers MAY apply the validation above to room versions 1 through 11,
|
Servers MAY apply the validation above to room versions 1 through 11,
|
||||||
and SHOULD apply the validation above to all other room versions.
|
and SHOULD apply the validation above to all other room versions.
|
||||||
|
|
||||||
If `M_MISSING_PARAM` is returned and the request is associated with a
|
If `M_MISSING_PARAM` or `M_INVALID_PARAM` is returned and the request
|
||||||
Client-Server API request, the Client-Server API request SHOULD fail
|
is associated with a Client-Server API request, the Client-Server API
|
||||||
with a 5xx error rather than being passed through.
|
request SHOULD fail with a 5xx error rather than being passed through.
|
||||||
content:
|
content:
|
||||||
application/json:
|
application/json:
|
||||||
schema:
|
schema:
|
||||||
|
|
|
||||||
|
|
@ -154,6 +154,17 @@ paths:
|
||||||
The error should be passed through to clients so that they
|
The error should be passed through to clients so that they
|
||||||
may give better feedback to users.
|
may give better feedback to users.
|
||||||
|
|
||||||
|
The `M_INVALID_PARAM` error code is used to indicate one or more of the following:
|
||||||
|
|
||||||
|
* The invite event fails a [signature check](/server-server-api/#validating-hashes-and-signatures-on-received-events).
|
||||||
|
* The event type is not `m.room.member`.
|
||||||
|
* The `membership` field inside the event content is not `invite`.
|
||||||
|
* The event sender is not a user ID on the origin server.
|
||||||
|
* The `state_key` is not a user ID on the receiving server.
|
||||||
|
|
||||||
|
Servers MUST apply the validation above to the invite event before
|
||||||
|
signing it regardless of room version.
|
||||||
|
|
||||||
The `M_MISSING_PARAM` error code is used to indicate one or more of
|
The `M_MISSING_PARAM` error code is used to indicate one or more of
|
||||||
the following:
|
the following:
|
||||||
|
|
||||||
|
|
@ -168,9 +179,9 @@ paths:
|
||||||
Servers MAY apply the validation above to room versions 1 through 11,
|
Servers MAY apply the validation above to room versions 1 through 11,
|
||||||
and SHOULD apply the validation above to all other room versions.
|
and SHOULD apply the validation above to all other room versions.
|
||||||
|
|
||||||
If `M_MISSING_PARAM` is returned and the request is associated with a
|
If `M_MISSING_PARAM` or `M_INVALID_PARAM` is returned and the request
|
||||||
Client-Server API request, the Client-Server API request SHOULD fail
|
is associated with a Client-Server API request, the Client-Server API
|
||||||
with a 5xx error rather than being passed through.
|
request SHOULD fail with a 5xx error rather than being passed through.
|
||||||
content:
|
content:
|
||||||
application/json:
|
application/json:
|
||||||
schema:
|
schema:
|
||||||
|
|
|
||||||
|
|
@ -36,7 +36,7 @@ paths:
|
||||||
type: string
|
type: string
|
||||||
- in: path
|
- in: path
|
||||||
name: userId
|
name: userId
|
||||||
description: The user ID the join event will be for.
|
description: The user ID the join event will be for. This MUST be a user ID on the origin server.
|
||||||
required: true
|
required: true
|
||||||
example: "@someone:example.org"
|
example: "@someone:example.org"
|
||||||
schema:
|
schema:
|
||||||
|
|
@ -388,6 +388,43 @@ paths:
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
]
|
]
|
||||||
|
"400":
|
||||||
|
description: |-
|
||||||
|
The request is invalid in some way.
|
||||||
|
|
||||||
|
The `M_INVALID_PARAM` error code is used to indicate one or more of the following:
|
||||||
|
|
||||||
|
* The join event fails a [signature check](/server-server-api/#validating-hashes-and-signatures-on-received-events).
|
||||||
|
* The event type is not `m.room.member`.
|
||||||
|
* The `membership` field inside the event content is not `join`.
|
||||||
|
* The event sender is not a user ID on the origin server.
|
||||||
|
* The `state_key` is not equal to the `sender`.
|
||||||
|
|
||||||
|
Servers MUST apply the validation above to the join event.
|
||||||
|
content:
|
||||||
|
application/json:
|
||||||
|
schema:
|
||||||
|
$ref: ../client-server/definitions/errors/error.yaml
|
||||||
|
examples:
|
||||||
|
response:
|
||||||
|
value: {
|
||||||
|
"errcode": "M_INVALID_PARAM",
|
||||||
|
"error": "Not a join event."
|
||||||
|
}
|
||||||
|
"403":
|
||||||
|
description: |-
|
||||||
|
The room that the joining server is attempting to join does not permit the user
|
||||||
|
to join.
|
||||||
|
content:
|
||||||
|
application/json:
|
||||||
|
schema:
|
||||||
|
$ref: ../client-server/definitions/errors/error.yaml
|
||||||
|
examples:
|
||||||
|
response:
|
||||||
|
value: {
|
||||||
|
"errcode": "M_FORBIDDEN",
|
||||||
|
"error": "You are not invited to this room"
|
||||||
|
}
|
||||||
servers:
|
servers:
|
||||||
- url: "{protocol}://{hostname}{basePath}"
|
- url: "{protocol}://{hostname}{basePath}"
|
||||||
variables:
|
variables:
|
||||||
|
|
|
||||||
|
|
@ -247,6 +247,16 @@ paths:
|
||||||
The error should be passed through to clients so that they
|
The error should be passed through to clients so that they
|
||||||
may give better feedback to users.
|
may give better feedback to users.
|
||||||
|
|
||||||
|
The `M_INVALID_PARAM` error code is used to indicate one or more of the following:
|
||||||
|
|
||||||
|
* The join event fails a [signature check](/server-server-api/#validating-hashes-and-signatures-on-received-events).
|
||||||
|
* The event type is not `m.room.member`.
|
||||||
|
* The `membership` field inside the event content is not `join`.
|
||||||
|
* The event sender is not a user ID on the origin server.
|
||||||
|
* The `state_key` is not equal to the `sender`.
|
||||||
|
|
||||||
|
Servers MUST apply the validation above to the join event.
|
||||||
|
|
||||||
New in `v1.2`, the following error conditions might happen:
|
New in `v1.2`, the following error conditions might happen:
|
||||||
|
|
||||||
If the room is [restricted](/client-server-api/#restricted-rooms)
|
If the room is [restricted](/client-server-api/#restricted-rooms)
|
||||||
|
|
|
||||||
|
|
@ -36,7 +36,7 @@ paths:
|
||||||
type: string
|
type: string
|
||||||
- in: path
|
- in: path
|
||||||
name: userId
|
name: userId
|
||||||
description: The user ID the knock event will be for.
|
description: The user ID the knock event will be for. This MUST be a user ID on the origin server.
|
||||||
required: true
|
required: true
|
||||||
example: "@someone:example.org"
|
example: "@someone:example.org"
|
||||||
schema:
|
schema:
|
||||||
|
|
@ -330,6 +330,27 @@ paths:
|
||||||
"$ref": "./examples/invite_or_knock_state.json"
|
"$ref": "./examples/invite_or_knock_state.json"
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
"400":
|
||||||
|
description: |-
|
||||||
|
The `M_INVALID_PARAM` error code is used to indicate one or more of the following:
|
||||||
|
|
||||||
|
* The knock event fails a [signature check](/server-server-api/#validating-hashes-and-signatures-on-received-events).
|
||||||
|
* The event type is not `m.room.member`.
|
||||||
|
* The `membership` field inside the event content is not `knock`.
|
||||||
|
* The event sender is not a user ID on the origin server.
|
||||||
|
* The `state_key` is not equal to the `sender`.
|
||||||
|
|
||||||
|
Servers MUST apply the validation above to the knock event.
|
||||||
|
content:
|
||||||
|
application/json:
|
||||||
|
schema:
|
||||||
|
$ref: ../client-server/definitions/errors/error.yaml
|
||||||
|
examples:
|
||||||
|
response:
|
||||||
|
value: {
|
||||||
|
"errcode": "M_INVALID_PARAM",
|
||||||
|
"error": "Not a knock event."
|
||||||
|
}
|
||||||
"403":
|
"403":
|
||||||
description: |-
|
description: |-
|
||||||
The knocking server or user is not permitted to knock on the room, such as when the
|
The knocking server or user is not permitted to knock on the room, such as when the
|
||||||
|
|
|
||||||
|
|
@ -36,7 +36,7 @@ paths:
|
||||||
type: string
|
type: string
|
||||||
- in: path
|
- in: path
|
||||||
name: userId
|
name: userId
|
||||||
description: The user ID the leave event will be for.
|
description: The user ID the leave event will be for. This MUST be a user ID on the origin server.
|
||||||
required: true
|
required: true
|
||||||
example: "@someone:example.org"
|
example: "@someone:example.org"
|
||||||
schema:
|
schema:
|
||||||
|
|
@ -249,6 +249,27 @@ paths:
|
||||||
200,
|
200,
|
||||||
{}
|
{}
|
||||||
]
|
]
|
||||||
|
"400":
|
||||||
|
description: |-
|
||||||
|
The `M_INVALID_PARAM` error code is used to indicate one or more of the following:
|
||||||
|
|
||||||
|
* The leave event fails a [signature check](/server-server-api/#validating-hashes-and-signatures-on-received-events).
|
||||||
|
* The event type is not `m.room.member`.
|
||||||
|
* The `membership` field inside the event content is not `leave`.
|
||||||
|
* The event sender is not a user ID on the origin server.
|
||||||
|
* The `state_key` is not equal to the `sender`.
|
||||||
|
|
||||||
|
Servers MUST apply the validation above to the leave event.
|
||||||
|
content:
|
||||||
|
application/json:
|
||||||
|
schema:
|
||||||
|
$ref: ../client-server/definitions/errors/error.yaml
|
||||||
|
examples:
|
||||||
|
response:
|
||||||
|
value: {
|
||||||
|
"errcode": "M_INVALID_PARAM",
|
||||||
|
"error": "Not a leave event."
|
||||||
|
}
|
||||||
servers:
|
servers:
|
||||||
- url: "{protocol}://{hostname}{basePath}"
|
- url: "{protocol}://{hostname}{basePath}"
|
||||||
variables:
|
variables:
|
||||||
|
|
|
||||||
|
|
@ -134,6 +134,27 @@ paths:
|
||||||
examples:
|
examples:
|
||||||
response:
|
response:
|
||||||
value: {}
|
value: {}
|
||||||
|
"400":
|
||||||
|
description: |-
|
||||||
|
The `M_INVALID_PARAM` error code is used to indicate one or more of the following:
|
||||||
|
|
||||||
|
* The leave event fails a [signature check](/server-server-api/#validating-hashes-and-signatures-on-received-events).
|
||||||
|
* The event type is not `m.room.member`.
|
||||||
|
* The `membership` field inside the event content is not `leave`.
|
||||||
|
* The event sender is not a user ID on the origin server.
|
||||||
|
* The `state_key` is not equal to the `sender`.
|
||||||
|
|
||||||
|
Servers MUST apply the validation above to the leave event.
|
||||||
|
content:
|
||||||
|
application/json:
|
||||||
|
schema:
|
||||||
|
$ref: ../client-server/definitions/errors/error.yaml
|
||||||
|
examples:
|
||||||
|
response:
|
||||||
|
value: {
|
||||||
|
"errcode": "M_INVALID_PARAM",
|
||||||
|
"error": "Not a leave event."
|
||||||
|
}
|
||||||
servers:
|
servers:
|
||||||
- url: "{protocol}://{hostname}{basePath}"
|
- url: "{protocol}://{hostname}{basePath}"
|
||||||
variables:
|
variables:
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue