From cdf304dc556d950e7ed1838bb3c0fac028c89f13 Mon Sep 17 00:00:00 2001 From: Kevin Kozan Date: Tue, 30 Jul 2019 15:00:08 -0500 Subject: [PATCH] MQE-1510 - Undoing 1510 contents, breaks functionality of existing tests --- etc/config/command.php | 13 ++++--------- 1 file changed, 4 insertions(+), 9 deletions(-) diff --git a/etc/config/command.php b/etc/config/command.php index 7b80d7284..047af324a 100644 --- a/etc/config/command.php +++ b/etc/config/command.php @@ -11,9 +11,9 @@ $magentoObjectManager = $magentoObjectManagerFactory->create($_SERVER); $tokenModel = $magentoObjectManager->get(\Magento\Integration\Model\Oauth\Token::class); - $tokenPassedIn = urldecode($_POST['token'] ?? ""); - $command = urldecode($_POST['command'] ?? ""); - $arguments = urldecode($_POST['arguments'] ?? ""); + $tokenPassedIn = urldecode($_POST['token']); + $command = urldecode($_POST['command']); + $arguments = urldecode($_POST['arguments']); // Token returned will be null if the token we passed in is invalid $tokenFromMagento = $tokenModel->loadByToken($tokenPassedIn)->getToken(); @@ -22,12 +22,7 @@ $magentoBinary = $php . ' -f ../../../../bin/magento'; $valid = validateCommand($magentoBinary, $command); if ($valid) { - // Turn string into array for symfony escaping - $commandParts = array_filter(explode(" ", $command), 'strlen'); - $argumentParts = array_filter(explode(" ", $arguments), 'strlen'); - $magentoBinaryParts = array_filter(explode(" ", $magentoBinary), 'strlen'); - $commandArray = array_merge($magentoBinaryParts, $commandParts, $argumentParts); - $process = new Symfony\Component\Process\Process($commandArray); + $process = new Symfony\Component\Process\Process($magentoBinary . " $command" . " $arguments"); $process->setIdleTimeout(60); $process->setTimeout(0); $idleTimeout = false;