Open Bug 1723456 Opened 3 years ago Updated 1 year ago

Reject non-IPv4 hostnames that end in numbers

Categories

(Core :: Networking, task, P3)

task

Tracking

()

People

(Reporter: valentin, Assigned: edgul)

References

(Blocks 5 open bugs, )

Details

(Whiteboard: [necko-triaged])

Attachments

(2 files)

See https://github.com/whatwg/url/pull/619

If the last component of a URL's hostname is numeric, it's parsed as an IPv4 hostname, and if that fails, the URL's host is rejected. e.g., "foo.0", "bar.0.09", "a.1.2.0x.", "1.2.3.4.5" were all previously considered valid non-IPv4 hostnames, but are now all rejected.

Most of the fix needs to go here.
We want to return an error code from BuildNormalizedSpec if the hostname ends in a number, but does NormalizeIPv4 returns an error code.
We have a bunch of failing WPT for this in failure.html - see bug 1722328.

Assignee: valentin.gosu → nobody
Assignee: nobody → edgul

If we follow the spec and properly ignore the last dot, this should also fix
Origin parsing: <http://999999999.> against <http://other.com/>

Attachment #9336904 - Attachment description: WIP: Bug 1723456 - Reject non-IPv4 hostnames ending in numbers → Bug 1723456 - Reject non-IPv4 hostnames ending in numbers
Blocks: 1842598
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: