Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

hostip: make 'localhost' return fixed values #7039

Closed
wants to merge 2 commits into from

Conversation

bagder
Copy link
Member

@bagder bagder commented May 10, 2021

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).

@bagder bagder added the name lookup DNS and related tech label May 10, 2021
@bagder bagder added the feature-window A merge of this requires an open feature window label May 12, 2021
@bagder
Copy link
Member Author

bagder commented May 12, 2021

Tagged for merge after 7.77.0 ships.

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).
@bagder bagder removed the feature-window A merge of this requires an open feature window label May 31, 2021
@bagder bagder closed this in 1a0ebf6 May 31, 2021
@bagder bagder deleted the bagder/fixed-localhost branch May 31, 2021 13:42
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
name lookup DNS and related tech
Development

Successfully merging this pull request may close these issues.

None yet

1 participant