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

Re: [PATCH v3 4/6] list-objects: filter objects in traverse_commit_list

From
JHJeff Hostetler <git@jeffhostetler.com>
Date
Nov 16, 2017, 17:28 UTC
Message-ID
<e8261f46-7818-66df-a58f-d11627c17868@jeffhostetler.com>
In-Reply-To
<xmqqr2t9l5xk.fsf@gitster.mtv.corp.google.com>
On 11/8/2017 12:01 AM, Junio C Hamano wrote:
Show 21 quoted lines
> Jonathan Tan <jonathantanmy@google.com> writes:
> 
>> Having said that, though, it might be safer to still introduce one, and
>> relax it later if necessary - it is much easier to relax a constraint
>> than to increase one.
> 
> It would also be more error prone to have such a long switch ()
> statement, each of whose case arm needs to be carefully looked at.
> 
> While protection against attacks over the wire against the process
> that receives the request is necessary and doing the quoting right
> at this layer is one valuable component of it, we would need to be
> careful about what features we allow the other side to request.
> 
> For example, an innocent-looking use of get_oid_with_context() can
> trigger an expensive operation, e.g. "master^{/sekritCodeName}", may
> not just waste resources but also may reveal the presence of an
> object that we might not want to leak to a stranger.  Limiting such
> an abuse must sit at a lot higher layer than a byte-by-byte check
> over the request like the code does.
> 

Right. I could see adding another server-side variable in the spirit of the existing "uploadpack.allow*" variables.

My main concern at this point has been avoiding injections.
Jeff
Previous: Junio C HamanoNext: Jeff Hostetler
Message 10 of 13 in “Partial clone part 1: object filtering”
  1. 0/6 Partial clone part 1: object filteringJeff Hostetler, Nov 7, 2017
  2. 3/6 oidset: add iterator methods to oidsetJeff Hostetler, Nov 7, 2017
  3. 2/6 oidmap: add oidmap iterator methodsJeff Hostetler, Nov 7, 2017
  4. 5/6 rev-list: add list-objects filtering supportJeff Hostetler, Nov 7, 2017
  5. 6/6 pack-objects: add list-objects filteringJeff Hostetler, Nov 7, 2017
  6. Jonathan TanNov 8, 2017
  7. 4/6 list-objects: filter objects in traverse_commit_listJeff Hostetler, Nov 7, 2017
  8. Jonathan TanNov 7, 2017
  9. Junio C HamanoNov 8, 2017
  10. Jeff HostetlerNov 16, 2017
  11. Jeff HostetlerNov 16, 2017
  12. 1/6 dir: allow exclusions from blob in addition to fileJeff Hostetler, Nov 7, 2017
  13. Junio C HamanoNov 8, 2017

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.