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

Unable to fetch remote authenticated media from unauthenticated c2s endpoints #586

Open
tusooa opened this issue Oct 4, 2024 · 4 comments

Comments

@tusooa
Copy link

tusooa commented Oct 4, 2024

If my understanding of the code is right, the problem lies in https://github.com/girlbossceo/conduwuit/blob/main/src/api/client/media_legacy.rs#L150C4-L150C76 , which will only request the remote unauthenticated s2s endpoint before trying the authenticated endpoint, if the c2s request is coming from the unauthenticated endpoint.

@jevolk
Copy link
Collaborator

jevolk commented Oct 4, 2024

This is intended behavior. If the client is not authenticated it doesn't enjoy authenticated media.

@girlbossceo
Copy link
Owner

Yes this is expected. Fetching authenticated media over unauthenticated endpoints would be a security issue.

Is there something you're running into that's causing this concern?

@tusooa
Copy link
Author

tusooa commented Oct 9, 2024

Yes this is expected. Fetching authenticated media over unauthenticated endpoints would be a security issue.

Is there something you're running into that's causing this concern?

I'm using a client that does not yet support authenticated media, and all matrix.org media won't load. It seems weird that federation is not transparent through csapi.

@girlbossceo
Copy link
Owner

girlbossceo commented Oct 9, 2024

I do agree it is an unfortunate state of things that pretty much none of this is transparent and older clients, most specifically SchildiChat which is still a perfectly good client, are basically unusable now because this is not transparent; and because this was very, very rushed and shoehorned through. But it may likely upset a lot of folks or cause security issues/concerns if we made this transparent on the server-side and I don't want to step into that territory.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants