Closed
Bug 412381
Opened 17 years ago
Closed 16 years ago
Clear Private Data should delete old signons.txt file(s).
Categories
(Toolkit :: Password Manager, defect)
Toolkit
Password Manager
Tracking
()
RESOLVED
FIXED
mozilla1.9beta4
People
(Reporter: Dolske, Assigned: Dolske)
Details
(Keywords: privacy)
Attachments
(1 file, 2 obsolete files)
8.94 KB,
patch
|
Gavin
:
review+
beltzner
:
approval1.9+
|
Details | Diff | Splinter Review |
We've upgraded from signons.txt to signons2.txt and now to signons3.txt. Data is automatically imported from old files, but the old files are not removed. Clear private data calls nsILoginManager.removeAllLogins(), which should go ahead and nuke any old files. Related: Bug 329741 discusses deleting other files based on last-modified times.
Assignee | ||
Updated•17 years ago
|
Assignee: nobody → dolske
Assignee | ||
Updated•17 years ago
|
Target Milestone: --- → Firefox 3 beta4
Assignee | ||
Comment 1•16 years ago
|
||
Comment 2•16 years ago
|
||
Comment on attachment 301358 [details] [diff] [review] Patch, work in progress >+ * Deletes any stoage files that we're not using any more. s/stoage/storage/
Comment 3•16 years ago
|
||
Wanted, not blocking.
Flags: wanted-firefox3+
Flags: blocking-firefox3?
Flags: blocking-firefox3-
Assignee | ||
Comment 4•16 years ago
|
||
Attachment #301358 -
Attachment is obsolete: true
Attachment #305706 -
Flags: review?(gavin.sharp)
Comment 5•16 years ago
|
||
Comment on attachment 305706 [details] [diff] [review] Patch v.2 >Index: toolkit/components/passwordmgr/src/storage-Legacy.js >+ _removeOldSignonsFiles : function() { >+ // Get the location of the user's profile. >+ var DIR_SERVICE = new Components.Constructor( >+ "@mozilla.org/file/directory_service;1", "nsIProperties"); >+ var pathname = (new DIR_SERVICE()).get("ProfD", Ci.nsIFile).path; >+ >+ // We've used a number of prefs over time due to compatibility issues. >+ // Skip the first entry (the newest) and delete the others. >+ for (var i = 1; i < this._filenamePrefs.length; i++) { >+ var prefName = this._filenamePrefs[i]; >+ >+ var filename = this._prefBranch.getCharPref(prefName); >+ >+ var file = Cc["@mozilla.org/file/local;1"]. >+ createInstance(Ci.nsILocalFile); >+ file.initWithPath(pathname); >+ file.append(filename); I didn't notice this when I reviewed the original code that this is copied from, but there's no point in using a Constructor when you only get the service once, and you could keep a reference to the profile's nsIFile and clone it each time rather than keeping the pathName and calling createInstance/initWithPath each time. Could also move that logic into a getFileFromPref function and share this code with _getSignonsFile? Otherwise this looks fine.
Assignee | ||
Comment 6•16 years ago
|
||
Attachment #305706 -
Attachment is obsolete: true
Attachment #305869 -
Flags: review?(gavin.sharp)
Attachment #305706 -
Flags: review?(gavin.sharp)
Assignee | ||
Updated•16 years ago
|
Attachment #305869 -
Attachment is patch: true
Attachment #305869 -
Attachment mime type: application/octet-stream → text/plain
Updated•16 years ago
|
Attachment #305869 -
Flags: review?(gavin.sharp) → review+
Assignee | ||
Updated•16 years ago
|
Attachment #305869 -
Flags: approval1.9?
Comment 7•16 years ago
|
||
Comment on attachment 305869 [details] [diff] [review] Patch v.3 a=beltzner for 1.9
Attachment #305869 -
Flags: approval1.9? → approval1.9+
Assignee | ||
Comment 8•16 years ago
|
||
Checking in toolkit/components/passwordmgr/src/storage-Legacy.js; new revision: 1.24; previous revision: 1.23 Checking in toolkit/components/passwordmgr/test/unit/head_storage_legacy_1.js; new revision: 1.10; previous revision: 1.9 Checking in toolkit/components/passwordmgr/test/unit/test_storage_legacy_2.js; new revision: 1.6; previous revision: 1.5
Status: NEW → RESOLVED
Closed: 16 years ago
Flags: in-testsuite+
Resolution: --- → FIXED
Updated•16 years ago
|
Product: Firefox → Toolkit
You need to log in
before you can comment on or make changes to this bug.
Description
•