[whatwg/url] Hexadecimal IPv4 hosts aren't parsed correctly (#632)

Before #619, LDH hostnames would be parsed as IPv4 addresses.  At a high level, if an input parsed successfully as an IPv4 address, it was an IPv4 address; otherwise, it was a domain name.

#619 makes identifying IPv4 addresses easier.  It exploits the fact that ICANN has effectively promised never to register a purely numeric TLD, using the last label to determine which is IPv4 and which is not.  It only attempts IPv4 parsing if the last part of the address (ignoring any empty part) is purely numeric.

The problem is that a class of names that would formerly have been identified as IPv4 addresses are no longer identified thus.  "0x7f000001" does not parse as the v4 loopback address under the new algorithm.

-- 
You are receiving this because you are subscribed to this thread.
Reply to this email directly or view it on GitHub:
https://github.com/whatwg/url/issues/632

Received on Monday, 23 August 2021 07:11:41 UTC