New issue
Advanced search Search tips

Issue 738842 link

Starred by 1 user

Issue metadata

Status: Available
Owner: ----
Cc:
Components:
EstimatedDays: ----
NextAction: ----
OS: Linux , Android , Windows , Chrome , Mac
Pri: 3
Type: Bug



Sign in to add a comment

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
 
Components: -Blink Blink>Network
Cc: rbasuvula@chromium.org
Labels: TE-NeedsTriageFromMTV
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.

Comment 3 by ricea@chromium.org, Jul 6 2017

Labels: -Pri-2 -TE-NeedsTriageFromMTV OS-Android OS-Chrome OS-Fuchsia OS-Linux OS-Windows Pri-3
Status: Available (was: Unconfirmed)
Summary: Passing unbracketed IPv6 literal to hostname should be ignored. (was: Passing local IPv6 to hostname should be ignored.)
This a subset of  issue 682150 , but I will keep this as a separate issue until we decide whether to reopen that one.

Comment 4 by w...@chromium.org, Jul 15 2017

Labels: -OS-Fuchsia
Project Member

Comment 5 by sheriffbot@chromium.org, Jul 16

Labels: Hotlist-Recharge-Cold
Status: Untriaged (was: Available)
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
Status: Available (was: Untriaged)
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.
Labels: -Hotlist-Recharge-Cold

Sign in to add a comment