WebKit Bugzilla
New
Browse
Log In
×
Sign in with GitHub
or
Remember my login
Create Account
·
Forgot Password
Forgotten password account recovery
RESOLVED FIXED
234439
Fix Safari-side SafeBrowsing telemetry
https://bugs.webkit.org/show_bug.cgi?id=234439
Summary
Fix Safari-side SafeBrowsing telemetry
Eliot Hsu
Reported
2021-12-17 11:35:50 PST
Telemetry for Safari Safe Browsing was previously handled in Safari. Now that WebKit decides whether or not to show Safe Browsing warnings, and queries the Safe Browsing Service itself, we should pass along the (anonymized and privacy-preserving) telemetry to Safari to fix the metrics that were previously there.
Attachments
Patch
(3.36 KB, patch)
2021-12-17 11:55 PST
,
Eliot Hsu
no flags
Details
Formatted Diff
Diff
Patch
(3.34 KB, patch)
2021-12-20 13:41 PST
,
Eliot Hsu
no flags
Details
Formatted Diff
Diff
Show Obsolete
(1)
View All
Add attachment
proposed patch, testcase, etc.
Eliot Hsu
Comment 1
2021-12-17 11:55:48 PST
Created
attachment 447466
[details]
Patch
Eliot Hsu
Comment 2
2021-12-20 13:41:42 PST
Created
attachment 447631
[details]
Patch
Alex Christensen
Comment 3
2021-12-20 14:40:06 PST
Comment on
attachment 447631
[details]
Patch View in context:
https://bugs.webkit.org/attachment.cgi?id=447631&action=review
> Source/WebKit/UIProcess/Cocoa/WebViewImpl.mm:1801 > if (navigatesFrame && forMainFrameNavigation) { > // The safe browsing warning will be hidden once the next page is shown. > + bool continuingUnsafeLoad = WTF::switchOn(result, > + [] (ContinueUnsafeLoad continueUnsafeLoad) { return continueUnsafeLoad == ContinueUnsafeLoad::Yes; }, > + [] (const URL&) { return false; } > + );
If navigatesFrame is true, then we know that result is ContinueUnsafeLoad::Yes. This check seems unnecessary.
> Source/WebKit/UIProcess/Cocoa/WebViewImpl.mm:1806 > + else > + dictionary.set("action"_s, String("redirect to url"));
And this seems unreachable.
Eliot Hsu
Comment 4
2021-12-20 15:04:19 PST
Comment on
attachment 447631
[details]
Patch View in context:
https://bugs.webkit.org/attachment.cgi?id=447631&action=review
>> Source/WebKit/UIProcess/Cocoa/WebViewImpl.mm:1801 >> + ); > > If navigatesFrame is true, then we know that result is ContinueUnsafeLoad::Yes. This check seems unnecessary.
In the case where the Safe Browsing warning page shows, and the user clicks on the "Learn more..." or "report an error" links instead of "Visit this unsafe website", then `navigatesFrame` and `forMainFrameNavigation` are both true, but `continueUnsafeLoad` is `ContinueUnsafeLoad::No`.
Alex Christensen
Comment 5
2021-12-21 14:41:27 PST
Comment on
attachment 447631
[details]
Patch yep, I read it wrong the first time.
EWS
Comment 6
2021-12-21 15:18:09 PST
Committed
r287333
(
245479@main
): <
https://commits.webkit.org/245479@main
> All reviewed patches have been landed. Closing bug and clearing flags on
attachment 447631
[details]
.
Radar WebKit Bug Importer
Comment 7
2021-12-21 15:19:29 PST
<
rdar://problem/86786182
>
Note
You need to
log in
before you can comment on or make changes to this bug.
Top of Page
Format For Printing
XML
Clone This Bug