Fix password displayed as username in Firefox password manager dialog#7709
Merged
MorrisJobke merged 3 commits intomasterfrom Jan 11, 2018
Merged
Conversation
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.
Fixes (in master) #7031
The problem was (besides the password manager ignoring
autocomplete="off") that the password input element (in the HTML form) is cloned in a text input element, which is used to show the password in plain text when clicking on the Show password button. As it was a text input immediately followed by a password input Firefox seemed to assume that it had to be the username and ignored the real username field, no matter the value set for theautocompleteattribute (autocomplete="off"for the whole form,autocomplete="street-name"(because it is a supportedautocompletevalue that has nothing to do with login) orautocomplete="new-password"for the cloned text input,autocomplete="name/username/email"for the username text input, nor combinations of those).Now the cloned text input is added after the password input, so Firefox no longer thinks that the cloned text input is the username field and the password manager dialog shows the proper username instead.
Chromium was not affected by the original issue (it also offers to save the credentials, but its password manager dialog showed the proper username), and it still works as before after the change.