curl / Mailing Lists / curl-library / Single Mail

curl-library

Re: stricter host name requirements for file:// URLs (was Re: [SECURITY ADVISORY] curl invalid URL parsing with '#')

From: Daniel Stenberg <daniel_at_haxx.se>
Date: Fri, 11 Nov 2016 11:42:56 +0100 (CET)

On Fri, 11 Nov 2016, Alex Bligh wrote:

>> I didn't add "::1" support because that was never mentioned in any spec as
>> far as I know, and in the 127.0.0.1 case it isn't using the network anyway,
>> it just an alternate way of saying localhost.
>
> I believe that may not be true, for instance in a host configured with an
> IPv6 networking stack and not an IPv4 networking stack, or some non-IP
> networking stack. I suspect such machines are fantastically rare ...

My point is just that in a file:// URL, the given name is not used for any
networking. "localhost" will not be translated into an IP address and
127.0.0.1 will be treated just as "localhost".

I don't think anyone ever started the (bad) habit of using ::1 in file:// URLs
so adding that as another alias seems unnecessary to me.

file://localhost/ and file://127.0.0.1/ will both work equally fine - even on
IPv6-only hosts!

-- 
  / daniel.haxx.se
-------------------------------------------------------------------
List admin: https://cool.haxx.se/list/listinfo/curl-library
Etiquette:  https://curl.haxx.se/mail/etiquette.html
Received on 2016-11-11