Repository navigation
Conversation
zanieb
marked this pull request as ready for review
October 15, 2026 18:20
|
Promoted to #22602. |
Merging this PR will not alter performance
|
zanieb
pushed a commit
to astral-sh/uv
that referenced
this pull request
Oct 16, 2026
`SafeUrl::parse` rejects some ambiguous credentials that `url::Url::parse` accepts, so callers that need the latter's parsing behavior use `url::Url` directly. Add `SafeUrl::parse_relaxed` and use it for configured endpoints, proxy URLs, and file URL parsing. The method returns `url::ParseError` for invalid URLs and skips the ambiguous-credentials check. Credentials interpreted as part of a path or fragment are not redacted when formatted. Stacked on astral-sh#2771 (#22602). Co-authored-by: Zanie Blue <[email protected]>
This branch was successfully deployed
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.
Several authentication helpers accept raw
url::Url, making it easy to bypass the redacted formatting provided bySafeUrl. UseSafeUrlfor credential extraction, index lookup, realm comparison, and endpoint matching, adapting URLs atreqwestboundaries.Add
SafeUrl::into_unsafe_urlfor APIs that require the underlying URL. Configured endpoint URLs useurl::Urlparsing, which accepts URLs thatSafeUrl::parsewould reject.Stacked on #2767 (astral-sh#22601).