-
-
Notifications
You must be signed in to change notification settings - Fork 609
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
getHttpUriForMxc
no longer respects paths in baseUrl
parameter
#4658
Comments
It's not obvious to me that If you need this behaviour you'll probably have to work at getting it specced. |
See also: matrix-org/matrix-spec#693 |
What about in scenarios where federation is unnecessary/undesirable? This is a scenario I’ve been operating in. I don’t want to divert Element’s resources from more important work, but the non-federated use-case seems like it might have been missed in this case (and the linked issue). |
In general, we're unlikely to expend effort fixing issues that only arise in exotic setups that don't support federation; and nor do I think we should complicate the code by doing so: it increases the risk of security issues. (Note that the fix here was introduced to fix a path traversal attack.) |
Understood. I’ll leave it up to you to decide what to do with this issue. |
Prior to 00aba74, if the
baseUrl
parameter had a path in it, the returned URL would contain that base URL path.The
new URL()
call here doesn't respect the path inbaseUrl
. E.g....gives you:
https://myhomeserver.com/_matrix/media/v3/download/myhomeserver.com/abc1234
...discarding the
/basepath
. I.e. the result should be:https://myhomeserver.com/basepath/_matrix/media/v3/download/myhomeserver.com/abc1234
The text was updated successfully, but these errors were encountered: