HOR-1957 "Error al ejecutar el comando workspace-backup" SOLVED

Issue:
    Error al ejecutar el comando  workspace-backup
Cause:
    Incorrecto manejo de caracteres especiales al ejecutar un shell command
Solution:
    Se escapan los caracteres especiales al ejecutar un shell command
This commit is contained in:
Victor Saisa Lopez
2016-09-28 14:58:48 -04:00
parent 952877754d
commit 70a4ef0222
2 changed files with 4 additions and 4 deletions

View File

@@ -405,7 +405,7 @@ class DataBaseMaintenance
$dbPort = $aHost[1];
$command = 'mysqldump'
. ' --user=' . $this->user
. ' --password=' . str_replace('"', '\"', str_replace("'", "\'", quotemeta($this->passwd)))
. ' --password=' . escapeshellarg($this->passwd)
. ' --host=' . $dbHost
. ' --port=' . $dbPort
. ' --opt'
@@ -418,7 +418,7 @@ class DataBaseMaintenance
. ' --user=' . $this->user
. ' --opt'
. ' --skip-comments'
. ' --password=' . str_replace('"', '\"', str_replace("'", "\'", quotemeta($this->passwd)))
. ' --password=' . escapeshellarg($this->passwd)
. ' ' . $this->dbName
. ' > ' . $outfile;
}