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

Re: [PATCH] submodule: Port resolve_relative_url from shell to C

From
Junio C Hamano <gitster@pobox.com>
Date
Jan 15, 2016, 23:03 UTC
Message-ID
<xmqqlh7qfnt6.fsf@gitster.mtv.corp.google.com>
In-Reply-To
<CAGZ79kaBLmwfeMocKP+tQmqNLy0BDYTU9dFtMY6rmiTqNSi_Dg@mail.gmail.com>
Stefan Beller <sbeller@google.com> writes:
Show 14 quoted lines
> On Fri, Jan 15, 2016 at 9:37 AM, Junio C Hamano <gitster@pobox.com> wrote:
>>>> It is somewhat hard to see how this avoids stripping one (or both)
>>>> slashes just after "http:" in remoteurl="http://site/path/", leaving
>>>> just "http:/" (or "http:").
>>>
>>> it would leave just 'http:/' if url were to be ../../some/where/else,
>>> such that the constructed url below would be http://some/where/else.
>>
>> Is that a good outcome, though?  Isn't it something we would want to
>> catch as an error?
>
> I would want to add theses checks later and for now
> just port over the code from shell to C. (The same issue
> is found in the shell code and nobody seems to bother so far)

Understood and I think that is a good direction to go. Perhaps leave a comment in the area to document it as a known bug (or a NEEDSWORK) to make it more obvious and to help remember it?

Thanks.
Previous: Stefan BellerNext: Johannes Sixt
Message 8 of 12 in “submodule: Port resolve_relative_url from shell to C”
  1. submodule: Port resolve_relative_url from shell to CStefan Beller, Jan 13, 2016
  2. Junio C HamanoJan 13, 2016
  3. Stefan BellerJan 13, 2016
  4. Jens LehmannJan 14, 2016
  5. Stefan BellerJan 14, 2016
  6. Junio C HamanoJan 15, 2016
  7. Stefan BellerJan 15, 2016
  8. Junio C HamanoJan 15, 2016
  9. Johannes SixtJan 14, 2016
  10. Stefan BellerJan 14, 2016
  11. Eric SunshineJan 13, 2016
  12. Stefan BellerJan 13, 2016

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.