Repository navigation
fix(avatar): add timeout and size limit when fetching remote avatars - #66161
Merged
Merged
Conversation
Remote avatars are used to show the owners of federated shares, so only look them up for logged-in users. Use a short timeout and stream the response with a 2 MiB limit, like the link preview fetch does. Assisted-by: ClaudeCode:claude-opus-5-5 Signed-off-by: John Molakvoæ <14975046+skjnldsv@users.noreply.github.com>
skjnldsv
requested review from
Altahrim,
CarlSchwan,
icewind1991,
leftybournes,
provokateurin,
sorbaugh and
susnux
and removed request for
a team
November 2, 2026 20:25
susnux
approved these changes
Nov 2, 2026
Member
Author
|
/backport! to stable35 please |
AndyScherzinger
approved these changes
Nov 2, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Remote avatars were added in #62355 to show the owners of federated shares. They're only needed for logged-in users, so this skips the lookup otherwise. The fetch also used the default 30 s timeout and kept the whole response in memory.
Now it uses a 5 s timeout and streams the response with a 2 MiB cap, like the link preview fetch does. A missing or invalid
Content-Lengthis rejected.Covered by unit tests.
TODO
Checklist
3. to review, feature component)stable32)AI (if applicable)
👾 This pull request was assisted by Claude Code, commits carry an
Assisted-bytrailer.