Closed
Bug 346184
Opened 18 years ago
Closed 18 years ago
If urlclassifier.sqlite is removed, db is not repopulated
Categories
(Toolkit :: Safe Browsing, defect)
Tracking
()
RESOLVED
FIXED
Firefox 2 beta2
People
(Reporter: vlad, Assigned: tony)
Details
(Keywords: fixed1.8.1, Whiteboard: [has patch])
Attachments
(2 files, 1 obsolete file)
21.57 KB,
patch
|
Details | Diff | Splinter Review | |
17.39 KB,
patch
|
mconnor
:
approval1.8.1+
|
Details | Diff | Splinter Review |
After fixing bug 334174 and purposely corrupting the urlclassifier.sqlite db, the database is deleted and a new one is opened. However, the new database stays at 0-size, never getting populated. My guess is that safe browsing records that it downloaded the data once and then doesn't do so again, maybe?
Reporter | ||
Updated•18 years ago
|
Flags: blocking-firefox2?
Version: Trunk → 2.0 Branch
Assignee | ||
Updated•18 years ago
|
Assignee: nobody → tony
Assignee | ||
Comment 1•18 years ago
|
||
(some notes to myself) Anti-phishing keeps track of table version numbers in user prefs. So if the DB is corrupt and we remove it, we should delete those prefs. Look around NS_ERROR_FILE_CORRUPTED in nsUrlClassifierDBService.cpp.
Reporter | ||
Comment 2•18 years ago
|
||
I'd suggest using TableExists() to check for the presence of one of the url classifier's data tables, and nuking the prefs if they're not present. That way you cover the case of urclassifier.sqlite being removed by the user as well
Updated•18 years ago
|
Flags: blocking-firefox2? → blocking-firefox2+
Assignee | ||
Comment 3•18 years ago
|
||
This has to be done async because the db is on one thread but we can only clear prefs from the main thread. I also removed the callback wrapper since we don't need it anymore. Also removed checkMac_ from listmanager.js since we don't use it either.
Attachment #231168 -
Flags: review?(darin)
Comment 4•18 years ago
|
||
Tony, some virus scanners appear to be picking up urlclassifier.sqlite-journal due to the phishing urls http://forums.mozillazine.org/viewtopic.php?t=445171
Reporter | ||
Comment 5•18 years ago
|
||
But they don't pick up urlclassifier.sqlite? curious, I guess they're just watching for file creation or something? This could be pretty painful for the release, though. =/
Assignee | ||
Comment 6•18 years ago
|
||
(In reply to comment #4) > Tony, some virus scanners appear to be picking up urlclassifier.sqlite-journal > due to the phishing urls > http://forums.mozillazine.org/viewtopic.php?t=445171 This is bug 329715. I tried reproducing using AntiVir, but can't seem to get it to trigger. I'll try again on windows.
Updated•18 years ago
|
Whiteboard: [has patch][needs review darin]
Comment 7•18 years ago
|
||
Comment on attachment 231168 [details] [diff] [review] v1: check db tables before sending an update request >Index: toolkit/components/url-classifier/src/nsUrlClassifierDBService.cpp >+ const nsDependentCSubstring &tableName = Substring(tableNames, cur, >+ next - cur); For things like this, if you want to type slightly less, I think you can just do: const nsCSubstring &tableName = Substring(...) That also nicely hides the "nsDependentCSubstring" type, which I believe is somewhat of an implementation detail. r=darin
Attachment #231168 -
Flags: review?(darin) → review+
Assignee | ||
Comment 8•18 years ago
|
||
Attachment #231168 -
Attachment is obsolete: true
Assignee | ||
Comment 9•18 years ago
|
||
on trunk
Assignee | ||
Comment 10•18 years ago
|
||
Patch for bonecho. Still keeps the callback wrapper since bug 337492 is targetted at moz 1.9.
Updated•18 years ago
|
Target Milestone: --- → Firefox 2 beta2
Assignee | ||
Updated•18 years ago
|
Attachment #231641 -
Flags: approval1.8.1?
Assignee | ||
Updated•18 years ago
|
Whiteboard: [has patch][needs review darin] → [has patch]
Comment 11•18 years ago
|
||
Comment on attachment 231641 [details] [diff] [review] bonecho patch a=mconnor on behalf of drivers for checkin to 1.8 branch for 1.8.1
Attachment #231641 -
Flags: approval1.8.1? → approval1.8.1+
Assignee | ||
Comment 12•18 years ago
|
||
on branch
Updated•10 years ago
|
Product: Firefox → Toolkit
You need to log in
before you can comment on or make changes to this bug.
Description
•