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

Re: [PATCH] http: handle absolute-path alternates from server root

From
Junio C Hamano <gitster@pobox.com>
Date
May 13, 2026, 01:10 UTC
Message-ID
<xmqqo6ikjeqp.fsf@gitster.g>
In-Reply-To
<20260512162619.GA69813@coredump.intra.peff.net>
Jeff King <peff@peff.net> writes:
Show 14 quoted lines
>           ... Probably in a way that makes it totally invalid, but
>           if you were very unlucky you could turn something like:
>
>              http://victim.com.evil.domain:8000
>
>           into:
>
>             http://victim.com
>
> 	  Which looks like the start of a redirect attack, except that
> 	  the attacker could just have written "http://victim.com" in
> 	  the first place! Either way we feed it to
> 	  is_alternate_allowed(), which is where we check redirect and
> 	  protocol rules.

Yuck. I know I am the guilty party who introduced the dumb HTTP walker but I wish we could kill it off after all these years. I did not even recall that we supported the alternate object store in the "protocol" until I saw this patch X-<.

> I think we can just treat this like a regular bug.
Absolutely.  Thanks.
Previous: Jeff KingNext: Jeff King
Message 2 of 7 in “http: handle absolute-path alternates from server root”
  1. http: handle absolute-path alternates from server rootJeff King, May 12, 2026
  2. Junio C HamanoMay 13, 2026
  3. Jeff KingMay 13, 2026
  4. Patrick SteinhardtMay 15, 2026
  5. Jeff KingMay 15, 2026
  6. Patrick SteinhardtMay 21, 2026
  7. Jeff KingMay 22, 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.