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

Re: "git -c web.browser=w3m help -w help" still kicks firefox

From
Jeff King <peff@peff.net>
Date
Aug 24, 2010, 14:12 UTC
Message-ID
<20100824141247.GB6457@coredump.intra.peff.net>
In-Reply-To
<20100824050127.GC20037@burratino>
On Tue, Aug 24, 2010 at 12:01:27AM -0500, Jonathan Nieder wrote:
Show 18 quoted lines
> > Which does bring up one interesting boundary. If I run:
> > 
> >   git -c receive.denyDeletes=false git push
> > 
> > what should happen? Obviously with cross-server communication the
> > environment won't get passed. I am inclined to say that even for local
> > cases, receive-pack should clear the string.
> 
> Sticky.  I agree with you that that would follow the principle of
> least surprise.
> 
> On the other hand if I use
> 
> 	git push --receive-pack='git -c receive.denyDeletes=false receive-pack'
> 
> then I would expect it to work.  I don't think this is a security
> problem because I already could have set the remote $GIT_CONFIG just
> as easily.

Yeah, I think you are right. Anybody who was trying to cross a setuid boundary with receive-pack is already screwed unless they are cleansing the environment. And I would hope that any such cleansing would be allow-known-good, so the new variable would be blocked along with GIT_CONFIG.

So I doubt we are making anything worse, security-wise. I do think we should still remove the variable in the local transport for the sake of least surprise, and I agree that your example above should work.

-Peff
Previous: Jonathan Nieder
Message 11 of 11 in “"git -c web.browser=w3m help -w help" still kicks firefox”
  1. Junio C HamanoAug 23, 2010
  2. Jeff KingAug 23, 2010
  3. Jeff KingAug 23, 2010
  4. 2/1 do not pass "git -c foo=bar" params to transport helpersJonathan Nieder, Aug 24, 2010
  5. Jeff KingAug 24, 2010
  6. Eric RaibleAug 24, 2010
  7. Junio C HamanoJul 1, 2024
  8. Alex RiesenAug 23, 2010
  9. Jeff KingAug 23, 2010
  10. Jonathan NiederAug 24, 2010
  11. Jeff KingAug 24, 2010

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.