Bug 225426 - Add SPI to restrict networking to a set of hosts
Summary: Add SPI to restrict networking to a set of hosts
Status: RESOLVED FIXED
Alias: None
Product: WebKit
Classification: Unclassified
Component: New Bugs (show other bugs)
Version: WebKit Nightly Build
Hardware: Unspecified Unspecified
: P2 Normal
Assignee: Alex Christensen
URL:
Keywords: InRadar
Depends on:
Blocks:
 
Reported: 2021-05-05 17:14 PDT by Alex Christensen
Modified: 2021-12-21 15:50 PST (History)
7 users (show)

See Also:


Attachments
Patch (31.09 KB, patch)
2021-05-05 17:18 PDT, Alex Christensen
ews-feeder: commit-queue-
Details | Formatted Diff | Diff
Patch (31.35 KB, patch)
2021-05-05 17:44 PDT, Alex Christensen
no flags Details | Formatted Diff | Diff
Patch (31.27 KB, patch)
2021-05-05 17:57 PDT, Alex Christensen
no flags Details | Formatted Diff | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Alex Christensen 2021-05-05 17:14:40 PDT
Add SPI to restrict networking to a set of hosts
Comment 1 Alex Christensen 2021-05-05 17:18:43 PDT
Created attachment 427826 [details]
Patch
Comment 2 Alex Christensen 2021-05-05 17:42:42 PDT
rdar://77571521
Comment 3 Alex Christensen 2021-05-05 17:44:58 PDT
Created attachment 427831 [details]
Patch
Comment 4 Alex Christensen 2021-05-05 17:57:46 PDT
Created attachment 427833 [details]
Patch
Comment 5 Tim Horton 2021-05-11 11:28:15 PDT
Comment on attachment 427833 [details]
Patch

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

> Source/WebCore/page/Page.cpp:3307
> +    if (!url.protocolIsInHTTPFamily() && !url.protocolIs("ws") && !url.protocolIs("wss"))
> +        return true;

Do we not have a helper somewhere else that is like "the host in this is a host in the HTTP sense"? It seems weird for Page to know this
Comment 6 Alex Christensen 2021-05-11 12:31:11 PDT
Comment on attachment 427833 [details]
Patch

We don't.  This needs to be more than HTTP.  This needs to be schemes that access the network, which includes http, https, ws, and wss.
Comment 7 EWS 2021-05-11 12:47:59 PDT
Committed r277336 (237595@main): <https://commits.webkit.org/237595@main>

All reviewed patches have been landed. Closing bug and clearing flags on attachment 427833 [details].
Comment 8 Radar WebKit Bug Importer 2021-05-11 12:48:23 PDT
<rdar://problem/77857370>