Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

IPv6 parser's bug in IPv4 part #195

Closed
rmisev opened this issue Jan 5, 2017 · 2 comments
Closed

IPv6 parser's bug in IPv4 part #195

rmisev opened this issue Jan 5, 2017 · 2 comments

Comments

@rmisev
Copy link
Member

rmisev commented Jan 5, 2017

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 and rust-url: the same problem.

@annevk
Copy link
Member

annevk commented Jan 6, 2017

Thanks, how would you like to be acknowledged?

@rmisev
Copy link
Member Author

rmisev commented Jan 6, 2017

@annevk Thanks for response, now parser looks correct. Acknowledge as Rimas Misevičius

rmisev added a commit to rmisev/url that referenced this issue Jan 9, 2017
annevk added a commit to web-platform-tests/wpt that referenced this issue Jan 11, 2017
annevk pushed a commit that referenced this issue Jan 11, 2017
annevk pushed a commit that referenced this issue Jan 11, 2017
rmisev added a commit to upa-url/upa that referenced this issue May 24, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Development

No branches or pull requests

2 participants