N°8632 - param files must be outside iTop

This commit is contained in:
Eric Espie
2026-02-24 16:27:34 +01:00
parent 924bdabb62
commit 1cbe12d62b
2 changed files with 24 additions and 3 deletions

View File

@@ -181,6 +181,9 @@ class utils
protected static function LoadParamFile($sParamFile)
{
if (utils::RealPath($sParamFile, APPROOT) !== false) {
throw new Exception("File '".utils::HtmlEntities($sParamFile)."' should be outside iTop");
}
if (!file_exists($sParamFile)) {
throw new Exception("Could not find the parameter file: '".utils::HtmlEntities($sParamFile)."'");
}