diff --git a/plugins/dynamix.docker.manager/include/Helpers.php b/plugins/dynamix.docker.manager/include/Helpers.php index 4de9374c1..b799b120b 100644 --- a/plugins/dynamix.docker.manager/include/Helpers.php +++ b/plugins/dynamix.docker.manager/include/Helpers.php @@ -436,9 +436,6 @@ function pullImage($name, $image, $echo=true) { } function execCommand($command, $echo=true) { - if ( dockerRunSecurity($command) ) { - $command = "logger 'docker command execution halted due to security violation (Bash command execution or redirection)'"; - } // $command should have all its args already properly run through 'escapeshellarg' $descriptorspec = [ 0 => ['pipe', 'r'], // stdin is a pipe that the child will read from @@ -469,21 +466,6 @@ function execCommand($command, $echo=true) { return $retval===0; } -function dockerRunSecurity($command) { - $testCommand = htmlspecialchars_decode($command); - $testCommand = str_replace("\'","",$testCommand); - $cmdSplit = explode("'",$testCommand); - for ($i=0; $i","&&"] as $invalidChars ) { - if ( strpos($tstCommand,$invalidChars) ) { - return true; - } - } - return false; -} - function getXmlVal($xml, $element, $attr=null, $pos=0) { $xml = (is_file($xml)) ? simplexml_load_file($xml) : simplexml_load_string($xml); $element = $xml->xpath("//$element")[$pos]; @@ -524,4 +506,4 @@ function getAllocations() { } return $ports; } -?> \ No newline at end of file +?>