Bug 197183

Summary: Ad Click Attribution redirects to well-known location should not trigger a conversion if they are blocked by content blockers
Product: WebKit Reporter: John Wilander <wilander>
Component: WebKit Misc.Assignee: John Wilander <wilander>
Status: RESOLVED FIXED    
Severity: Normal CC: achristensen, cdumez, commit-queue, youennf
Priority: P2 Keywords: InRadar
Version: WebKit Nightly Build   
Hardware: Unspecified   
OS: Unspecified   
Attachments:
Description Flags
Patch none

John Wilander
Reported 2019-04-22 16:29:42 PDT
We should make sure Ad Click Attribution redirects to well-known location don't trigger a conversion if they are blocked by content blockers.
Attachments
Patch (15.22 KB, patch)
2019-04-22 16:45 PDT, John Wilander
no flags
John Wilander
Comment 1 2019-04-22 16:29:58 PDT
John Wilander
Comment 2 2019-04-22 16:45:18 PDT
youenn fablet
Comment 3 2019-04-22 22:16:46 PDT
Comment on attachment 367996 [details] Patch View in context: https://bugs.webkit.org/attachment.cgi?id=367996&action=review > Source/WebKit/ChangeLog:12 > + a blocked request comes back empty. It makes sense to be consistent there with content blockers but more generally with the whole loading code. Web Process might cancel the load due to injected bundles, CSP, the context going away... The easiest approach might be to do the handleAdClickAttributionConversion call in NetworkResourceLoader::continueWillSendRequest if the request is not null. That means keeping an Optional<AdClickAttribution::Conversion> as a member field of NetworkResourceLoader and populate it in NetworkResourceLoader::willSendRedirectedRequest.
Alex Christensen
Comment 4 2019-04-23 08:03:10 PDT
Comment on attachment 367996 [details] Patch I think this is consistent with the rest of the loading code.
John Wilander
Comment 5 2019-04-23 08:57:42 PDT
Comment on attachment 367996 [details] Patch Thanks, both of you! Let’s revisit this when we move content blockers to the network process.
WebKit Commit Bot
Comment 6 2019-04-23 09:14:13 PDT
Comment on attachment 367996 [details] Patch Clearing flags on attachment: 367996 Committed r244544: <https://trac.webkit.org/changeset/244544>
WebKit Commit Bot
Comment 7 2019-04-23 09:14:15 PDT
All reviewed patches have been landed. Closing bug.
youenn fablet
Comment 8 2019-04-23 19:31:50 PDT
> I think this is consistent with the rest of the loading code. Not really. Even though NetworkProcess is more and more independent of WebProcess, this is still not the case. Given network load checker can be null in some cases, given injected bundles, the most consistent place to do the whole conversion is in NetworkResourceLoader::continueWillSendRequest. There may not even be the need to add a NetworkResourceLoader field since originalRequest is kept.
Note You need to log in before you can comment on or make changes to this bug.