Look for username and email keywords in input fields when detecting a username field in a form
Categories
(Toolkit :: Password Manager, enhancement, P3)
Tracking
()
Tracking | Status | |
---|---|---|
firefox89 | --- | verified |
People
(Reporter: dimi, Assigned: dimi)
References
(Blocks 2 open bugs)
Details
(Whiteboard: [passwords:heuristics])
Attachments
(3 files)
The heuristic we are using to locate the username works as follow:
- Locate the password fields in the form
- Searching backward from the first password field, assume the first text field is the username.
So if there is any text field between the real username field and the password field, we can't recognize the right username field. We can add some searching heuristics (like what we did in fathom to detect the new password field) to improve the current heuristic.
Assignee | ||
Updated•5 years ago
|
Assignee | ||
Updated•5 years ago
|
Updated•5 years ago
|
Updated•5 years ago
|
Assignee | ||
Updated•5 years ago
|
Assignee | ||
Comment 1•5 years ago
|
||
The username searching heuristic locates a username like or an email like field
by:
- Checking if the input field's type is 'email'.
- Checking if the input field's autocomplete attribute is 'username' or 'email'
- Searching 'username' and 'email' keyword in:
- The input field's "id", "name", "classname", and "placeholder" attributes.
- The input field's associate label
If any of the above rule matches, we consider the field a username or an
email field depending on the keyword that matches.
When both a username-like and an email-like field are found in a form, select
the username-like field as the final username field. If no field is
found by the above heuristic, assume the first field before the first
password is the username (This is how it works before the patch).
Note. Right now, even with the new heuristic, we still only search fields
preecede the first password field like what we did before. This is because
from the sites I have tested (~250 sites), all the username fields
precede the first password field. If it turns out this is not true for
some sites, we can consider searching all the input fields in the form.
Assignee | ||
Comment 2•5 years ago
|
||
Depends on D110469
Assignee | ||
Comment 3•5 years ago
|
||
Updated•5 years ago
|
Updated•5 years ago
|
![]() |
||
Comment 5•5 years ago
|
||
bugherder |
https://hg.mozilla.org/mozilla-central/rev/6386355a4bd3
https://hg.mozilla.org/mozilla-central/rev/92d80c244299
https://hg.mozilla.org/mozilla-central/rev/71ef95dc36a8
Assignee | ||
Updated•5 years ago
|
Comment 7•4 years ago
•
|
||
Verified-fixed by doing the following check:
- Confirmed that Bug 1690802 is fixed
Confirmed that the following sites will properly capture the email address and have it displayed in the username field of the Save/Dismiss doorhanger panel (when there are multiple field inputs received, such as name, last name, etc):
- ebay.com
- etsy.com
- lowes.com
- kijiji.com
- newegg.com
- screwfix.com
- lidl.de
- hotukdeal.com - with the mention that the username is displayed in the doorhanger (username takes priority over email field for sites where login can be done with both of them)
There were only 2 sites that have issues. due to forms being on separate pages, which will be handled via Bug 348941. (decathlon.fr and manomano.fr)
Description
•