[whatwg/url] IPv6 parser's bug in IPv4 part (#195)

URL parser's algorithm correctly reports as valid:
`http://[::1.2.3.4]`

But slightly modified and invalid URLs are reported as valid:
`http://[::1.2.3.]`
`http://[::1.2.]`
`http://[::1.]`

In the 10 step's 7 substep last '.' is skipped (there no failure at 4 substep) and, as EOF code point is reached, after 9 supstep the 10 step ends.

Similarly also isn't reported as invalid:
`http://[::1.2.3.4x]`

In the 7 substep 'x' is skipped (this character is not checked, so there can be any non ASCII digit), EOF code point is reached so no failure at 8 substep and after 9 substep the 10 step ends.

These URLs I also checked with [Live URL Viewer](https://quuz.org/url/liveview.html) and [rust-url](https://docs.rs/crate/url/): the same problem.

-- 
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/195

Received on Thursday, 5 January 2017 22:34:40 UTC