Security fix: unescaped commandline argument (thanks to Bernhard Czech (sinuswave))

Signed-off-by: Christoph Burchert (Chb) <derchb@froxlor.org>
This commit is contained in:
Christoph Burchert (Chb)
2011-09-05 14:31:03 +02:00
parent 4914fc640a
commit ca2a8c9907
2 changed files with 4 additions and 4 deletions

View File

@@ -205,8 +205,8 @@ class phpinterface_fpm
if(!is_dir($socketdir) && $createifnotexists)
{
safe_exec('mkdir -p '.$socketdir);
safe_exec('chown -R '.$this->_settings['system']['httpuser'].':'.$this->_settings['system']['httpgroup'].' '.$socketdir);
safe_exec('mkdir -p '.escapeshellarg($socketdir));
safe_exec('chown -R '.$this->_settings['system']['httpuser'].':'.$this->_settings['system']['httpgroup'].' '.escapeshellarg($socketdir));
}
return $socket;

View File

@@ -118,7 +118,7 @@ while($row = $db->fetch_array($result_tasks))
// now get rid of old stuff
//(but append /* so we don't delete the directory)
$configdir.='/*';
safe_exec('rm -rf '. makeCorrectFile($configdir));
safe_exec('rm -rf '. escapeshellarg(makeCorrectFile($configdir)));
}
}
@@ -132,7 +132,7 @@ while($row = $db->fetch_array($result_tasks))
// now get rid of old stuff
//(but append /* so we don't delete the directory)
$configdir.='/*';
safe_exec('rm -rf '. makeCorrectFile($configdir));
safe_exec('rm -rf '. escapeshellarg(makeCorrectFile($configdir)));
}
}