Bug 229427

Summary: URL.protocol setter should forbid switching between special and non-special schemes
Product: WebKit Reporter: Alex Christensen <achristensen>
Component: New BugsAssignee: Alex Christensen <achristensen>
Status: NEW ---    
Severity: Normal CC: annevk, benjamin, cdumez, cmarcelo, ews-watchlist, karlcow, ljharb, webkit-bug-importer
Priority: P2 Keywords: InRadar
Version: WebKit Nightly Build   
Hardware: Unspecified   
OS: Unspecified   
Bug Depends on: 260854    
Bug Blocks: 128023    
Attachments:
Description Flags
Patch achristensen: review-, ews-feeder: commit-queue-

Description Alex Christensen 2021-08-23 15:09:10 PDT
URL.protocol setter should forbid switching between special and non-special schemes
Comment 1 Alex Christensen 2021-08-23 15:11:53 PDT
Created attachment 436239 [details]
Patch
Comment 2 Radar WebKit Bug Importer 2021-08-30 15:10:29 PDT
<rdar://problem/82549495>
Comment 3 Karl Dubost 2023-08-17 02:07:11 PDT
This seems to be a low hanging fruit. 
And that would fix some of the failing tests in
https://wpt.fyi/results/url?label=master&label=experimental&aligned&q=safari%3Afail%20chrome%3Afail%20firefox%3Apass
Comment 4 Anne van Kesteren 2023-08-18 03:06:05 PDT
https://github.com/whatwg/url/issues/674 ended up being filed later in the year so we'll have to be cautious with this one. Might be good if other browsers tackle this first.

Or we could push a specification change, but the alternative solution isn't exactly great.
Comment 5 Karl Dubost 2023-08-31 16:16:08 PDT
So Firefox shipped this first, and they got in two months a first webcompat bug report.

https://github.com/whatwg/url/issues/674#issuecomment-1701304722
https://bugzilla.mozilla.org/show_bug.cgi?id=1850954

Chrome has fixed it (but will be shipped for 118 in ~5 weeks)
https://bugs.chromium.org/p/chromium/issues/detail?id=1416018 (Chrome 118).