Skip to content

Commit 5127e0a

Browse files
committed
MQE-1510
– Reverting command check
1 parent 4a59f29 commit 5127e0a

File tree

1 file changed

+2
-8
lines changed

1 file changed

+2
-8
lines changed

etc/config/command.php

Lines changed: 2 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -22,14 +22,8 @@
2222
$magentoBinary = $php . ' -f ../../../../bin/magento';
2323
$valid = validateCommand($magentoBinary, $command);
2424
if ($valid) {
25-
$fullCommand = $magentoBinary . " $command" . " $arguments";
26-
$escapedCommand = escapeshellcmd($fullCommand);
27-
if ($fullCommand !== $escapedCommand) {
28-
http_response_code(403);
29-
echo("Unsafe characters detected, command was not executed.");
30-
return;
31-
}
32-
$process = new Symfony\Component\Process\Process($escapedCommand);
25+
$fullCommand = escapeshellcmd($magentoBinary . " $command" . " $arguments");
26+
$process = new Symfony\Component\Process\Process($fullCommand);
3327
$process->setIdleTimeout(60);
3428
$process->setTimeout(0);
3529
$idleTimeout = false;

0 commit comments

Comments
 (0)