don't allow newlines in ssh command
(again, thanks to Dan Carpenter for catching this)
This commit is contained in:
parent
a07e0d6b5c
commit
909bc43e70
|
@ -93,6 +93,10 @@ unless ($ENV{SSH_ORIGINAL_COMMAND}) {
|
||||||
$ENV{SSH_ORIGINAL_COMMAND} = 'info';
|
$ENV{SSH_ORIGINAL_COMMAND} = 'info';
|
||||||
}
|
}
|
||||||
|
|
||||||
|
# quick sanity check for newlines; could be used to create fake log entries.
|
||||||
|
# Not an access violation but possibly an audit/compliance reporting violation
|
||||||
|
die "I don't like newlines in the command: $ENV{SSH_ORIGINAL_COMMAND}\n" if $ENV{SSH_ORIGINAL_COMMAND} =~ /[\n\r]/;
|
||||||
|
|
||||||
# admin defined commands; please see doc/admin-defined-commands.mkd
|
# admin defined commands; please see doc/admin-defined-commands.mkd
|
||||||
if ($GL_ADC_PATH and -d $GL_ADC_PATH) {
|
if ($GL_ADC_PATH and -d $GL_ADC_PATH) {
|
||||||
try_adc(); # if it succeeds, this also 'exec's out
|
try_adc(); # if it succeeds, this also 'exec's out
|
||||||
|
|
Loading…
Reference in a new issue