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

Re: [PATCH v2] list-objects-filter: disable 'sparse:path' filters

From
Jeff King <peff@peff.net>
Date
May 28, 2019, 06:30 UTC
Message-ID
<20190528063006.GF7946@sigill.intra.peff.net>
In-Reply-To
<20190525142834.6168-1-chriscool@tuxfamily.org>
On Sat, May 25, 2019 at 04:28:34PM +0200, Christian Couder wrote:
Show 17 quoted lines
> If someone wants to use as a filter a sparse file that is in the
> repository, something like "--filter=sparse:oid=<ref>:<path>"
> already works.
> 
> So 'sparse:path' is only interesting if the sparse file is not in
> the repository. In this case though the current implementation has
> a big security issue, as it makes it possible to ask the server to
> read any file, like for example /etc/password, and to explore the
> filesystem, as well as individual lines of files.
> 
> If someone is interested in using a sparse file that is not in the
> repository as a filter, then at the minimum a config option, such
> as "uploadpack.sparsePathFilter", should be implemented first to
> restrict the directory from which the files specified by
> 'sparse:path' can be read.
> 
> For now though, let's just disable 'sparse:path' filters.

Thanks for picking this up. The patch looks fine to me (versus just disabling it for remote invocations) assuming we are OK with the possible regression. I suppose cooking this in 'next' for a while is one way we might find out if anybody yells loudly.

-Peff
Previous: Christian CouderNext: Junio C Hamano
Message 2 of 4 in “list-objects-filter: disable 'sparse:path' filters”
  1. list-objects-filter: disable 'sparse:path' filtersChristian Couder, May 25, 2019
  2. Jeff KingMay 28, 2019
  3. Junio C HamanoMay 28, 2019
  4. Christian CouderMay 29, 2019

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.