git@vger.kernel.org mailing list mirror (one of many)
 help / color / mirror / code / Atom feed
From: Junio C Hamano <gitster@pobox.com>
To: Jonathan Tan <jonathantanmy@google.com>
Cc: Jeff Hostetler <git@jeffhostetler.com>,
	git@vger.kernel.org, peff@peff.net,
	Jeff Hostetler <jeffhost@microsoft.com>
Subject: Re: [PATCH v3 4/6] list-objects: filter objects in traverse_commit_list
Date: Wed, 08 Nov 2017 14:01:43 +0900	[thread overview]
Message-ID: <xmqqr2t9l5xk.fsf@gitster.mtv.corp.google.com> (raw)
In-Reply-To: <20171107152034.47686f6ece72ea3d43005b12@google.com> (Jonathan Tan's message of "Tue, 7 Nov 2017 15:20:34 -0800")

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.

  reply	other threads:[~2017-11-08  5:01 UTC|newest]

Thread overview: 13+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2017-11-07 19:35 [PATCH v3 0/6] Partial clone part 1: object filtering Jeff Hostetler
2017-11-07 19:35 ` [PATCH v3 1/6] dir: allow exclusions from blob in addition to file Jeff Hostetler
2017-11-07 19:35 ` [PATCH v3 2/6] oidmap: add oidmap iterator methods Jeff Hostetler
2017-11-07 19:35 ` [PATCH v3 3/6] oidset: add iterator methods to oidset Jeff Hostetler
2017-11-07 19:35 ` [PATCH v3 4/6] list-objects: filter objects in traverse_commit_list Jeff Hostetler
2017-11-07 23:20   ` Jonathan Tan
2017-11-08  5:01     ` Junio C Hamano [this message]
2017-11-16 17:28       ` Jeff Hostetler
2017-11-16 17:23     ` Jeff Hostetler
2017-11-07 19:35 ` [PATCH v3 5/6] rev-list: add list-objects filtering support Jeff Hostetler
2017-11-07 19:35 ` [PATCH v3 6/6] pack-objects: add list-objects filtering Jeff Hostetler
2017-11-08  0:45   ` Jonathan Tan
2017-11-08  5:25 ` [PATCH v3 0/6] Partial clone part 1: object filtering Junio C Hamano

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

  List information: http://vger.kernel.org/majordomo-info.html

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=xmqqr2t9l5xk.fsf@gitster.mtv.corp.google.com \
    --to=gitster@pobox.com \
    --cc=git@jeffhostetler.com \
    --cc=git@vger.kernel.org \
    --cc=jeffhost@microsoft.com \
    --cc=jonathantanmy@google.com \
    --cc=peff@peff.net \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
Code repositories for project(s) associated with this public inbox

	https://80x24.org/mirrors/git.git

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).