git/list[1] front-page[2] threads[3] people[4] search[5] about
 

Re: [PATCH v3 2/3] remote: do not show credentials when relative_url() fails

From
Junio C Hamano <gitster@pobox.com>
Date
Nov 6, 2026, 19:15 UTC
Message-ID
<xmqqqzgxixes.fsf@gitster.g>
In-Reply-To
<85924f20-298f-401e-88f7-7fb3f949d0fe@gmail.com>
Derrick Stolee <stolee@gmail.com> writes:
> In environments that store stdout/stderr logs, those systems already
> need to be careful about such strings in the commands themselves, let
> alone the output strings.

Hmph, is this true? How can these systems be _careful_ without knowing what these strings are? By guessing that https:// is a common enough thing that shoud raise red flag if there is some:thing@ that follows it?

> And back to the bundle-URI application: if the bundle list uses such
> URIs for its child bundles, then that's not a safe mechanism for
> communicating those credentials. This isn't going to protect secrets
> like that from being exposed.

This is very true. So the patch may be protecting us against an issue that does not exist in practice?

Where do we use anonymize_url() in existing code paths?
 - "git clone" leaving "clone: from X" in the reflog
 - "git fetch" showing "From X" to show ref updates
 - "git push" shwoing "Pushing to X" in verbose output
 - remote-curl talking about "url" in die() messages
 - transport showing "To X" to show push_report.

These are all talking about what is shown on the screen except for the reflog entry left by "git clone", I think.

Thanks.
Previous: Derrick StoleeNext: Aniket Gupta
Message 6 of 13 in “bundle-uri: do not die on unresolvable relative URIs”
  1. 0/3 bundle-uri: do not die on unresolvable relative URIsAniket Gupta, Nov 5, 2026
  2. 1/3 remote: add relative_url_gently()Aniket Gupta, Nov 5, 2026
  3. Derrick StoleeNov 6, 2026
  4. 2/3 remote: do not show credentials when relative_url() failsAniket Gupta, Nov 5, 2026
  5. Derrick StoleeNov 6, 2026
  6. Junio C HamanoNov 6, 2026
  7. Aniket GuptaNov 9, 2026
  8. 3/3 bundle-uri: do not die on unresolvable relative URIsAniket Gupta, Nov 5, 2026
  9. Derrick StoleeNov 6, 2026
  10. Derrick StoleeNov 6, 2026
  11. Aniket GuptaNov 6, 2026
  12. Patrick SteinhardtNov 9, 2026
  13. Aniket GuptaNov 9, 2026

Read the whole thread, see it on lore, or plain text.

$ cat FOOTERMessages come from the public archive at lore.kernel.org/git, fetched every hour. The front page is chosen and written each morning by an AI editor and can be wrong; the threads themselves are the record. About and API. For agents: an MCP server at https://gitlist.dev/mcp, and any thread, story or person page as Markdown by adding .md to its URL (or sending Accept: text/markdown). Details in /llms.txt.