Passing unbracketed IPv6 literal to hostname should be ignored.
Reported by
daijiro....@gmail.com,
Jul 3 2017
|
|||||||
Issue description
UserAgent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10_12_4) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/58.0.3029.110 Safari/537.36
Steps to reproduce the problem:
1. var url = new URL('http://localhost:1337')
2. url.hostname = '::1'
3. console.log(url.href)
// =>http://::1:1337
4. new URL('http://::1:1337')
// See this result, it's an invalid URL.
What is the expected behavior?
That input should be ignored and the `url.href` should be "http://localhost:1337/". You can test the steps on jsdom/whatwg-url or Node.js to see what's the expected behaviour.
What went wrong?
We might want to update `external/google-url` to make the parser match with the whatwg/url spec.
Did this work before? N/A
Chrome version: 58.0.3029.110 Channel: n/a
OS Version: OS X 10.12.4
Flash Version:
<3
,
Jul 5 2017
In-house team not having the permission to create the local host URL, hence adding the respective label for it to triage the issue further.
,
Jul 6 2017
This a subset of issue 682150 , but I will keep this as a separate issue until we decide whether to reopen that one.
,
Jul 15 2017
,
Jul 16
This issue has been Available for over a year. If it's no longer important or seems unlikely to be fixed, please consider closing it out. If it is important, please re-triage the issue. Sorry for the inconvenience if the bug really should have been left as Available. For more details visit https://www.chromium.org/issue-tracking/autotriage - Your friendly Sheriffbot
,
Jul 17
Implemented by DOMURLUtils::setHostname(). It strips initial slashes, then calls KURL::SetHost. KURL::SetHost is used in two other places: IconURL::DefaultFavicon() and Location::setHostname(). We need to dig through the standards to find out what the behaviour of those two things is supposed to be. Ideally we'd make KURL::SetHost return a bool and leave the KURL unchanged if the result would be ill-formed. Setting url.hostname to ':::::::::::::::::::::::::::::::::::::::' also works, which is odd.
,
Aug 3
|
|||||||
►
Sign in to add a comment |
|||||||
Comment 1 by cbiesin...@chromium.org
, Jul 3 2017