mirror of
https://github.com/matrix-org/matrix-spec
synced 2026-02-11 16:43:42 +01:00
Specify more validation to cover GHSA-m5p2-vccg-8c9v
This commit is contained in:
parent
a7721b7b58
commit
ec80512146
|
|
@ -868,8 +868,10 @@ selecting a resident from the candidate list, and using the
|
|||
enough information for the joining server to fill in the event.
|
||||
|
||||
The joining server is expected to add or replace the `origin`,
|
||||
`origin_server_ts`, and `event_id` on the templated event received by
|
||||
the resident server. This event is then signed by the joining server.
|
||||
`origin_server_ts`, and `event_id` on the templated event received by the
|
||||
resident server. The joining server MUST also verify that the `type`, `room_id`,
|
||||
`sender`, `state_key` and `content.membership` fields have the expected values.
|
||||
This event is then signed by the joining server.
|
||||
|
||||
To complete the join handshake, the joining server submits this new event
|
||||
to the resident server it used for `GET /make_join`, using the `PUT /send_join`
|
||||
|
|
|
|||
|
|
@ -23,6 +23,17 @@ paths:
|
|||
description: |-
|
||||
Asks the receiving server to return information that the sending
|
||||
server will need to prepare a join event to get into the room.
|
||||
|
||||
Before signing the returned template and calling `/send_join`,
|
||||
the sending server MUST verify that:
|
||||
|
||||
* the `room_id` is equal to the `roomId` path parameter.
|
||||
* both the `sender` and `state_key` are equal to the `userId` path parameter.
|
||||
* the `type` of the event is `m.room.member`.
|
||||
* the `membership` field inside `content` is `join`.
|
||||
|
||||
In case any of the above checks fail, the response MUST be treated as malformed and
|
||||
discarded. The caller MAY try to join through another server.
|
||||
operationId: makeJoin
|
||||
security:
|
||||
- signedRequest: []
|
||||
|
|
|
|||
|
|
@ -23,6 +23,17 @@ paths:
|
|||
description: |-
|
||||
Asks the receiving server to return information that the sending
|
||||
server will need to prepare a knock event for the room.
|
||||
|
||||
Before signing the returned template and calling `/send_knock`,
|
||||
the sending server MUST verify that:
|
||||
|
||||
* the `room_id` is equal to the `roomId` path parameter.
|
||||
* both the `sender` and `state_key` are equal to the `userId` path parameter.
|
||||
* the `type` of the event is `m.room.member`.
|
||||
* the `membership` field inside `content` is `knock`.
|
||||
|
||||
In case any of the above checks fail, the response MUST be treated as malformed and
|
||||
discarded. The caller MAY try to knock through another server.
|
||||
operationId: makeKnock
|
||||
security:
|
||||
- signedRequest: []
|
||||
|
|
|
|||
|
|
@ -23,6 +23,17 @@ paths:
|
|||
description: |-
|
||||
Asks the receiving server to return information that the sending
|
||||
server will need to prepare a leave event to get out of the room.
|
||||
|
||||
Before signing the returned template and calling `/send_leave`,
|
||||
the sending server MUST verify that:
|
||||
|
||||
* the `room_id` is equal to the `roomId` path parameter.
|
||||
* both the `sender` and `state_key` are equal to the `userId` path parameter.
|
||||
* the `type` of the event is `m.room.member`.
|
||||
* the `membership` field inside `content` is `leave`.
|
||||
|
||||
In case any of the above checks fail, the response MUST be treated as malformed and
|
||||
discarded. The caller MAY try to leave through another server.
|
||||
operationId: makeLeave
|
||||
security:
|
||||
- signedRequest: []
|
||||
|
|
|
|||
Loading…
Reference in a new issue