aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorSitaram Chamarty <sitaram@atc.tcs.com>2015-03-04 05:39:37 +0530
committerSitaram Chamarty <sitaram@atc.tcs.com>2015-03-04 05:39:37 +0530
commit5b38096062af167c25809ba51dde5ee026d04d9a (patch)
treede13228f877c115db78d08811888cd03b7afcdae
parentauthkeys file need not be 0700... (diff)
downloadgitolite-gentoo-5b38096062af167c25809ba51dde5ee026d04d9a.tar.gz
gitolite-gentoo-5b38096062af167c25809ba51dde5ee026d04d9a.tar.bz2
gitolite-gentoo-5b38096062af167c25809ba51dde5ee026d04d9a.zip
prevent info leak when gitolite-shell is used as $SHELL...
The error message is explicitly the same as you get when you do send in an invalid git/gitolite command; this is by design.
-rwxr-xr-xsrc/gitolite-shell2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/gitolite-shell b/src/gitolite-shell
index e5e6f9c..e0bc090 100755
--- a/src/gitolite-shell
+++ b/src/gitolite-shell
@@ -39,7 +39,7 @@ _die "I don't like newlines in the command: '$soc'\n" if $ENV{SSH_ORIGINAL_COMMA
# allow gitolite-shell to be used as "$SHELL". Experts only; no support, no docs
if (@ARGV and $ARGV[0] eq '-c') {
shift;
- $ARGV[0] =~ s/^$0 //;
+ $ARGV[0] =~ s/^$0 // or _die "unknown git/gitolite command: '$ARGV[0]'";
}
# the INPUT trigger massages @ARGV and $ENV{SSH_ORIGINAL_COMMAND} as needed