mirror of
https://github.com/matrix-org/matrix-spec
synced 2026-05-02 07:04:09 +02:00
Compare commits
4 commits
58bdf32119
...
84823bc066
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
84823bc066 | ||
|
|
d8be2ad942 | ||
|
|
70f6749c92 | ||
|
|
1583a12cec |
|
|
@ -0,0 +1 @@
|
||||||
|
The `server-name` segment of MXC URIs is sanitised differently from the `media-id` segment.
|
||||||
|
|
@ -0,0 +1 @@
|
||||||
|
Clarify what the minimum_valid_until_ts field means when it is set in key queries.
|
||||||
|
|
@ -134,9 +134,14 @@ entity isn't in the room.
|
||||||
`mxc://` URIs are vulnerable to directory traversal attacks such as
|
`mxc://` URIs are vulnerable to directory traversal attacks such as
|
||||||
`mxc://127.0.0.1/../../../some_service/etc/passwd`. This would cause the
|
`mxc://127.0.0.1/../../../some_service/etc/passwd`. This would cause the
|
||||||
target homeserver to try to access and return this file. As such,
|
target homeserver to try to access and return this file. As such,
|
||||||
homeservers MUST sanitise `mxc://` URIs by allowing only alphanumeric
|
homeservers MUST sanitise `mxc://` URIs by:
|
||||||
(`A-Za-z0-9`), `_` and `-` characters in the `server-name` and
|
|
||||||
`media-id` values. This set of whitelisted characters allows URL-safe
|
- restricting the `server-name` segment to valid
|
||||||
|
[server names](/appendices/#server-name)
|
||||||
|
- allowing only alphanumeric (`A-Za-z0-9`), `_` and `-` characters in
|
||||||
|
the `media-id` segment
|
||||||
|
|
||||||
|
The resulting set of whitelisted characters allows URL-safe
|
||||||
base64 encodings specified in RFC 4648. Applying this character
|
base64 encodings specified in RFC 4648. Applying this character
|
||||||
whitelist is preferable to blacklisting `.` and `/` as there are
|
whitelist is preferable to blacklisting `.` and `/` as there are
|
||||||
techniques around blacklisted characters (percent-encoded characters,
|
techniques around blacklisted characters (percent-encoded characters,
|
||||||
|
|
|
||||||
|
|
@ -34,8 +34,8 @@ paths:
|
||||||
- in: query
|
- in: query
|
||||||
name: minimum_valid_until_ts
|
name: minimum_valid_until_ts
|
||||||
description: |-
|
description: |-
|
||||||
A millisecond POSIX timestamp in milliseconds indicating when the returned
|
A millisecond POSIX timestamp. The returned keys MUST be valid
|
||||||
certificates will need to be valid until to be useful to the requesting server.
|
until at least this timestamp.
|
||||||
|
|
||||||
If not supplied, the current time as determined by the notary server is used.
|
If not supplied, the current time as determined by the notary server is used.
|
||||||
required: false
|
required: false
|
||||||
|
|
@ -98,9 +98,8 @@ paths:
|
||||||
type: integer
|
type: integer
|
||||||
format: int64
|
format: int64
|
||||||
description: |-
|
description: |-
|
||||||
A millisecond POSIX timestamp in milliseconds indicating when
|
A millisecond POSIX timestamp. The returned keys
|
||||||
the returned certificates will need to be valid until to be
|
MUST be valid until at least this timestamp.
|
||||||
useful to the requesting server.
|
|
||||||
|
|
||||||
If not supplied, the current time as determined by the notary
|
If not supplied, the current time as determined by the notary
|
||||||
server is used.
|
server is used.
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue