Closed Bug 1570159 Opened 6 years ago Closed 6 years ago

URL classifier doesn't classify URL when its top level window is about page

Categories

(Toolkit :: Safe Browsing, defect, P2)

defect

Tracking

()

RESOLVED FIXED
mozilla72
Tracking Status
firefox72 --- fixed

People

(Reporter: tnikkel, Assigned: dimi)

References

Details

Attachments

(3 files, 1 obsolete file)

No description provided.

I see these a lot and it makes it hard to find warnings or assertions that may be relevant to the code I'm working on.

Summary: silence from warning spam in url classifier code → silence some warning spam in url classifier code
Priority: -- → P3
Whiteboard: [necko-triaged]
Component: Networking → Safe Browsing
Product: Core → Toolkit

The product::component has been changed since the backlog priority was decided, so we're resetting it.
For more information, please visit auto_nag documentation.

Priority: P3 → --
Whiteboard: [necko-triaged]

Most of the warnings seem related to whitelist.
Timothy, can you help upload a log with MOZ_LOG="nsChannelClassifier", I want to know if we can eliminate this without removing NS_WARN

Priority: -- → P3

Sure I can do that tomorrow. Do you not see these warnings in your local builds? I see them on all my machines (2 Windows, 1 linux, 1 mac).

(In reply to Timothy Nikkel (:tnikkel) from comment #4)

Sure I can do that tomorrow. Do you not see these warnings in your local builds? I see them on all my machines (2 Windows, 1 linux, 1 mac).

No, I tried(but didn't really spend a lot of time trying) and didn't see it.
I just back from a long PTO so maybe my build is out-of-date or something.

Attached file urllog

Here is a log from opening the browser, going to google and performing a search. Note that I opened the browser a couple of times before this to make sure everything was initialized in case that matters.

Flags: needinfo?(dlee)

Hi Timothy
It looks like those errors occurred while loading sites in about:home (can't get the hostname of top-level window about:home)
My local build doesn't trigger any network load while opening about:home , can you help confirm this issue happens in your build while opening about:home? thanks!

Flags: needinfo?(dlee)

Yeah, the warnings come up (at least) when I open about:home.

Perhaps the difference in our location causes about:home to be different? Could you use a proxy to north america to reproduce?

Attached file empty.html

Reloading this file triggers one of the warnings. Specifically

https://searchfox.org/mozilla-central/rev/ab6f4c453d15ab82147c630a8b886b40240ca72b/netwerk/url-classifier/UrlClassifierCommon.cpp#311

pageHostname is the empty string and resourceDomain is imageshack.com

Hi Timothy,
Thank for providing information on this bug.
I intend to fix this by handling these special cases. Those warning messages actually help because they lead us to this bug :)
And if you don't mind, I'll steal this bug from you.

Priority: P3 → P2
Summary: silence some warning spam in url classifier code → URL classifier doesn't classify URL when its top level window is about page
Assignee: tnikkel → dlee
Status: NEW → ASSIGNED

When the top-level page is an about page, UrlClassifeirCommon::CreatePairwiseWhitelistURI
returns an error because |GetHost| call fails.
Since we don't have a pairwise whitelist URI whose top-level page is an
about page, we could just skip an about page in this case.

Note that the lookup against blacklist tables will still be performed, we
just skip looking for a match in whitelist tables.

Attachment #9103083 - Attachment description: Bug 1570159 - Do not create a pairwise whitelist URI when the top-level page is an about page. r?ehsan → Bug 1570159 - CreatePairwiseWhitelistURI return success when it cannot get host from the top-level page. r?ehsan
Pushed by dlee@mozilla.com: https://hg.mozilla.org/integration/autoland/rev/ec5ffc5cb2a8 CreatePairwiseWhitelistURI return success when it cannot get host from the top-level page. r=Ehsan
Status: ASSIGNED → RESOLVED
Closed: 6 years ago
Resolution: --- → FIXED
Target Milestone: --- → mozilla72
Depends on: 1591645
Attachment #9081797 - Attachment is obsolete: true
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: