Closed Bug 400892 Opened 17 years ago Closed 17 years ago

Saving form passwords broken when info bars are not available.

Categories

(Toolkit :: Password Manager, defect)

x86
Linux
defect
Not set
normal

Tracking

()

RESOLVED FIXED
mozilla1.9beta1

People

(Reporter: standard8, Assigned: standard8)

Details

Attachments

(1 file)

Attached patch The fixSplinter Review
I'm currently trying to integrate toolkit's password manager with SeaMonkey. SeaMonkey doesn't currently have an information bar like Firefox, and the way the password manager code is written, it seems to allow for this case.

When I go to addons.mozilla.org, for example, enter my details and then select to remember password, I get this message repeated twice on the console:

Error: login has no properties
Source File: file:///mozilla/master/mozilla/sm/dist/bin/components/nsLoginManager.js
Line: 343

Tracking it down, nsLoginManagerPrompter.js in _showSaveLoginDialog is calling addLogin with "aLogin.formLogin". This property does not exist, it should just be "aLogin" (see http://mxr.mozilla.org/seamonkey/search?string=formLogin&find=&findi=&filter=&tree=seamonkey for example).

Patch attached.

I don't know how to do a unit/mochitest for this as the prompt code requires dialogs to be displayed and I've not yet worked out how to hook into a dialog after its displayed (and setTimeout doesn't seem to work for mochitests/modal dialogs either). So if you want me to do a test, I'll need some suggestions for it.
Attachment #285927 - Flags: review?(dolske)
Comment on attachment 285927 [details] [diff] [review]
The fix

Yeah, this was a trivial typo. We don't have a good way to poke at dialogs yet, so I don't think there's any point in trying to create an automated test here.
Attachment #285927 - Flags: review?(gavin.sharp)
Attachment #285927 - Flags: review?(dolske)
Attachment #285927 - Flags: review+
Attachment #285927 - Flags: review?(gavin.sharp) → review+
Comment on attachment 285927 [details] [diff] [review]
The fix

Requesting approval for M9. Low risk patch that fixes typo.

I'm not sure if there's any place where FF would hit this, possibly authenticated RSS feeds I suppose, but extensions/other xul based apps will need this if they don't supply info bars.
Attachment #285927 - Flags: approvalM9?
Comment on attachment 285927 [details] [diff] [review]
The fix

a=endgame drivers for M9
Attachment #285927 - Flags: approvalM9?
Attachment #285927 - Flags: approvalM9+
Attachment #285927 - Flags: approval1.9+
Patch checked in -> fixed
Status: NEW → RESOLVED
Closed: 17 years ago
Resolution: --- → FIXED
Target Milestone: --- → Firefox 3 M9
Product: Firefox → Toolkit
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: