[curl/curl] fab6d7: hostip: make 'localhost' return fixed values
Daniel Stenberg <[email protected]> Mon, 10 May 2021 15:54:40 -0700
| Newsgroups | gmane.comp.web.curl.cvs |
|---|---|
| Message-ID | <curl/curl/push/refs/heads/bagder/fixed-localhost/[email protected]> |
Branch: refs/heads/bagder/fixed-localhost
Home: https://github.com/curl/curl
Commit: fab6d74049e6f445518835de984ccb2bd8cd4eed
https://github.com/curl/curl/commit/fab6d74049e6f445518835de984ccb2bd8cd4eed
Author: Daniel Stenberg <[email protected]>
Date: 2021-05-11 (Tue, 11 May 2021)
Changed paths:
M lib/hostip.c
Log Message:
-----------
hostip: make 'localhost' return fixed values
Resolving the case insensitive host name 'localhost' now returns the
addresses 127.0.0.1 and (if IPv6 is enabled) ::1 without using any
resolver.
This removes the risk that users accidentally resolves 'localhost' to
something else. By making sure 'localhost' is always local, we can
assume a "secure context" for such transfers (for cookies etc).
_______________________________________________
curl-commits mailing list
[email protected]
https://cool.haxx.se/cgi-bin/mailman/listinfo/curl-commits