Skip to content

Commit 729369d

Browse files
authored
Merge pull request #402 from magento/UNDO-MQE-1510
Undo MQE-1510
2 parents 47ba1f8 + cdf304d commit 729369d

File tree

1 file changed

+4
-9
lines changed

1 file changed

+4
-9
lines changed

etc/config/command.php

Lines changed: 4 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -11,9 +11,9 @@
1111
$magentoObjectManager = $magentoObjectManagerFactory->create($_SERVER);
1212
$tokenModel = $magentoObjectManager->get(\Magento\Integration\Model\Oauth\Token::class);
1313

14-
$tokenPassedIn = urldecode($_POST['token'] ?? "");
15-
$command = urldecode($_POST['command'] ?? "");
16-
$arguments = urldecode($_POST['arguments'] ?? "");
14+
$tokenPassedIn = urldecode($_POST['token']);
15+
$command = urldecode($_POST['command']);
16+
$arguments = urldecode($_POST['arguments']);
1717

1818
// Token returned will be null if the token we passed in is invalid
1919
$tokenFromMagento = $tokenModel->loadByToken($tokenPassedIn)->getToken();
@@ -22,12 +22,7 @@
2222
$magentoBinary = $php . ' -f ../../../../bin/magento';
2323
$valid = validateCommand($magentoBinary, $command);
2424
if ($valid) {
25-
// Turn string into array for symfony escaping
26-
$commandParts = array_filter(explode(" ", $command), 'strlen');
27-
$argumentParts = array_filter(explode(" ", $arguments), 'strlen');
28-
$magentoBinaryParts = array_filter(explode(" ", $magentoBinary), 'strlen');
29-
$commandArray = array_merge($magentoBinaryParts, $commandParts, $argumentParts);
30-
$process = new Symfony\Component\Process\Process($commandArray);
25+
$process = new Symfony\Component\Process\Process($magentoBinary . " $command" . " $arguments");
3126
$process->setIdleTimeout(60);
3227
$process->setTimeout(0);
3328
$idleTimeout = false;

0 commit comments

Comments
 (0)