Closed
Bug 443880
Opened 16 years ago
Closed 16 years ago
incorrect comments in nsILoginInfo IDL regarding usernameField / passwordField
Categories
(Toolkit :: Password Manager, defect)
Toolkit
Password Manager
Tracking
()
RESOLVED
FIXED
mozilla1.9.1b1
People
(Reporter: myk, Assigned: Dolske)
Details
According to nsILoginInfo.idl, the nsILoginInfo::usernameField is null "for logins obtained from a HTTP or FTP authentication," but handing nsILoginManager::addLogin an nsILoginInfo with a null value for that property throws "l.usernameField is null" at storage-Legacy.js (line 504), which is the second to last line of the following block of code: /* * _checkLoginValues * * Due to the way the signons2.txt file is formatted, we need to make * sure certain field values or characters do not cause the file to * be parse incorrectly. Reject logins that we can't store correctly. */ _checkLoginValues : function (aLogin) { function badCharacterPresent(l, c) { return ((l.formSubmitURL && l.formSubmitURL.indexOf(c) != -1) || (l.httpRealm && l.httpRealm.indexOf(c) != -1) || l.hostname.indexOf(c) != -1 || l.usernameField.indexOf(c) != -1 || l.passwordField.indexOf(c) != -1); It's not clear whether the docs are wrong or the code is buggy, but one of them must be errant, since they disagree.
Reporter | ||
Comment 1•16 years ago
|
||
Note: the same is presumably also true for passwordField.
Assignee | ||
Comment 2•16 years ago
|
||
.usernameField and .passwordField should just be empty-string if unused, see bug 413314. Looks like I missed a spot when fixing docs? *sigh*
Assignee | ||
Updated•16 years ago
|
Assignee: nobody → dolske
Updated•16 years ago
|
Product: Firefox → Toolkit
Assignee | ||
Comment 3•16 years ago
|
||
I updated DevMo (http://developer.mozilla.org/en/NsILoginInfo) when originally fixing bug 413314. Pushed changeset 6f9506ad113e with the updates to the IDL comments.
Assignee | ||
Updated•16 years ago
|
Status: NEW → RESOLVED
Closed: 16 years ago
OS: Linux → All
Hardware: PC → All
Resolution: --- → FIXED
Summary: null nsILoginInfo::usernameField triggers |l.usernameField is null| exception at storage-Legacy.js line 504 → incorrect comments in nsILoginInfo IDL regarding usernameField / passwordField
Target Milestone: --- → mozilla1.9.1b1
Version: unspecified → Trunk
You need to log in
before you can comment on or make changes to this bug.
Description
•