mirror of
https://github.com/Combodo/iTop.git
synced 2026-04-23 10:38:45 +02:00
N°8632 - Various fixes (#814)
* N°8632 - Check existence of parameter file within iTop * N°8632 - block parameter file from request * log on error * PHP CS fixer * N°8632 - param files must be outside iTop * PHP CS fixer * Update webservices/export.php Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com> * Update tests/php-unit-tests/unitary-tests/application/utilsTest.php Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com> * ✅ Fix CI --------- Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
This commit is contained in:
@@ -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)."'");
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user