"Password Saved!" toast is displayed every time after editing the username for a newly generated password
Categories
(Toolkit :: Password Manager, defect, P1)
Tracking
()
People
(Reporter: tbabos, Assigned: sfoster)
References
(Blocks 1 open bug)
Details
Attachments
(1 file)
Affected Versions:
Nightly 76 (03-26-2020)
Tested on:
Windows 10 x64
Steps to reproduce:
- Launch FF
- Go to Facebook.com
- Generate a password
- Type in a username and click out
- Edit the username and click out multiple times
Expected Results:
The "Password Saved!" toast should not be displayed for username edits
Actual Results:
"Password Saved!" toast is displayed every time after editing the username for a newly generated password
Notes:
Recording can be found here
Dismissed doorhanger is not enabled yet on Beta and Release
| Assignee | ||
Updated•6 years ago
|
| Assignee | ||
Updated•6 years ago
|
| Assignee | ||
Comment 1•6 years ago
|
||
Comment 3•6 years ago
|
||
Backed out changeset 210fed59a348 (Bug 1625242) for xpcshell failures at test_LoginManagerParent_onPasswordEditedOrGenerated.js.
https://hg.mozilla.org/integration/autoland/rev/4ee309f18e609d6321ff7b5ae23101f72e113181
Failure log:
https://treeherder.mozilla.org/logviewer.html#/jobs?job_id=296216841&repo=autoland&lineNumber=2746
| Assignee | ||
Comment 4•6 years ago
|
||
(In reply to Cristian Brindusan [:cbrindusan] from comment #3)
Oops, I guess I forgot to run the xpcshells tests. Thanks for the backout.
That test had a related bug - it expected that updating the (generated) password wouldn't trigger the toast (when it should). The fix is trivial but I want to understand why this was passing before (and why my patch exposed this issue)
| Assignee | ||
Comment 5•6 years ago
|
||
In test_addUsernameBeforeAutoSaveEdit:
- We first call into _onPasswordEditedOrGenerated to generate a password and store the auto-saved no-username login
- We then update the auto-saved login to give it a username
- The next call to _onPasswordEditedOrGenerated correctly matches the auto-saved login and updates it with the new password value
- The conditions for first block that calls to promptToChangePassword say that if
shouldAutoSaveLogin && !formLogin.usernameis true. Its not, the form has a username value. OrexistingLogin.password != formLogin.passwordis true. Its not, we already updated existingLogin.password to be the newly changed (originally generated) password. So, onto the next.. - The next block asks if
!existingLogin.username && formLogin.usernameis true. Its not, the existing login here is the auto-saved login, and this test put a username on that login earlier
- The conditions for first block that calls to promptToChangePassword say that if
- So we fall into the last block, where the comment says "No change to existing login". As its assumed there was no change here, the
notifySavedparam is false. - The asserts on the arguments to promptToChangePassword expect notifySaved to be false. It was (but shouldn't have been)
Ok. So the patch fixes the above logic so notifySaved is true whenever we save or modify the auto-saved login. And I've updated the patch to correct the assertion so that notifySaved should be true for this case (as the password changed and the auto-saved login was indeed saved)
Comment 7•6 years ago
|
||
| bugherder | ||
| Reporter | ||
Comment 8•5 years ago
|
||
Verified-fixed on latest Firefox Nightly 76.0a1 (2020-04-06) on Windows 10, MacOS 10.13 and Ubuntu 16.04.
The "Password Saved!" toast no longer appears for username edits of a generated password.
The blue key turns into grey when the username is edited and the edits are correctly reflected in the doorhanger.
Description
•