Skip to content

Commit 9d3048d

Browse files
committed
MAGETWO-70037: Add additional validation for console command
1 parent f56188d commit 9d3048d

File tree

1 file changed

+4
-2
lines changed

1 file changed

+4
-2
lines changed

dev/tests/functional/utils/command.php

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -14,8 +14,10 @@
1414

1515
if (isset($_GET['command'])) {
1616
$command = urldecode($_GET['command']);
17-
if (in_array(explode(' ', $command)[0], $commandList)) {
18-
exec('php -f ../../../../bin/magento ' . $command);
17+
if (!strpos($command, '&&') && !strpos($command, ';')) {
18+
if (in_array(explode(' ', $command)[0], $commandList)) {
19+
exec('php -f ../../../../bin/magento ' . $command);
20+
}
1921
}
2022
} else {
2123
throw new \InvalidArgumentException("Command GET parameter is not set.");

0 commit comments

Comments
 (0)