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

C-S API MXC Security Consideration pretty much all MXCs are invalid #1990

Open
t3chguy opened this issue Nov 7, 2024 · 0 comments
Open

C-S API MXC Security Consideration pretty much all MXCs are invalid #1990

t3chguy opened this issue Nov 7, 2024 · 0 comments
Labels
spec-bug Something which is in the spec, but is wrong

Comments

@t3chguy
Copy link
Member

t3chguy commented Nov 7, 2024

Link to problem area:

https://spec.matrix.org/v1.12/client-server-api/#security-considerations-5

Issue

It states

As such, homeservers MUST sanitise mxc:// URIs by allowing only alphanumeric (A-Za-z0-9), _ and - characters in the server-name and media-id values.

Given that server-name the vast majority of the time is a qualified domain with a TLD, the .tld would make it invalid. Ports, IPv4 and IPv6 addresses would also be invalid. It should be updated such that the grammar only applies to the media-id segment, and server-name should refer to https://spec.matrix.org/v1.12/appendices/#server-name for valid grammar.

@t3chguy t3chguy added the clarification An area where the expected behaviour is understood, but the spec could do with being more explicit label Nov 7, 2024
@richvdh richvdh added spec-bug Something which is in the spec, but is wrong and removed clarification An area where the expected behaviour is understood, but the spec could do with being more explicit labels Nov 7, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
spec-bug Something which is in the spec, but is wrong
Projects
None yet
Development

No branches or pull requests

2 participants