Skip to content

Support IPv6 addresses in URLs#622

Open
DemiMarie wants to merge 1 commit intoopenssh:masterfrom
DemiMarie:ipv6-addresses
Open

Support IPv6 addresses in URLs#622
DemiMarie wants to merge 1 commit intoopenssh:masterfrom
DemiMarie:ipv6-addresses

Conversation

@DemiMarie
Copy link
Copy Markdown

URLs didn't distinguish between IPv6 addresses and domain names, so a bracketed IPv6 address was treated as a syntax error. Fix this by parsing them properly. The parser also handles percent-encoded zone IDs and properly percent-decodes them.

Full regression tests are included.

@DemiMarie
Copy link
Copy Markdown
Author

The memory safety of the new code is slightly non-trivial. If urldecode() produced a truncated buffer, this could write a NUL byte and a % out of bounds. However, urldecode() doesn't do that.

@DemiMarie
Copy link
Copy Markdown
Author

@djmdjm Would it be possible to get a re-review?

URLs didn't distinguish between IPv6 addresses and domain names, so a
bracketed IPv6 address was treated as a syntax error.  Fix this by
parsing them properly.  The parser also handles percent-encoded zone IDs
and properly percent-decodes them.

Full regression tests are included.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants