Bug 218627

Summary: Introduce preference not to treat localhost and .localhost as mixed content
Product: WebKit Reporter: Frédéric Wang (:fredw) <fred.wang>
Component: Page LoadingAssignee: Nobody <webkit-unassigned>
Status: NEW ---    
Severity: Normal CC: achristensen, ap, ashley, beidson, bfulgham, cdumez, changseok, clopez, eric.carlson, esprehn+autocc, ews-watchlist, fran, glenn, gyuyoung.kim, hi, japhet, jer.noble, jfernandez, mkwst, philipj, sergio, smoley, webkit-bug-importer, youennf
Priority: P2 Keywords: InRadar
Version: Other   
Hardware: Unspecified   
OS: Unspecified   
See Also: https://bugs.webkit.org/show_bug.cgi?id=272461
Bug Depends on: 218623    
Bug Blocks: 140625, 171934, 218977, 218980    
Attachments:
Description Flags
WIP Patch
none
Try 218623+218627 for EWS
ews-feeder: commit-queue-
Try 218623+218627 for EWS
ews-feeder: commit-queue-
Try 218623+218627 for EWS
ews-feeder: commit-queue-
WIP Patch
none
Try 218623+218627 for EWS
ews-feeder: commit-queue-
Patch (applies on top of bug 218623)
none
Patch (applies on top of bug 218623)
none
Patch (applies on top of bug 218623) none

Description Frédéric Wang (:fredw) 2020-11-05 11:02:38 PST
Created attachment 413325 [details]
WIP Patch

This is the part of bug 171934 that is controversial since we don't necessarily resolve localhost and .localhost to loopback addresses. Let's try with a disabled-by-default flag first.
Comment 1 Radar WebKit Bug Importer 2020-11-09 11:34:09 PST
<rdar://problem/71202035>
Comment 2 Frédéric Wang (:fredw) 2020-11-11 08:30:14 PST
Created attachment 413823 [details]
Try 218623+218627 for EWS
Comment 3 Frédéric Wang (:fredw) 2020-11-12 03:05:20 PST
Created attachment 413922 [details]
Try 218623+218627 for EWS
Comment 4 Frédéric Wang (:fredw) 2020-11-12 05:39:24 PST
Created attachment 413928 [details]
Try 218623+218627 for EWS
Comment 5 EWS Watchlist 2020-11-12 05:40:17 PST
This patch modifies the imported WPT tests. Please ensure that any changes on the tests (not coming from a WPT import) are exported to WPT. Please see https://trac.webkit.org/wiki/WPTExportProcess
Comment 6 Frédéric Wang (:fredw) 2020-11-12 07:40:50 PST
Created attachment 413933 [details]
WIP Patch
Comment 7 Frédéric Wang (:fredw) 2020-11-12 07:41:43 PST
Created attachment 413934 [details]
Try 218623+218627 for EWS
Comment 8 Frédéric Wang (:fredw) 2020-11-16 01:44:24 PST
Created attachment 414202 [details]
Patch (applies on top of bug 218623)
Comment 9 Alex Christensen 2020-11-16 10:26:17 PST
Comment on attachment 414202 [details]
Patch (applies on top of bug 218623)

What happens to the non-web-platform-tests if we just make the change without a preference?
Comment 10 Frédéric Wang (:fredw) 2020-11-24 07:11:10 PST
(In reply to Alex Christensen from comment #9)
> Comment on attachment 414202 [details]
> Patch (applies on top of bug 218623)
> 
> What happens to the non-web-platform-tests if we just make the change
> without a preference?

They are failing because these tests assume loopback ip addresses and localhost addresses are mixed content. 

If we don't want to add the pref change, we would need something similar to what is done for WPT upstream in order to use different hostnames (see bug 127676).
Comment 11 Frédéric Wang (:fredw) 2020-11-24 07:29:10 PST
Created attachment 414841 [details]
Patch (applies on top of bug 218623)

Rebase
Comment 12 Frédéric Wang (:fredw) 2020-11-27 05:29:19 PST
Created attachment 414939 [details]
Patch (applies on top of bug 218623)
Comment 13 Frédéric Wang (:fredw) 2021-12-10 02:12:40 PST
Removing myself from assignee since I'm not working on this anymore.