Skip to content

Commit b754b18

Browse files
committed
MQE-1354: bug fix in command.php
1 parent cc90996 commit b754b18

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

etc/config/command.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@
1010
$password = urldecode($_POST['password']);
1111
$command = urldecode($_POST['command']);
1212
if (array_key_exists("arguments", $_POST)) {
13-
$arguments = urldecode($_POST['arguments']);
13+
$arguments = escapeshellarg(urldecode($_POST['arguments']));
1414
} else {
1515
$arguments = null;
1616
}
@@ -21,7 +21,7 @@
2121
$valid = validateCommand($magentoBinary, $command);
2222
if ($valid) {
2323
exec(
24-
escapeCommand($magentoBinary . ' ' . $command) . " $arguments" ." 2>&1",
24+
escapeCommand($magentoBinary . " $command" . " $arguments") . " 2>&1",
2525
$output,
2626
$exitCode
2727
);

0 commit comments

Comments
 (0)