Skip to content

Conversation

@jason-famedly
Copy link
Contributor

@jason-famedly jason-famedly commented Sep 23, 2025

Forgot to account for setting a profile avatar based on remote media that our local server has no data on. Since this is allowed to be set by spec, we probably should not error on it. It may end up being that the media is unrestricted.

The chances that a remote media piece that we have no data on being used as a profile avatar is really slim. The user setting the profile avatar would have had to have gotten the MXC from somewhere and would have to type it in by hand. The likelihood that they got it passed to them on a Post-it Note or something is slim, but not outside the realm of possibility.

Even if a profile avatar is set to a piece of media that the local server finds out is restricted later, it will still error on the /download and /thumbnail endpoints. This may not be the best in user experience, but has prior art for how media is handled pre-msc3911 when it does not exist or is otherwise inaccessible

Alternatively, we maybe could do something fancy where we attempt to retrieve the media from the remote server and do an internal copy on it like we do for profile avatars/membership events. This would require a new HTTP replication call(for the media retrieval) at the very least

@jason-famedly jason-famedly marked this pull request as ready for review September 23, 2025 12:12
@jason-famedly jason-famedly requested a review from a team as a code owner September 23, 2025 12:12
@jason-famedly jason-famedly merged commit edc2047 into msc3911 Sep 23, 2025
19 of 23 checks passed
@jason-famedly jason-famedly deleted the jason/fix-set-profiles branch September 23, 2025 15:29
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.

3 participants