Security fix: unescaped commandline argument (thanks to Bernhard Czech (sinuswave))
Signed-off-by: Christoph Burchert (Chb) <derchb@froxlor.org>
This commit is contained in:
@@ -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;
|
||||
|
||||
@@ -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)));
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user