Closed Bug 1529946 Opened 1 year ago Closed 1 year ago

Don't repeatedly prompt to save the same username and password combination in the same document

Categories

(Toolkit :: Password Manager, defect, P2)

defect

Tracking

()

VERIFIED FIXED
mozilla67
Tracking Status
firefox67 --- verified
firefox68 --- verified

People

(Reporter: MattN, Assigned: prathiksha)

References

(Blocks 1 open bug)

Details

Attachments

(2 files, 1 obsolete file)

We shouldn't repeatedly prompt to save the save username and password combination for the same FormLike as the user had a chance to save on the first submission.

This can occur in single-page apps where pushState/replaceState triggers our doorhanger but the login fields don't get removed from the page, sometimes just hidden.

There is already an implementation at https://phabricator.services.mozilla.com/D21378 which just needs tests to land.

Note that I'm not working on this bug but just attached my patch which someone can write tests for.

The test for this would need to be for login fields not inside a <form> (since this blocks bug 1287202 which implements saving those) or using preventDefault on the 'submit' event (or onsubmit="return false") like https://searchfox.org/mozilla-central/rev/00f3836a87b844b5e4bc82f698c559b9966e4be2/toolkit/components/passwordmgr/test/mochitest/test_onsubmit_value_change.html#17-26,32

Assignee: nobody → prathikshaprasadsuman
Status: NEW → ASSIGNED

Don't prompt to save the same username and password combination in the same document.

Blocks: 1533383
Attachment #9047079 - Attachment is obsolete: true
Pushed by prathikshaprasadsuman@gmail.com:
https://hg.mozilla.org/integration/autoland/rev/cbb4a76be84b
Don't prompt to save the same username and password combination in the same document. r=MattN
Status: ASSIGNED → RESOLVED
Closed: 1 year ago
Resolution: --- → FIXED
Target Milestone: --- → mozilla67
Depends on: 1535222
Depends on: 1535483

@Matt: Can you please provide me with a page that reproduced the problem and some steps?

Flags: needinfo?(MattN+bmo)

(In reply to Bodea Daniel [:danibodea] from comment #7)

@Matt: Can you please provide me with a page that reproduced the problem and some steps?

I don't know a public one off the top of my head but you can use this one I just created (modified from attachment 8880688 [details]).

If you click one of the buttons after typing a password then you should get prompted to save/update but if you don't save/update then clicking buttons again without reloading shouldn't cause the same prompt to keep appearing. You should be able to see the problem with Firefox 66 using this testcase.

Flags: needinfo?(MattN+bmo)

I have verified this fix on Nightly v68.0a1 and Beta v67.0b7 on Windows 10 and Mac OS 10.13.6 using the STR from comment 8. Thanks.

Status: RESOLVED → VERIFIED
You need to log in before you can comment on or make changes to this bug.