Skip to content

Fix/avatar url validation#268

Merged
Mosas2000 merged 31 commits intomainfrom
fix/avatar-url-validation
Mar 14, 2026
Merged

Fix/avatar url validation#268
Mosas2000 merged 31 commits intomainfrom
fix/avatar-url-validation

Conversation

@Mosas2000
Copy link
Copy Markdown
Owner

Closes #237

Validates that avatar URLs use the https: protocol. Uses the URL
constructor to parse the input, which also rejects malformed URLs.

Refs #237
The preview image is now only shown when the URL passes validation.
This prevents rendering tracking pixels, data: URIs, and other
potentially malicious content.

Closes #237
When the user enters a URL that does not use https://, a red
message appears below the input explaining the requirement.
The validateForm function now checks the avatar URL protocol before
allowing a save. This is a defense-in-depth measure alongside the
preview validation.
Replaces the plain text message with a styled placeholder that
mirrors the valid preview layout, making the invalid state
visually consistent.
Prevents the browser from sending a Referer header when loading the
avatar image. This reduces information leakage to external image
hosts.
Ensures the image request does not include cookies or credentials,
further limiting the data exposed to external hosts.
Provides immediate visual feedback that the entered URL does not
pass validation, consistent with how other form fields handle errors.
@Mosas2000 Mosas2000 merged commit 4b2fec2 into main Mar 14, 2026
3 of 7 checks passed
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.

ProfileManager renders arbitrary user-supplied URLs in avatar preview

1 participant