Repository navigation
v0.2.0 - #7
Merged
Merged
v0.2.0#7
Conversation
WithBaseURL allowed plain http for localhost, 127.0.0.1 and ::1. A name is looked up, and the lookup can reach DNS: when the hosts file does not list localhost, or when DNS comes first in nsswitch. The resolver then asks for localhost.<search domain> first, so whoever controls that zone can answer with another machine, which receives the token in clear text. A review reproduced this with the old code in a network namespace. Plain http is now allowed only when the host is exactly 127.0.0.1 or ::1. IP literals are never looked up, and net/http never proxies them. The host no longer needs lowercasing, which existed only so that net/http's proxy bypass matched "LOCALHOST". This breaks callers that pass http://localhost; they can use http://127.0.0.1, http://[::1] or https://localhost. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01NYjhaGCRVp9GXLUuUZv8g1
Refuse plain http to the name localhost
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01NYjhaGCRVp9GXLUuUZv8g1
Move the changelog entries to v0.2.0
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
The v0.2.0 release, step 2 of the release steps in CONTRIBUTING.md. After the merge, the merge commit on main gets the tag v0.2.0.
Changes since v0.1.0 (see CHANGELOG.md):
WithBaseURLallows plainhttponly for127.0.0.1and::1, no longer for the namelocalhost(Refuse plain http to the name localhost #5).🤖 Generated with Claude Code
https://claude.ai/code/session_01NYjhaGCRVp9GXLUuUZv8g1