[curl/curl] 1a0ebf: hostip: make 'localhost' return fixed values

Daniel Stenberg <[email protected]> Mon, 31 May 2021 06:38:02 -0700
Newsgroups gmane.comp.web.curl.cvs
Message-ID <curl/curl/push/refs/heads/master/[email protected]>
  Branch: refs/heads/master
  Home:   https://github.com/curl/curl
  Commit: 1a0ebf6632f889eedd42e03db9c337e7f029cc21
      https://github.com/curl/curl/commit/1a0ebf6632f889eedd42e03db9c337e7f029cc21
  Author: Daniel Stenberg <[email protected]>
  Date:   2021-05-31 (Mon, 31 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).

Closes #7039


  Commit: c61ca433402876fefef1dab847acda1647b7dab9
      https://github.com/curl/curl/commit/c61ca433402876fefef1dab847acda1647b7dab9
  Author: Daniel Stenberg <[email protected]>
  Date:   2021-05-31 (Mon, 31 May 2021)

  Changed paths:
    M docs/URL-SYNTAX.md

  Log Message:
  -----------
  URL-SYNTAX.md: document the new 'localhost' treatment


Compare: https://github.com/curl/curl/compare/772eacb2e32c...c61ca4334028
_______________________________________________
curl-commits mailing list
[email protected]
https://cool.haxx.se/cgi-bin/mailman/listinfo/curl-commits