git.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: "Johan Sørensen" <johan@johansorensen.com>
To: git@vger.kernel.org
Subject: Reason for objects still being written with a failing pre-receive  hook?
Date: Wed, 24 Jun 2009 15:21:09 +0200	[thread overview]
Message-ID: <9e0f31700906240621k314b4bbehc283c8a1c673a2f1@mail.gmail.com> (raw)

Hi,

I'm wondering what the reason is that objects are still being stored,
despite a non-zero exit code from the pre-receive hook?

Obviously refs aren't being updated, but I can see this a gateway for
abuse if I want to control push permissions per ref via the
pre-receive hook (which is the earliest place I know about the ref
being pushed to, unless I've missed something). Basically an abuser
could continuously attempt to push a set of commits with large blobs
to a repo the pre-receive hook doesn't give him access to, and
eventually fill up the repo with useless objects. I could nuke these
with git-prune (after the fact though), but still it seems illogical
that one is allowed to even write the objects in the first place if
the hook fails.

If it's expected and accepted behaviour, what other options do I have
to prevent a scenario like the above?

Cheers,
Johan

             reply	other threads:[~2009-06-24 13:21 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2009-06-24 13:21 Johan Sørensen [this message]
2009-06-24 13:57 ` Reason for objects still being written with a failing pre-receive hook? Shawn O. Pearce
2009-06-24 14:36   ` Johan Sørensen

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

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

  git send-email \
    --in-reply-to=9e0f31700906240621k314b4bbehc283c8a1c673a2f1@mail.gmail.com \
    --to=johan@johansorensen.com \
    --cc=git@vger.kernel.org \
    /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.
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 NNTP newsgroup(s).