Skip to content

Commit

Permalink
security fix for optional ADC (admin-defined command) feature
Browse files Browse the repository at this point in the history
Thanks to Dylan Simon for catching it...
  • Loading branch information
sitaramc committed Feb 13, 2011
1 parent a10287a commit a33f0f8
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions src/gitolite.pm
Original file line number Diff line number Diff line change
Expand Up @@ -1058,6 +1058,7 @@ sub shell_out {
sub try_adc {
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}");
Expand Down

0 comments on commit a33f0f8

Please sign in to comment.