This is an archived snapshot of W3C's public bugzilla bug tracker, decommissioned in April 2019. Please see the home page for more details.

Bug 23963 - IPv4 suffix in IPv6: less than four decimal parts
Summary: IPv4 suffix in IPv6: less than four decimal parts
Status: RESOLVED INVALID
Alias: None
Product: WHATWG
Classification: Unclassified
Component: URL (show other bugs)
Version: unspecified
Hardware: PC Linux
: P2 normal
Target Milestone: Unsorted
Assignee: Anne
QA Contact: sideshowbarker+urlspec
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2013-12-03 00:22 UTC by Simon Sapin
Modified: 2013-12-04 15:01 UTC (History)
1 user (show)

See Also:


Attachments

Description Simon Sapin 2013-12-03 00:22:17 UTC
http://url.spec.whatwg.org/#host-parsing

[[
While c is not the EOF code point, run these substeps:

    Let value be 0.

    If c is not an ASCII digit, parse error, return failure.

    While c is an ASCII digit, set value to value × 10 + c interpreted as decimal number and increase pointer by one.

    If value is greater than 255, parse error, return failure.

    If dots seen is less than 3 and c is not a ".", parse error, return failure.

    Set piece to piece × 0x100 + value.

    If dots seen is 0 or 2, increase piece pointer by one.

    Increase pointer by one.

    If dots seen is 3 and c is not the EOF code point, parse error, return failure.

    Increase dots seen by one. 
]]

This allows less than four decimal parts (three dots), eg: http://[::168.0]/

It probably should not.
Comment 1 Anne 2013-12-04 14:58:00 UTC
Is something incorrect with the dots seen check?
Comment 2 Simon Sapin 2013-12-04 15:01:27 UTC
It’s already correct, I misread it.