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

VERIFIED FIXED in Firefox 67

Status

()

defect
P2
normal
VERIFIED FIXED
3 months ago
2 months ago

People

(Reporter: MattN, Assigned: prathiksha)

Tracking

(Blocks 1 bug)

unspecified
mozilla67
Points:
---
Dependency tree / graph

Firefox Tracking Flags

(firefox67 verified, firefox68 verified)

Details

Attachments

(2 attachments, 1 obsolete attachment)

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

Updated

3 months ago
Assignee: nobody → prathikshaprasadsuman
Status: NEW → ASSIGNED
Assignee

Comment 4

3 months ago

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

Attachment #9047079 - Attachment is obsolete: true

Comment 5

2 months ago
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

Comment 6

2 months ago
bugherder
Status: ASSIGNED → RESOLVED
Last Resolved: 2 months ago
Resolution: --- → FIXED
Target Milestone: --- → mozilla67

@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.