aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorChristian Ruppert <idl0r@gentoo.org>2011-02-16 17:06:34 +0100
committerChristian Ruppert <idl0r@gentoo.org>2011-02-16 17:06:34 +0100
commit9a416e43e7697dd835053a50d8d6adc086046ea0 (patch)
treeb01fbc7778f22df440425b0bbadd128e23530b14
parentMerge branch 't/per_repo_umask' (diff)
parentsecurity fix for optional ADC (admin-defined command) feature (diff)
downloadgitolite-gentoo-9a416e43e7697dd835053a50d8d6adc086046ea0.tar.gz
gitolite-gentoo-9a416e43e7697dd835053a50d8d6adc086046ea0.tar.bz2
gitolite-gentoo-9a416e43e7697dd835053a50d8d6adc086046ea0.zip
-rwxr-xr-xsrc/gl-auth-command1
1 files changed, 1 insertions, 0 deletions
diff --git a/src/gl-auth-command b/src/gl-auth-command
index 2f32dc1..56d9c17 100755
--- a/src/gl-auth-command
+++ b/src/gl-auth-command
@@ -154,6 +154,7 @@ die "server is in slave mode; you can only fetch\n"
if ($GL_ADC_PATH and -d $GL_ADC_PATH) {
my ($cmd, @args) = split ' ', $ENV{SSH_ORIGINAL_COMMAND};
if (-x "$GL_ADC_PATH/$cmd") {
+ die "I don't like $cmd\n" if $cmd =~ /\.\./;
# yes this is rather strict, sorry.
do { die "I don't like $_\n" unless $_ =~ $ADC_CMD_ARGS_PATT } for ($cmd, @args);
&log_it("$GL_ADC_PATH/$ENV{SSH_ORIGINAL_COMMAND}");