Skip to content

fix: Avoid disclosing the content of password inputs - #841

Merged
DataTriny merged 1 commit into
mainfrom
password-masking
Oct 25, 2026
Merged

DataTriny merged 1 commit into
mainfrom
password-masking

Conversation

@DataTriny

Copy link
Copy Markdown
Member

It is the responsibility of the UI toolkit to mask passwords: they know which masking character to use depending on the platform and they know the exact position and size of each character. This was not clearly stated in the documentation though and we must have safeguards in place to prevent passwords leaking.

We now detect unmasked passwords when a value is comprized of more than one character for a password input. We apply a similar heuristic on character positions and widths. Masking replaces the value by U+2022 and metrics of the first provided character are repeated to avoid providing a default value that might be way off. Finally, start of words are always discarded for passwords.

@DataTriny
DataTriny merged commit d62a496 into main Oct 25, 2026
26 checks passed
@DataTriny
DataTriny deleted the password-masking branch October 25, 2026 18:03
@DataTriny DataTriny mentioned this pull request Oct 25, 2026
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.

1 participant