Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

"MXC URI" -> "mxc:// URI" #1500

Merged
merged 3 commits into from
Apr 26, 2023
Merged
Show file tree
Hide file tree
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
Fix various typos throughout the specification.
10 changes: 5 additions & 5 deletions content/client-server-api/modules/content_repo.md
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ user wants to send to a room would be uploaded here, as would an avatar
the user wants to use.

Uploads are POSTed to a resource on the user's local homeserver which
returns a MXC URI which can later be used to GET the download. Content
returns a `mxc://` URI which can later be used to GET the download. Content
richvdh marked this conversation as resolved.
Show resolved Hide resolved
is downloaded from the recipient's local homeserver, which must first
transfer the content from the origin homeserver using the same API
(unless the origin and destination homeservers are the same).
Expand All @@ -23,9 +23,9 @@ When serving content, the server SHOULD provide a
interacting with the media repository.
{{% /boxes/added-in-paragraph %}}

#### Matrix Content (MXC) URIs
#### Matrix Content (`mxc://`) URIs

Content locations are represented as Matrix Content (MXC) URIs. They
Content locations are represented as Matrix Content (`mxc://`) URIs. They
look like:

mxc://<server-name>/<media-id>
Expand Down Expand Up @@ -88,10 +88,10 @@ The HTTP GET endpoint does not require any authentication. Knowing the
URL of the content is sufficient to retrieve the content, even if the
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
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 allowing only alphanumeric
(`A-Za-z0-9`), `_` and `-` characters in the `server-name` and
`media-id` values. This set of whitelisted characters allows URL-safe
base64 encodings specified in RFC 4648. Applying this character
Expand Down
2 changes: 1 addition & 1 deletion content/client-server-api/modules/instant_messaging.md
Original file line number Diff line number Diff line change
Expand Up @@ -315,7 +315,7 @@ When sending a spoiler, clients SHOULD provide the fallback in the `body` as sho
(including the reason). The fallback SHOULD NOT include the text containing spoilers since
`body` might show up in text-only clients or in notifications. To prevent spoilers showing up in
such situations, clients are strongly encouraged to first upload the text containing spoilers
to the media repository, then reference the MXC URI in a markdown-style link, as shown above.
to the media repository, then reference the `mxc://` URI in a markdown-style link, as shown above.

Clients SHOULD render spoilers differently with some sort of disclosure. For example, the
client could blur the actual text and ask the user to click on it for it to be revealed.
Expand Down
6 changes: 3 additions & 3 deletions data/api/client-server/content-repo.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -59,15 +59,15 @@ paths:
format: byte
responses:
200:
description: The [MXC URI](/client-server-api/#matrix-content-mxc-uris) for the uploaded content.
description: The [`mxc://` URI](/client-server-api/#matrix-content-mxc-uris) for the uploaded content.
schema:
type: object
required: ["content_uri"]
properties:
content_uri:
type: string
format: uri
description: "The [MXC URI](/client-server-api/#matrix-content-mxc-uris) to the uploaded content."
description: "The [`mxc://` URI](/client-server-api/#matrix-content-mxc-uris) to the uploaded content."
examples:
application/json: {
"content_uri": "mxc://example.com/AQwafuaFswefuhsfAFAgsw"
Expand Down Expand Up @@ -393,7 +393,7 @@ paths:
type: string
format: uri
description: |-
An [MXC URI](/client-server-api/#matrix-content-mxc-uris) to the image. Omitted if there is no image.
An [`mxc://` URI](/client-server-api/#matrix-content-mxc-uris) to the image. Omitted if there is no image.
examples:
application/json: {
"og:title": "Matrix Blog Post",
Expand Down
2 changes: 1 addition & 1 deletion data/api/client-server/definitions/sso_login_flow.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -54,7 +54,7 @@ properties:
icon:
type: string
description: |-
Optional MXC URI to provide an image/icon representing the IdP.
Optional `mxc://` URI to provide an image/icon representing the IdP.
Intended to be shown alongside the `name` if provided.
example: "mxc://example.org/abc123"
brand:
Expand Down
2 changes: 1 addition & 1 deletion data/api/client-server/users.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -98,7 +98,7 @@ paths:
type: string
format: uri
example: "mxc://bar.com/foo"
description: The avatar url, as an MXC, if one exists.
description: The avatar url, as an [`mxc://` URI](/client-server-api/#matrix-content-mxc-uris), if one exists.
limited:
type: boolean
description: Indicates if the result list has been truncated by the limit.
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ properties:
type: integer
thumbnail_url:
description: |-
The URL (typically [MXC URI](/client-server-api/#matrix-content-mxc-uris)) to a thumbnail of the image.
The URL (typically [`mxc://` URI](/client-server-api/#matrix-content-mxc-uris)) to a thumbnail of the image.
Only present if the thumbnail is unencrypted.
type: string
thumbnail_file:
Expand Down
2 changes: 1 addition & 1 deletion data/event-schemas/schema/m.room.message$m.audio.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@ properties:
type: string
url:
description: |-
Required if the file is unencrypted. The URL (typically [MXC URI](/client-server-api/#matrix-content-mxc-uris))
Required if the file is unencrypted. The URL (typically [`mxc://` URI](/client-server-api/#matrix-content-mxc-uris))
to the audio clip.
type: string
file:
Expand Down
2 changes: 1 addition & 1 deletion data/event-schemas/schema/m.room.message$m.file.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,7 @@ properties:
type: string
url:
description: |-
Required if the file is unencrypted. The URL (typically [MXC URI](/client-server-api/#matrix-content-mxc-uris))
Required if the file is unencrypted. The URL (typically [`mxc://` URI](/client-server-api/#matrix-content-mxc-uris))
to the file.
type: string
file:
Expand Down
2 changes: 1 addition & 1 deletion data/event-schemas/schema/m.room.message$m.image.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ properties:
type: string
url:
description: |-
Required if the file is unencrypted. The URL (typically [MXC URI](/client-server-api/#matrix-content-mxc-uris))
Required if the file is unencrypted. The URL (typically [`mxc://` URI](/client-server-api/#matrix-content-mxc-uris))
to the image.
type: string
file:
Expand Down
4 changes: 2 additions & 2 deletions data/event-schemas/schema/m.room.message$m.video.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@ properties:
type: integer
thumbnail_url:
description: |-
The URL (typically [MXC URI](/client-server-api/#matrix-content-mxc-uris)) to an image thumbnail of
The URL (typically [`mxc://` URI](/client-server-api/#matrix-content-mxc-uris)) to an image thumbnail of
the video clip. Only present if the thumbnail is unencrypted.
type: string
thumbnail_file:
Expand All @@ -50,7 +50,7 @@ properties:
type: string
url:
description: |-
Required if the file is unencrypted. The URL (typically [MXC URI](/client-server-api/#matrix-content-mxc-uris))
Required if the file is unencrypted. The URL (typically [`mxc://` URI](/client-server-api/#matrix-content-mxc-uris))
to the video clip.
type: string
file:
Expand Down