Lokasi ngalangkungan proxy:   [ UP ]  
[Ngawartoskeun bug]   [Panyetelan cookie]                
Skip to content

fix(files_sharing): encode user id in sharing avatar URL - #67462

Open
rdxrahul12 wants to merge 1 commit into
nextcloud:masterfrom
rdxrahul12:fix/avatar-url-encode-userid
Open

rdxrahul12 wants to merge 1 commit into
nextcloud:masterfrom
rdxrahul12:fix/avatar-url-encode-userid

Conversation

@rdxrahul12

Copy link
Copy Markdown

Fixes #67456.

generateAvatarSvg() interpolated the user id directly into the avatar path and passed it to generateUrl() with no matching placeholder, so ids containing #, ?, / or spaces produced a broken avatar URL in the sharing status icon.

Use {userId} placeholders so generateUrl() percent-encodes the id. Add a unit test covering an id with special characters.

Test plan

  • npx vitest run apps/files_sharing/src/utils/AccountIcon.spec.ts (5 tests pass)

Co-Authored-By: Codebuff noreply@codebuff.com

generateAvatarSvg() interpolated the user id directly into the avatar
path and passed it to generateUrl() with no matching placeholder, so
ids containing #, ?, / or spaces produced a broken avatar URL.

Use {userId} placeholders so generateUrl() percent-encodes the id.
Add a unit test covering an id with special characters.

Fixes nextcloud#67456.
@rdxrahul12
rdxrahul12 requested a review from a team as a code owner December 2, 2026 12:00
@rdxrahul12
rdxrahul12 requested review from payal8797, skjnldsv and susnux and removed request for a team December 2, 2026 12:00

This branch has not been deployed

No deployments
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.

Sharing avatar icons build the avatar URL without encoding the user id

1 participant