Bug 239900 - Add WebKit API to turn off the URL scheme check when linkifying through Data Detectors
Summary: Add WebKit API to turn off the URL scheme check when linkifying through Data ...
Status: RESOLVED FIXED
Alias: None
Product: WebKit
Classification: Unclassified
Component: WebKit Misc. (show other bugs)
Version: WebKit Nightly Build
Hardware: Unspecified Unspecified
: P2 Normal
Assignee: Per Arne Vollan
URL:
Keywords: InRadar
Depends on:
Blocks:
 
Reported: 2022-04-29 08:04 PDT by Per Arne Vollan
Modified: 2022-05-18 08:46 PDT (History)
6 users (show)

See Also:


Attachments
Patch (13.74 KB, patch)
2022-04-29 08:16 PDT, Per Arne Vollan
ews-feeder: commit-queue-
Details | Formatted Diff | Diff
Patch (13.80 KB, patch)
2022-04-29 09:18 PDT, Per Arne Vollan
ggaren: review+
Details | Formatted Diff | Diff
Patch (14.10 KB, patch)
2022-05-11 15:54 PDT, Per Arne Vollan
ews-feeder: commit-queue-
Details | Formatted Diff | Diff
Patch (16.49 KB, patch)
2022-05-16 11:56 PDT, Per Arne Vollan
no flags Details | Formatted Diff | Diff
Patch (15.91 KB, patch)
2022-05-17 08:25 PDT, Per Arne Vollan
ews-feeder: commit-queue-
Details | Formatted Diff | Diff
Patch (15.92 KB, patch)
2022-05-17 10:28 PDT, Per Arne Vollan
no flags Details | Formatted Diff | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Per Arne Vollan 2022-04-29 08:04:49 PDT
Add WebKit API to turn off the URL scheme check when linkifying through Data Detectors. This will enable us to block the Mach service com.apple.lsd.open in the WebContent process for all clients.
Comment 1 Per Arne Vollan 2022-04-29 08:16:11 PDT
Created attachment 458587 [details]
Patch
Comment 2 Per Arne Vollan 2022-04-29 09:17:44 PDT
<rdar://92026172>
Comment 3 Per Arne Vollan 2022-04-29 09:18:34 PDT
Created attachment 458591 [details]
Patch
Comment 4 Geoffrey Garen 2022-04-29 15:53:06 PDT
Comment on attachment 458591 [details]
Patch

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

> Source/WebKit/ChangeLog:10
> +        The URL scheme check is disabled by default for all clients that are not Web browsers.

Probably worth a ChangeLog comment explaining why we made this default choice. 

Come to think of it, why did we make this default choice? I guess our motivating example was Mail clients? Maybe we should enable by default just for apps with the com.apple.developer.mail-client entitlement?
Comment 5 Per Arne Vollan 2022-04-29 16:51:36 PDT
(In reply to Geoffrey Garen from comment #4)
> Comment on attachment 458591 [details]
> Patch
> 
> View in context:
> https://bugs.webkit.org/attachment.cgi?id=458591&action=review
> 
> > Source/WebKit/ChangeLog:10
> > +        The URL scheme check is disabled by default for all clients that are not Web browsers.
> 
> Probably worth a ChangeLog comment explaining why we made this default
> choice. 
> 

Will add!

> Come to think of it, why did we make this default choice? I guess our
> motivating example was Mail clients? Maybe we should enable by default just
> for apps with the com.apple.developer.mail-client entitlement?

That is a good question. IIRC, we made this choice because we from beforehand knew that com.apple.lsd.open can be blocked for Web browsers, since we already have blocked it there for quite some time without observing any issues. I think we may also have a couple of examples of other apps that are not Mail clients that would need this to be the default behavior. On the other hand, the apps that are not Mail clients could use the new API :)

Thanks for reviewing!
Comment 6 Per Arne Vollan 2022-05-11 15:54:18 PDT
Created attachment 459186 [details]
Patch
Comment 7 Per Arne Vollan 2022-05-16 09:23:25 PDT
Still holding off landing a bit, since it appears that some builders are not ready yet.
Comment 8 Per Arne Vollan 2022-05-16 11:56:42 PDT
Created attachment 459443 [details]
Patch
Comment 9 Per Arne Vollan 2022-05-17 08:25:20 PDT
Created attachment 459499 [details]
Patch
Comment 10 Per Arne Vollan 2022-05-17 10:28:25 PDT
Created attachment 459506 [details]
Patch
Comment 11 Per Arne Vollan 2022-05-17 14:08:08 PDT
Pull request: https://github.com/WebKit/WebKit/pull/693
Comment 12 EWS 2022-05-18 08:46:42 PDT
Committed r294397 (250691@main): <https://commits.webkit.org/250691@main>

Reviewed commits have been landed. Closing PR #693 and removing active labels.