From 466aecfca171d93194f6733a3af3f28cafa53cdf Mon Sep 17 00:00:00 2001 From: Fabian Schmengler Date: Thu, 7 May 2020 11:11:32 +0200 Subject: [PATCH] Suggest \Magento\Framework\Shell::execute as alternative to exec --- Magento2/Sniffs/Security/InsecureFunctionSniff.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Magento2/Sniffs/Security/InsecureFunctionSniff.php b/Magento2/Sniffs/Security/InsecureFunctionSniff.php index 16c69030..b5253193 100644 --- a/Magento2/Sniffs/Security/InsecureFunctionSniff.php +++ b/Magento2/Sniffs/Security/InsecureFunctionSniff.php @@ -20,7 +20,7 @@ class InsecureFunctionSniff extends ForbiddenFunctionsSniff public $forbiddenFunctions = [ 'assert' => null, 'create_function' => null, - 'exec' => null, + 'exec' => '\Magento\Framework\Shell::execute', 'md5' => 'improved hash functions (SHA-256, SHA-512 etc.)', 'passthru' => null, 'pcntl_exec' => null,