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

Forbid remote URLs for avatars/banners (fixes #1618) #2132

Merged
merged 1 commit into from
Mar 18, 2022

Conversation

Nutomic
Copy link
Member

@Nutomic Nutomic commented Mar 14, 2022

No description provided.

@dessalines
Copy link
Member

This would break federated avatars and banners, which we do allow to be remote: Ex: https://lemmy.ml/c/genzedong@lemmygrad.ml

Why is it necessary to have potentially hundreds of copies of these images on every instance? I don't think the security implications of seeing an IP viewing a picture are nearly as negative as wasting hard drive space by pointlessly duplicating images tons of times.

We need a decentralized picture store that shares hosting costs, rather than continuing this same problem of having every platform duplicate and host the same images sometimes 9 times. The duplication is fine for tiny info like text, but we really shouldn't allow it for resource-constrained self-hosted servers.

If we did add something like this, it'd have to be after we choose to cache these locally.

@Nutomic
Copy link
Member Author

Nutomic commented Mar 17, 2022

No it doesnt break that. The icon/banner on that page are loaded directly from lemmygrad.ml, as you can check for yourself with browser dev tools. And the federation checks verify exactly that, that images are from the same domain as the actor (so for a lemmygrad.ml community, icon/banner have to be hosted on lemmygrad.ml as well). This is very unlikely to break anything, because lemmy-ui only provides an upload button for images, no raw url input. So the only way to have images which fail these checks would be with raw api calls (or with a different client).

I have no idea how you get the idea that there are hundreds of copies of these images. Again, they are loaded directly from the original instance, without being copied onto any other instance. Maybe you are thinking of Mastodon which caches remote images for privacy reasons.

@dessalines dessalines enabled auto-merge (squash) March 18, 2022 15:32
@dessalines dessalines merged commit bcf7ec6 into main Mar 18, 2022
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

Successfully merging this pull request may close these issues.

2 participants