Closed Bug 1560029 Opened 5 years ago Closed 5 years ago

Make password field values visible when focused after a generated password is filled

Categories

(Toolkit :: Password Manager, enhancement, P1)

Desktop
All
enhancement

Tracking

()

VERIFIED FIXED
mozilla70
Tracking Status
firefox70 --- verified

People

(Reporter: MattN, Assigned: MattN)

References

(Blocks 1 open bug)

Details

(Whiteboard: [passwords:generation] [skyline])

Attachments

(3 files, 1 obsolete file)

If we generate a password for the user, it may need editing in order to meet the website requirements so we should make it readable to the user to do so. We need an API that LoginManagerContent.jsm can call to toggling visibility.

Depends on: 1560032
No longer blocks: 1548389
Depends on: 1548389
Blocks: 376674
Component: Editor → Password Manager
Product: Core → Toolkit
Summary: Add an API to allow unmasking password fields → Make password field values visible when focused after a generated password is filled
Version: 68 Branch → Trunk
No longer depends on: 1560032
Whiteboard: [passwords:generation] [skyline]
Flags: qe-verify+
Assignee: nobody → ntim.bugs
Status: NEW → ASSIGNED
Assignee: ntim.bugs → nobody
Status: ASSIGNED → NEW

I added new API to unmask specific range in <input type="password">. The API is, nsIEditor.unmask(). Its first argument is start offset of unmask range. Its second argument is optional, end offset of unmask range. So, those values are almost same as HTMLInputElement.setSelectionRange(). Its third argument is also optional, and important for the behavior. This is timeout value to re-mask the characters automatically if grater than 0. In such case, changing the value (e.g., setting HTMLInputElement.value, typing something) mask them immediately. If the value is 0, newly inputted character expands unmasking range. For example, if user types a character at start of the password field when only center 3rd character is unmasked, unmasked range becomes 0 to 3.

Another API, nsIEditor.mask() masks all characters. Then, auto-masking is restarted. I.e., newly inputted characters will be masked automatically. So, somebody can work on this bug right now.

I'll keep working on bug 1560032 and new security issue of the new behavior (currently, user cannot put caret between surrogate pair so that anybody can check its user typed surrogate pairs only with arrow keys).

Flags: needinfo?(MattN+bmo)
Assignee: nobody → MattN+bmo
Status: NEW → ASSIGNED

Thank you very much for implementing bug 1548389 and providing the details here!

Flags: needinfo?(MattN+bmo)
Attachment #9073289 - Attachment description: Bug 1560029 - Make password field values visible when focused after a generated password is filled. → Bug 1560029 - Make password field values visible when focused after a generated password is filled
Depends on: 1568753
Attachment #9073289 - Attachment description: Bug 1560029 - Make password field values visible when focused after a generated password is filled → Bug 1560029 - Make password field values visible when focused after a generated password is filled. r=sfoster
Pushed by mozilla@noorenberghe.ca:
https://hg.mozilla.org/integration/autoland/rev/38187d481a68
Import LoginTestUtils in pwmgr_common.js for mochitest-plain. r=sfoster
https://hg.mozilla.org/integration/autoland/rev/78387323c272
Share GENERATED_PASSWORD_* consts between test frameworks. r=sfoster
https://hg.mozilla.org/integration/autoland/rev/0a46342d12f4
Make password field values visible when focused after a generated password is filled. r=sfoster

Verified - Fixed on latest Nightly 70.0a1 (2019-07-29) (64-bit) on Windows 10, MacOS 10.14 and Ubuntu 18.04.

  • after generating a password, it can be revealed by focusing the field via click or keyboard navigation
  • NVDA screen reader will also read out loud the unmasked password
Status: RESOLVED → VERIFIED
Flags: qe-verify+
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: