N°1930: Security hardening

This commit is contained in:
Stephen Abello
2019-01-14 11:59:45 +01:00
parent ed3fd851f1
commit 21e5eee31f
2 changed files with 3 additions and 3 deletions

View File

@@ -62,11 +62,11 @@ class utils
{
if (!file_exists($sParamFile))
{
throw new Exception("Could not find the parameter file: '$sParamFile'");
throw new Exception("Could not find the parameter file: '".utils::HtmlEntities($sParamFile)."'");
}
if (!is_readable($sParamFile))
{
throw new Exception("Could not load parameter file: '$sParamFile'");
throw new Exception("Could not load parameter file: '".utils::HtmlEntities($sParamFile)."'");
}
$sParams = file_get_contents($sParamFile);

View File

@@ -135,7 +135,7 @@ foreach(explode(',', $sDataSourcesList) as $iSDS)
$oSynchroDataSource = MetaModel::GetObject('SynchroDataSource', $iSDS, false);
if ($oSynchroDataSource == null)
{
$oP->p("ERROR: The data source (id=$iSDS) does not exist. Exiting...");
$oP->p("ERROR: The data source (id=".utils::HtmlEntities($iSDS).") does not exist. Exiting...");
$oP->output();
exit -3;
}