Skip to content

Commit 092634a

Browse files
committed
MQE-1354: bug fix in command.php
1 parent fe2feae commit 092634a

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

etc/config/command.php

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -6,16 +6,16 @@
66

77
require_once __DIR__ . '/../../../../app/bootstrap.php';
88

9-
if (isset($_POST['token']) && isset($_POST['command'])) {
9+
if (!empty($_POST['token']) && !empty($_POST['command'])) {
1010
$magentoObjectManagerFactory = \Magento\Framework\App\Bootstrap::createObjectManagerFactory(BP, $_SERVER);
1111
$magentoObjectManager = $magentoObjectManagerFactory->create($_SERVER);
1212
$tokenModel = $magentoObjectManager->get(\Magento\Integration\Model\Oauth\Token::class);
1313

1414
$tokenPassedIn = urldecode($_POST['token']);
1515
$command = urldecode($_POST['command']);
1616

17-
if (array_key_exists("arguments", $_POST)) {
18-
$arguments = escapeshellarg(urldecode($_POST['arguments']));
17+
if (!empty($_POST['arguments'])) {
18+
$arguments = urldecode($_POST['arguments']);
1919
} else {
2020
$arguments = null;
2121
}

0 commit comments

Comments
 (0)