Closed
Bug 1262406
Opened 8 years ago
Closed 8 years ago
Track element doesn't use the URL classifier
Categories
(Toolkit :: Safe Browsing, defect)
Toolkit
Safe Browsing
Tracking
()
RESOLVED
FIXED
mozilla49
Tracking | Status | |
---|---|---|
firefox49 | --- | fixed |
People
(Reporter: dlee, Assigned: dlee)
References
(Blocks 1 open bug)
Details
Attachments
(2 files, 1 obsolete file)
HTML Track element open a channel when load resource, but it doesn't specify the nsIChannel::LOAD_CLASSIFY_URI loadflag when open channel
Assignee | ||
Updated•8 years ago
|
Assignee: nobody → dlee
Assignee | ||
Comment 1•8 years ago
|
||
Assignee | ||
Comment 2•8 years ago
|
||
Review commit: https://reviewboard.mozilla.org/r/44859/diff/#index_header See other reviews: https://reviewboard.mozilla.org/r/44859/
Attachment #8738932 -
Flags: review?(francois)
Attachment #8738933 -
Flags: review?(francois)
Assignee | ||
Comment 3•8 years ago
|
||
Review commit: https://reviewboard.mozilla.org/r/44861/diff/#index_header See other reviews: https://reviewboard.mozilla.org/r/44861/
Assignee | ||
Updated•8 years ago
|
Attachment #8738544 -
Attachment is obsolete: true
Comment 4•8 years ago
|
||
Comment on attachment 8738932 [details] MozReview Request: Bug 1262406 - P1. Track element doesn't use the URL classifier. r=francois https://reviewboard.mozilla.org/r/44859/#review41565 ::: dom/html/HTMLTrackElement.cpp:218 (Diff revision 1) > uri, > static_cast<Element*>(this), > nsILoadInfo::SEC_ALLOW_CROSS_ORIGIN_DATA_INHERITS, > nsIContentPolicy::TYPE_INTERNAL_TRACK, > - loadGroup); > + loadGroup, > + nullptr, Nit: personally, I like to leave a comment next to the `nullptr` here just to label it and help show it was intentional: https://hg.mozilla.org/mozilla-central/rev/cc28ecb2b687#l1.21
Attachment #8738932 -
Flags: review?(francois) → review+
Comment 5•8 years ago
|
||
Comment on attachment 8738933 [details] MozReview Request: Bug 1262406 - P2. Classify track element testcase. r=francois https://reviewboard.mozilla.org/r/44861/#review41567 ::: toolkit/components/url-classifier/tests/mochitest/test_classify_track.html:21 (Diff revision 1) > + const PREF = "browser.safebrowsing.malware.enabled"; > + const track_path = "tests/toolkit/components/url-classifier/tests/mochitest/basic.vtt"; > + > + // Use different url to avoid url classifier bypass classify because of cache. > + const malware_url1 = "test1.example.org/"; > + const malware_url2 = "test2.example.org/"; I wonder here if you could simply add a bogus query string parameter to turn the second one into a different URL for cache purposes: example.org/tests/toolkit/components/url-classifier/tests/mochitest/basic.vtt and example.org/tests/toolkit/components/url-classifier/tests/mochitest/basic.vtt?againplease I'm being a bit paranoid here, but the advantage of doing it this way is that you can add a single entry to the malware list and then you're actually checking the same blacklisted domain in the last two tests (testBlacklistTrackSafebrowsingOff and testBlacklistTrackSafebrowsingOn). The issue with tests is that there's nothing to "test the tests", so I like to keep them as simple as possible to make sure they don't start to silently pass when they shouldn't :)
Attachment #8738933 -
Flags: review?(francois)
Assignee | ||
Updated•8 years ago
|
Status: NEW → ASSIGNED
Assignee | ||
Comment 6•8 years ago
|
||
(In reply to François Marier [:francois] from comment #5) > Comment on attachment 8738933 [details] > MozReview Request: Bug 1262406 - P2. Classify track element testcase. > I wonder here if you could simply add a bogus query string parameter to turn > the second one into a different URL for cache purposes: > > example.org/tests/toolkit/components/url-classifier/tests/mochitest/basic.vtt > > and > > example.org/tests/toolkit/components/url-classifier/tests/mochitest/basic. > vtt?againplease Yes, this can avoid cache! Thanks for the suggestion :)
Assignee | ||
Comment 7•8 years ago
|
||
Comment on attachment 8738932 [details] MozReview Request: Bug 1262406 - P1. Track element doesn't use the URL classifier. r=francois Review request updated; see interdiff: https://reviewboard.mozilla.org/r/44859/diff/1-2/
Attachment #8738932 -
Attachment description: MozReview Request: Bug 1262406 - P1. Track element doesn't use the URL classifier. r?francois → MozReview Request: Bug 1262406 - P1. Track element doesn't use the URL classifier. r=francois
Attachment #8738933 -
Flags: review?(francois)
Assignee | ||
Comment 8•8 years ago
|
||
Comment on attachment 8738933 [details] MozReview Request: Bug 1262406 - P2. Classify track element testcase. r=francois Review request updated; see interdiff: https://reviewboard.mozilla.org/r/44861/diff/1-2/
Updated•8 years ago
|
Attachment #8738933 -
Flags: review?(francois) → review+
Comment 9•8 years ago
|
||
Comment on attachment 8738933 [details] MozReview Request: Bug 1262406 - P2. Classify track element testcase. r=francois https://reviewboard.mozilla.org/r/44861/#review41843
Comment 10•8 years ago
|
||
https://reviewboard.mozilla.org/r/44859/#review41845 ::: dom/html/HTMLTrackElement.cpp:217 (Diff revision 2) > rv = NS_NewChannel(getter_AddRefs(channel), > uri, > static_cast<Element*>(this), > nsILoadInfo::SEC_ALLOW_CROSS_ORIGIN_DATA_INHERITS, > nsIContentPolicy::TYPE_INTERNAL_TRACK, > - loadGroup); > + loadGroup, // aLoadGroup nit: that one is pretty obvious from the name of the variable already :)
Assignee | ||
Comment 11•8 years ago
|
||
Comment on attachment 8738932 [details] MozReview Request: Bug 1262406 - P1. Track element doesn't use the URL classifier. r=francois Review request updated; see interdiff: https://reviewboard.mozilla.org/r/44859/diff/2-3/
Assignee | ||
Comment 12•8 years ago
|
||
Comment on attachment 8738933 [details] MozReview Request: Bug 1262406 - P2. Classify track element testcase. r=francois Review request updated; see interdiff: https://reviewboard.mozilla.org/r/44861/diff/2-3/
Assignee | ||
Comment 13•8 years ago
|
||
(In reply to Dimi Lee[:dimi][:dlee] from comment #11) > Comment on attachment 8738932 [details] > MozReview Request: Bug 1262406 - P1. Track element doesn't use the URL > classifier. r=francois > > Review request updated; see interdiff: > https://reviewboard.mozilla.org/r/44859/diff/2-3/ Address nit.
Assignee | ||
Comment 14•8 years ago
|
||
https://treeherder.mozilla.org/#/jobs?repo=try&revision=b2ab32d8699f
Assignee | ||
Comment 15•8 years ago
|
||
Comment on attachment 8738932 [details] MozReview Request: Bug 1262406 - P1. Track element doesn't use the URL classifier. r=francois Review request updated; see interdiff: https://reviewboard.mozilla.org/r/44859/diff/3-4/
Attachment #8738933 -
Attachment description: MozReview Request: Bug 1262406 - P2. Classify track element testcase. r?francois → MozReview Request: Bug 1262406 - P2. Classify track element testcase. r=francois
Assignee | ||
Comment 16•8 years ago
|
||
Comment on attachment 8738933 [details] MozReview Request: Bug 1262406 - P2. Classify track element testcase. r=francois Review request updated; see interdiff: https://reviewboard.mozilla.org/r/44861/diff/3-4/
Assignee | ||
Comment 17•8 years ago
|
||
try looks good https://treeherder.mozilla.org/#/jobs?repo=try&revision=f19fd7ed117e
Assignee | ||
Updated•8 years ago
|
Keywords: checkin-needed
Assignee | ||
Updated•8 years ago
|
Keywords: checkin-needed
Assignee | ||
Comment 18•8 years ago
|
||
remove checkin-needed because this patch has similar problem as bug 1264169, also we should land any urlclassifier testcase after bug 1264169 is fixed
Blocks: 1264169
Assignee | ||
Updated•8 years ago
|
Assignee | ||
Comment 19•8 years ago
|
||
try result after rebasing to latest code and apply changes in bug 1264168 https://treeherder.mozilla.org/#/jobs?repo=try&revision=8fcd8bd4b413
Assignee | ||
Comment 20•8 years ago
|
||
Comment on attachment 8738932 [details] MozReview Request: Bug 1262406 - P1. Track element doesn't use the URL classifier. r=francois Review request updated; see interdiff: https://reviewboard.mozilla.org/r/44859/diff/4-5/
Assignee | ||
Comment 21•8 years ago
|
||
Comment on attachment 8738933 [details] MozReview Request: Bug 1262406 - P2. Classify track element testcase. r=francois Review request updated; see interdiff: https://reviewboard.mozilla.org/r/44861/diff/4-5/
Comment 23•8 years ago
|
||
https://hg.mozilla.org/integration/fx-team/rev/aea79c4f38f4 https://hg.mozilla.org/integration/fx-team/rev/77c1d14c1e1f
Keywords: checkin-needed
Comment 24•8 years ago
|
||
bugherder |
https://hg.mozilla.org/mozilla-central/rev/aea79c4f38f4 https://hg.mozilla.org/mozilla-central/rev/77c1d14c1e1f
Status: ASSIGNED → RESOLVED
Closed: 8 years ago
status-firefox49:
--- → fixed
Resolution: --- → FIXED
Target Milestone: --- → mozilla49
You need to log in
before you can comment on or make changes to this bug.
Description
•