Skip to content
Permalink
Browse files Browse the repository at this point in the history
"accidental [mis]feature" -- yet another admin->shell hole blocked!
This is a pretty big hole, really.  Only the fact that Eli called it an
"accidental feature" helped catch it :)

Notes on the code:

An explicit list of paths -- maybe just "conf", "keydir", and "local" --
would have been easier, but this isn't too bad, I think.
  • Loading branch information
sitaramc committed Apr 12, 2010
1 parent 55e754a commit 5fd9328
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion hooks/gitolite-admin/post-update
Expand Up @@ -2,7 +2,8 @@

# checkout the master branch to $GL_ADMINDIR
# (the GL_ADMINDIR env var would have been set by gl-auth-command)
GIT_WORK_TREE=$GL_ADMINDIR git checkout -f master
GIT_WORK_TREE=$GL_ADMINDIR git checkout -f master -- \
`git ls-tree master | cut -f2 | perl -lne 'print unless /^(src|hooks)$/'`

od=$PWD
cd $GL_ADMINDIR
Expand Down

0 comments on commit 5fd9328

Please sign in to comment.