Skip to content

fix(avatar): add timeout and size limit when fetching remote avatars - #66161

Merged
AndyScherzinger merged 1 commit into
masterfrom
fix/remote-avatar-limits
Nov 2, 2026
Merged

AndyScherzinger merged 1 commit into
masterfrom
fix/remote-avatar-limits

Conversation

@skjnldsv

@skjnldsv skjnldsv commented Nov 2, 2026 •

Copy link
Copy Markdown
Member

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-Length is rejected.

Covered by unit tests.

TODO

  • Backport to stable35

Checklist

AI (if applicable)

  • The content of this PR was partly or fully generated using AI

👾 This pull request was assisted by Claude Code, commits carry an Assisted-by trailer.

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
skjnldsv requested a review from a team as a code owner November 2, 2026 20:25
@skjnldsv skjnldsv self-assigned this Nov 2, 2026
@skjnldsv
skjnldsv requested review from Altahrim, CarlSchwan, icewind1991, leftybournes, provokateurin, sorbaugh and susnux and removed request for a team November 2, 2026 20:25
@skjnldsv

skjnldsv commented Nov 2, 2026

Copy link
Copy Markdown
Member Author

/backport! to stable35 please

@AndyScherzinger
AndyScherzinger merged commit 06efce9 into master Nov 2, 2026
155 of 161 checks passed
@AndyScherzinger
AndyScherzinger deleted the fix/remote-avatar-limits branch November 2, 2026 20:58
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants