Skip to content

Add SafeUrl::parse_relaxed - #2773

Closed
zaniebot wants to merge 1 commit into
zaniebot/safe-url-auth-20261015from
zaniebot/safe-url-parser-20261015
Closed

zaniebot wants to merge 1 commit into
zaniebot/safe-url-auth-20261015from
zaniebot/safe-url-parser-20261015

Conversation

@zaniebot

@zaniebot zaniebot commented Oct 15, 2026 •

Copy link
Copy Markdown
Collaborator

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 #2771 (astral-sh#22602).

@zaniebot
zaniebot deployed to automations October 15, 2026 18:34 — with GitHub Actions Active
@astral-automations-bot astral-automations-bot Bot added the internal A refactor or improvement that is not user-facing label Oct 15, 2026
@codspeed

codspeed Bot commented Oct 15, 2026 •

Copy link
Copy Markdown

Merging this PR will not alter performance

⚠️ 8 benchmarks spent significant time in system calls

System calls cannot be consistently instrumented, so they are not included in the measure, which understates the real cost. Please switch to the Walltime instrument to accurately measure system calls.

Measurement and system calls

✅ 69 untouched benchmarks
⏩ 35 skipped benchmarks1


Comparing zaniebot/safe-url-parser-20261015 (9cba159) with zaniebot/safe-url-auth-20261015 (246dedd)2

Open in CodSpeed

Footnotes

  1. 35 benchmarks were skipped, so the baseline results were used instead. If they were deleted from the codebase, click here and archive them to remove them from the performance reports. ↩

  2. No successful run was found on zaniebot/safe-url-auth-20261015 (274ce6c) during the generation of this report, so 6a6e2af was used instead as the comparison base. There might be some changes unrelated to this pull request in this report. ↩

@zaniebot zaniebot changed the title Add SafeUrl::parse_without_ambiguity_check Add SafeUrl::parse_relaxed Oct 15, 2026
@zaniebot
zaniebot force-pushed the zaniebot/safe-url-parser-20261015 branch from d582e66 to 9cba159 Compare October 15, 2026 20:37
@zaniebot
zaniebot deployed to automations October 15, 2026 20:38 — with GitHub Actions Active
@zanieb
zanieb marked this pull request as ready for review October 15, 2026 20:40
@astral-automations-bot

Copy link
Copy Markdown

Promoted to #22612.

This branch was successfully deployed

1 active deployment
automations — 9cba1598 Deployed Oct 15, 2026 by zaniebot via review-code-quality / code quality review #10442
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

internal A refactor or improvement that is not user-facing

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants