]> granicus.if.org Git - curl/commit
URL parse: reject numerical IPv6 addresses outside brackets
authorDaniel Stenberg <daniel@haxx.se>
Mon, 23 Apr 2012 18:23:53 +0000 (20:23 +0200)
committerDaniel Stenberg <daniel@haxx.se>
Mon, 23 Apr 2012 21:18:42 +0000 (23:18 +0200)
commit72b72fe8edc7e4fadc1d2f5ff106b60aeb88d512
tree2beac9c66b9060dcb59075df7689dc4729fae1f0
parentbd9eb30ffdde211574ba62b0ef5e1b75051fffda
URL parse: reject numerical IPv6 addresses outside brackets

Roman Mamedov spotted (in
http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=670126) that curl would
not complain when given a URL with an IPv6 numerical address without
brackets. It would simply cut off the last ":[hex]" part and thus not
work correctly.

That's a URL using an illegal syntax and now libcurl will instead return
a clear error code and error message detailing the error.

The above mentioned bug report claims this to be a regression but
libcurl does not guarantee functionality when given URLs that aren't
following the URL spec (RFC3986 mostly). I consider the fact that it
used to handle this differently a mere coincidence.
lib/url.c