New issue
Advanced search Search tips

Issue 894080 link

Starred by 1 user

Issue metadata

Status: Fixed
Owner:
Closed: Oct 22
Components:
EstimatedDays: ----
NextAction: ----
OS: ----
Pri: 3
Type: Bug



Sign in to add a comment

AdTracker fails to identify inline script as ads in identified ad contexts

Project Member Reported by jkarlin@chromium.org, Oct 10

Issue description

We're not checking the context when calling IsAdScriptInStack. This means that previously unidentified ad script (e.g., inline script) won't be considered ad script.
 
Summary: AdTracker fails to identify inline script as ads in identified ad contexts (was: IsAdScriptInStack returns false for inline script in ad frame context)
Project Member

Comment 2 by bugdroid1@chromium.org, Oct 11

The following revision refers to this bug:
  https://chromium.googlesource.com/chromium/src.git/+/62135e9f0e3904d592fc6149d468ac9d3a33ae79

commit 62135e9f0e3904d592fc6149d468ac9d3a33ae79
Author: Josh Karlin <jkarlin@chromium.org>
Date: Thu Oct 11 15:11:15 2018

[AdTagging] Any script in an ad frame's context is ad script

When calling IsAdScriptInStack, return true if the current context is an ad frame's context.

This is a minor optimization in positive cases, and also covers more cases (e.g., inline script
in the ad frame).

BUG:  894080 

Change-Id: I7b691c6746235bf4cc8be9860d81b7899c86e847
Reviewed-on: https://chromium-review.googlesource.com/c/1264955
Commit-Queue: Josh Karlin <jkarlin@chromium.org>
Reviewed-by: Charlie Harrison <csharrison@chromium.org>
Reviewed-by: Daniel Cheng <dcheng@chromium.org>
Cr-Commit-Position: refs/heads/master@{#598765}
[modify] https://crrev.com/62135e9f0e3904d592fc6149d468ac9d3a33ae79/chrome/browser/subresource_filter/ad_tagging_browsertest.cc
[modify] https://crrev.com/62135e9f0e3904d592fc6149d468ac9d3a33ae79/third_party/blink/renderer/core/frame/ad_tracker.cc
[modify] https://crrev.com/62135e9f0e3904d592fc6149d468ac9d3a33ae79/third_party/blink/renderer/core/frame/ad_tracker_test.cc

Project Member

Comment 3 by bugdroid1@chromium.org, Oct 11

The following revision refers to this bug:
  https://chromium.googlesource.com/chromium/src.git/+/db904e67aa448ee1b5c2301333812071b800b71e

commit db904e67aa448ee1b5c2301333812071b800b71e
Author: Josh Karlin <jkarlin@chromium.org>
Date: Thu Oct 11 17:32:11 2018

[AdTagging] An ad script is considered an ad if its context is an ad

When determining if a particular script is an ad, the execution
context should be considered and any script running in an ad context
should be considered an ad script. This provides enhanced coverage
when an ad script then reaches into another context to run a function.

Bug:  894080 
Change-Id: I69de3343b004b6ef7b7edfe24c7cbda67c925101
Reviewed-on: https://chromium-review.googlesource.com/c/1273823
Reviewed-by: Daniel Cheng <dcheng@chromium.org>
Commit-Queue: Josh Karlin <jkarlin@chromium.org>
Cr-Commit-Position: refs/heads/master@{#598821}
[modify] https://crrev.com/db904e67aa448ee1b5c2301333812071b800b71e/third_party/blink/renderer/core/frame/ad_tracker.cc
[modify] https://crrev.com/db904e67aa448ee1b5c2301333812071b800b71e/third_party/blink/renderer/core/frame/ad_tracker_test.cc

Project Member

Comment 4 by bugdroid1@chromium.org, Oct 17

The following revision refers to this bug:
  https://chromium.googlesource.com/chromium/src.git/+/0330f2cecde2b63b3143bf2cd453952d7c55067a

commit 0330f2cecde2b63b3143bf2cd453952d7c55067a
Author: Josh Karlin <jkarlin@chromium.org>
Date: Wed Oct 17 21:01:44 2018

[AdTagging] Don't track ad scripts that we could detect by context

Ad scripts loaded in ad contexts can be detected by the context
alone. Reserve tracking individual scripts to non-ad contexts.

Bug:  894080 

Change-Id: I90ec62e7e816fc83540f0daa232b105d03eb1553
Reviewed-on: https://chromium-review.googlesource.com/c/1276785
Commit-Queue: Josh Karlin <jkarlin@chromium.org>
Reviewed-by: Daniel Cheng <dcheng@chromium.org>
Cr-Commit-Position: refs/heads/master@{#600549}
[modify] https://crrev.com/0330f2cecde2b63b3143bf2cd453952d7c55067a/third_party/blink/renderer/core/frame/ad_tracker.cc
[modify] https://crrev.com/0330f2cecde2b63b3143bf2cd453952d7c55067a/third_party/blink/renderer/core/frame/ad_tracker.h

Status: Fixed (was: Started)

Sign in to add a comment