diff --git a/plugins/dynamix.docker.manager/include/CreateDocker.php b/plugins/dynamix.docker.manager/include/CreateDocker.php index 77644ddb2..9b3870b3d 100644 --- a/plugins/dynamix.docker.manager/include/CreateDocker.php +++ b/plugins/dynamix.docker.manager/include/CreateDocker.php @@ -374,9 +374,27 @@ function xmlToVar($xml) { } } } + xmlSecurity($out); return $out; } +function xmlSecurity(&$template) { + foreach ($template as &$element) { + if ( is_array($element) ) { + xmlSecurity($element); + } else { + if ( is_string($element) ) { + $tempElement = htmlspecialchars_decode($element); + $tempElement = str_replace("[","<",$tempElement); + $tempElement = str_replace("]",">",$tempElement); + if ( preg_match('#(.*?)#is',$tempElement) || preg_match('#(.*?)#is',$tempElement) ) { + $element = "REMOVED"; + } + } + } + } +} + function xmlToCommand($xml, $create_paths=false) { global $var; global $docroot;