Bug 229202

Summary: [App Privacy Report] Some HTTP Redirects from non app initiated requests are marked app initiated
Product: WebKit Reporter: Kate Cheney <katherine_cheney>
Component: WebKit Misc.Assignee: Kate Cheney <katherine_cheney>
Status: RESOLVED FIXED    
Severity: Normal CC: achristensen, bfulgham, eric.carlson, ews-watchlist, glenn, jer.noble, philipj, sergio
Priority: P2 Keywords: InRadar
Version: WebKit Nightly Build   
Hardware: Unspecified   
OS: Unspecified   
Attachments:
Description Flags
Patch
none
Patch
none
Patch ews-feeder: commit-queue-

Description Kate Cheney 2021-08-17 13:59:24 PDT
Seeing this with media loads only.
Comment 1 Kate Cheney 2021-08-17 13:59:45 PDT
<rdar://problem/79467871>
Comment 2 Kate Cheney 2021-08-17 15:41:34 PDT
Created attachment 435718 [details]
Patch
Comment 3 Kate Cheney 2021-08-17 19:14:32 PDT
Created attachment 435735 [details]
Patch
Comment 4 Kate Cheney 2021-08-18 07:59:21 PDT
Created attachment 435767 [details]
Patch
Comment 5 Brent Fulgham 2021-08-18 21:37:01 PDT
Comment on attachment 435767 [details]
Patch

View in context: https://bugs.webkit.org/attachment.cgi?id=435767&action=review

R=me

> Source/WebKit/NetworkProcess/cocoa/NetworkSessionCocoa.mm:617
> +                nsRequest = mutableRequest.get();

It would be better if we could initialize attribution when we construct the NSURLRequest from the request above, but this is fine for now.
Comment 6 Kate Cheney 2021-08-19 05:49:25 PDT
Comment on attachment 435767 [details]
Patch

View in context: https://bugs.webkit.org/attachment.cgi?id=435767&action=review

>> Source/WebKit/NetworkProcess/cocoa/NetworkSessionCocoa.mm:617
>> +                nsRequest = mutableRequest.get();
> 
> It would be better if we could initialize attribution when we construct the NSURLRequest from the request above, but this is fine for now.

That's a good idea. It would require changing the ::nsURLRequest function which is used in a lot of places, so agreed it might be better for a separate fix.
Comment 7 EWS 2021-08-19 05:58:06 PDT
Committed r281234 (240671@main): <https://commits.webkit.org/240671@main>

All reviewed patches have been landed. Closing bug and clearing flags on attachment 435767 [details].