Closed Bug 448372 Opened 17 years ago Closed 17 years ago

Sensitive cookie data remains readable and on disk in cookies.sqlite after "Clear Private Data" and "Remove All Cookies"

Categories

(Core :: Networking: Cookies, defect, P1)

defect

Tracking

()

RESOLVED FIXED
mozilla1.9.1a2

People

(Reporter: laz3rdin0zaurrrz, Assigned: sdwilsh)

References

()

Details

(Keywords: privacy)

Attachments

(2 files, 1 obsolete file)

User-Agent: Mozilla/5.0 (Windows; U; Windows NT 5.1; en-GB; rv:1.9.0.1) Gecko/2008070208 Firefox/3.0.1 Build Identifier: Mozilla/5.0 (Windows; U; Windows NT 5.1; en-GB; rv:1.9.0.1) Gecko/2008070208 Firefox/3.0.1 I'm running Firefox 3.0.1 on Windows XP. Earlier today, I went on a privacy rampage, and cleared all of my cookies, and set Firefox to clear cookies on close and all. The cookies.sqlite file has retained a significant amount of data. I'm not sure if they're complete cookies, or what, but it remains that Firefox thinks it has one, but there are 342 stored on the filesystem. I'm not sure why this is, or if this is intended behaviour, but I really think "Remove All Cookies" should, indeed, "Remove" them. http://img300.imageshack.us/img300/4764/firefoxcookiesqt6.png There's a comparison of the data in cookies.sqlite, and Firefox's idea of what's in there Reproducible: Didn't try Steps to Reproduce: 1. Open Firefox and observe listings in Tools->Options->Privacy->Show Cookies 2. Close Firefox 3. Open cookies.sqlite in some database software Actual Results: There were a significant number of cookies in cookies.sqlite not listed in the Firefox Show Cookies window Expected Results: The cookie data should not be present "Starting in Firefox 3.0 and SeaMonkey 2.0, cookie information is stored in "cookies.sqlite" and "permissions.sqlite". " http://kb.mozillazine.org/Cookies I presume that means that when Firefox talks about cookies, it's talking about the cookies in cookies.sqlite. So, when it talks about removing cookies, it's talking about removing the cookies in cookies.sqlite
Component: Places → Networking: Cookies
Product: Firefox → Core
QA Contact: places → networking.cookies
Version: unspecified → Trunk
I tried to replicate this bug using Firefox 3.0.1 on a fresh install on Windows XP. The cookies were removed as expected. These are before and after screenshots of the SQLite table; Before: http://img410.imageshack.us/img410/7929/unclearedcookiesft8.png After: http://img380.imageshack.us/img380/5046/clearedcookieswk8.png This install is not more than a couple weeks old, although I'm unsure if it's upgraded from version 3.0 or a fresh 3.0.1. Regardless, the bug didn't occur when I attempted to reproduce it.
Created a TestCase profile to explore this further Firefox running TestCase profile with default's cookie file: fails Firefox running TestCase profile with testcase's cookie file: passes Firefox running Default profile with default's cookie file: fails Firefox running Default profile with testcase's cookie file: passes The problem seems to be in the original cookies.sqlite file.
http://mxr.mozilla.org/mozilla-central/source/netwerk/cookie/src/nsCookieService.cpp#780 something's going wrong with that command - perhaps an async failure, database corruption, etc. the failure may not be propagating (via the NS_FAILED(rv) check) due to async, but it's happening. sanjay, can you email me a "good" and "bad" sqlite file to dwitte@stanford.edu? (don't attach it here, unless you have no personal information in there.) we can do some checks to see if there's any corruption going on, or somesuch.
Keywords: privacy
I was helping Dan with this at the Firefox summit just now. Turns out the bad database is in fact corrupted, which is why things aren't being removed. Cookies needs to be doing an integrity or quick check on the database to detect this every so often (since it's running with synchronous = OFF)
Assignee: nobody → sdwilsh
Status: UNCONFIRMED → NEW
Ever confirmed: true
Priority: -- → P1
Whiteboard: [needs patch]
Target Milestone: --- → mozilla1.9.1a2
Attached patch v1.0 (obsolete) — Splinter Review
Remove the database file if the delete action fails.
Attachment #333126 - Flags: review?
Whiteboard: [needs patch] → [has patch][needs review dwitte]
Attachment #333126 - Flags: review? → review?(dwitte)
Comment on attachment 333126 [details] [diff] [review] v1.0 r=me but remove the (void)'s, it's not prevailing style and that trumps. will be awesome to get async api love here!
Attachment #333126 - Flags: review?(dwitte) → review+
Depends on: 449990
Attached patch v1.1Splinter Review
for checkin
Attachment #333126 - Attachment is obsolete: true
Keywords: checkin-needed
Whiteboard: [has patch][needs review dwitte] → [has patch][has review][can land]
Pushed as 17099:815620b45c2f.
Status: NEW → RESOLVED
Closed: 17 years ago
Keywords: checkin-needed
OS: Windows XP → All
Hardware: PC → All
Resolution: --- → FIXED
Whiteboard: [has patch][has review][can land]
this isn't really fixed, just slightly improved - but i'll let it slide since we have a bug on file (bug 449990) for async work.
not fixed in 3.6.* cookies will NOT delete at all. please fix it.
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: