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.