Closed Bug 1032875 Opened 10 years ago Closed 10 years ago

move empty gethashUrl check to after getting the table completer

Categories

(Core :: DOM: Security, defect)

x86_64
Linux
defect
Not set
normal

Tracking

()

RESOLVED FIXED
mozilla33

People

(Reporter: mmc, Assigned: mmc)

References

Details

Attachments

(1 file)

Otherwise on startup, listmanager may be null and gethashUrl may be empty and crash on toolkit/components/url-classifier/nsUrlClassifierDBService.cpp:843
Assignee: nobody → mmc
Status: NEW → ASSIGNED
Attachment #8448816 - Flags: review?(gpascutto)
Comment on attachment 8448816 [details] [diff] [review]
Move empty gethash URL check in case listmanager is not ready (

Review of attachment 8448816 [details] [diff] [review]:
-----------------------------------------------------------------

So what you're saying is that we're being asked to classify URLs before SafeBrowsing is fully initialized, and it's getting *hits that need to be gethashed*, but we can't because we're not initialized?

That seems bad. Why does this happen? I'm assuming its on one of the whitelist+dontcomplete tables, and the GetCompleter check fixes this because it will exempt them?

I guess it makes sense that if there's no Completer there won't be a gethash URL, though? But what's the relation to startup then? I'm slightly confused here.
Attachment #8448816 - Flags: review?(gpascutto) → review+
I think what is happening is that nsUrlClassifierDBService.cpp is reading preference browser.safebrowsing.enabled before listmanager gets initialized. Then if it finds a hit in an existing table, it goes ahead and tries to get listmanager, which may be initialized but before registerTable is called.

Then the gethashURL isn't set for that table and DBService crashes.
https://hg.mozilla.org/mozilla-central/rev/6598283d4cc8
Status: ASSIGNED → RESOLVED
Closed: 10 years ago
Resolution: --- → FIXED
Target Milestone: --- → mozilla33
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: