Merge remote-tracking branch 'origin/support/2.7' into develop

# Conflicts:
#	application/cmdbabstract.class.inc.php
#	application/utils.inc.php
#	dictionaries/en.dictionary.itop.core.php
#	dictionaries/fr.dictionary.itop.core.php
#	setup/setuputils.class.inc.php
This commit is contained in:
bruno-ds
2021-02-23 08:58:29 +01:00
21 changed files with 351 additions and 161 deletions

View File

@@ -613,7 +613,19 @@ class SetupUtils
// availability of dot / dot.exe
if (empty($sGraphvizPath)) {
$sGraphvizPath = 'dot';
} else {
clearstatcache();
if (!is_file($sGraphvizPath) || !is_executable($sGraphvizPath)) {
//N°3412 avoid shell injection
return new CheckResult(CheckResult::ERROR,
"$sGraphvizPath could not be executed: Please make sure it is installed and in the path");
}
if (!utils::IsWindowsEnvironment()){
$sGraphvizPath = escapeshellcmd($sGraphvizPath);
}
}
$sCommand = "\"$sGraphvizPath\" -V 2>&1";
$aOutput = array();