secure shell-execution of mysqldump on installation if given database-name exists
Signed-off-by: Michael Kaufmann <d00p@froxlor.org>
This commit is contained in:
@@ -735,7 +735,7 @@ class FroxlorInstall
|
|||||||
}
|
}
|
||||||
|
|
||||||
if ($do_backup) {
|
if ($do_backup) {
|
||||||
$command = $mysql_dump . " " . $this->_data['mysql_database'] . " -u " . $this->_data['mysql_root_user'] . " --password='" . $this->_data['mysql_root_pass'] . "' --result-file=" . $filename;
|
$command = $mysql_dump . " " . escapeshellarg($this->_data['mysql_database']) . " -u " . escapeshellarg($this->_data['mysql_root_user']) . " --password='" . $this->_data['mysql_root_pass'] . "' --result-file=" . $filename;
|
||||||
$output = exec($command);
|
$output = exec($command);
|
||||||
if (stristr($output, "error")) {
|
if (stristr($output, "error")) {
|
||||||
$content .= $this->_status_message('red', $this->_lng['install']['backup_failed']);
|
$content .= $this->_status_message('red', $this->_lng['install']['backup_failed']);
|
||||||
|
|||||||
Reference in New Issue
Block a user