curl / Mailing Lists / curl-library / Single Mail
Buy commercial curl support from WolfSSL. We help you work out your issues, debug your libcurl applications, use the API, port to new platforms, add new features and more. With a team lead by the curl founder himself.

Re: URL API accepts input with invalid IPv6 literals when configured without ENABLE_IPV6

From: Brad Spencer via curl-library <curl-library_at_lists.haxx.se>
Date: Wed, 15 Feb 2023 17:01:01 -0400

(I think my scary URLs tripped some email filter somewhere, so I don't
have your reply in my inbox.)

On 2023-02-14 4:43 p.m., Daniel Stenberg via curl-library wrote:
> I think I prefer to rather go the other direction in the name of
> keeping the
> behavior of the URL parser the same (ie improve the parser when IPv6
> support
> is disabled), independently of IPv6 support. An application might in fact
> still want to be able to parse and validate URLs that contain IPv6
> addresses
> even when it can't actually use them to transfer data with libcurl.
>
> To make that happen easiest, we would need to enable Curl_inet_pton and
> Curl_inet_ntop() for IPv6 even when liburl cannot speak IPv6.
>
> What do you think?

I think you are right.  That's a better choice.  I had been working
under the assumption that Curl_inet_ntop() was disabled because it
couldn't work without ENABLE_IPV6, but I see now that it really only
needs to know some constants.

I can take a look at making it work that way when I get a chance. I
suppose the goal should be to make test 1560 pass even when "ipv6" is
not a feature, but I do not know if the test suite normally gets run
that way.

-- 
Brad Spencer
----------------------------------------------------------------------
This transmission (including any attachments) may contain confidential information, privileged material (including material protected by the solicitor-client or other applicable privileges), or constitute non-public information. Any use of this information by anyone other than the intended recipient is prohibited. If you have received this transmission in error, please immediately reply to the sender and delete this information from your system. Use, dissemination, distribution, or reproduction of this transmission by unintended recipients is not authorized and may be unlawful.
-- 
Unsubscribe: https://lists.haxx.se/listinfo/curl-library
Etiquette:   https://curl.se/mail/etiquette.html
Received on 2023-02-15