Merged
Conversation
d0fe280 to
3ad4c47
Compare
Member
Author
That's annoying. Will look into that. |
zanieb
commented
Apr 29, 2026
| write!(f, "{}:", url.scheme())?; | ||
|
|
||
| write!(f, "{}://", url.scheme())?; | ||
| if url.has_authority() { |
Member
Author
There was a problem hiding this comment.
This "has authority" case was the fix for a regressed snapshot where an invalid c:\... target was displayed.
zanieb
commented
Apr 29, 2026
Comment on lines
+581
to
+582
| let log_safe_url = | ||
| DisplaySafeUrl::parse("mailto:ferris@example.com?X-Amz-Signature=signature").unwrap(); |
Member
Author
There was a problem hiding this comment.
Alas this is a valid URL so here we are adding test coverage for some weird stuff.
zanieb
commented
Apr 29, 2026
Comment on lines
-346
to
-352
| let url = url_with_redacted_sensitive_query_values(url); | ||
| let url = url.as_ref(); | ||
| // For URLs that use the `git` convention (i.e., `ssh://git@github.com/...`), avoid dropping the | ||
| // username. | ||
| if is_ssh_git_username(url) || (url.username().is_empty() && url.password().is_none()) { | ||
| return write!(f, "{url}"); | ||
| } |
Member
Author
There was a problem hiding this comment.
I didn't like this early return pattern. I think we should just own the formatting entirely in this type.
zsol
approved these changes
Apr 30, 2026
Member
zsol
left a comment
There was a problem hiding this comment.
Seems fine. I personally liked the early return better, but not enough to fight you :)
Member
Author
|
I think it was fine until we had to eagerly transform the entire URL to redact query parameters for the earl return. |
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.
Small follow-up to #19146 which I was looking into independently as a follow-up from the Codex security patch at zaniebot#19