N°7980 - security hardening

This commit is contained in:
jf-cbd
2024-11-29 16:40:34 +01:00
parent 06dcae1dd1
commit cbb4281a37
2 changed files with 4 additions and 2 deletions

View File

@@ -592,6 +592,7 @@ EOF
*/
private static function GetDivAlert(string $message): string
{
$message = utils::EscapeHtml($message);
return "<div class=\"ibo-csv-import--cell-error ibo-csv-import--cell-message\">$message</div>\n";
}

View File

@@ -101,13 +101,14 @@ class BulkChangeTest extends ItopDataTestCase
//$this->debug("sStatus:".$sStatus->GetDescription());
$this->assertEquals($aResult["__STATUS__"], $sStatus->GetDescription());
foreach ($aRow as $i => $oCell) {
/** @var $oCell \CellChangeSpec */
if ($i !== "finalclass" && $i !== "__STATUS__" && $i !== "__ERRORS__" && array_key_exists($i, $aResult)) {
$this->debug("i:".$i);
$this->debug('GetCLIValue:'.$oCell->GetCLIValue());
$this->debug("aResult:".$aResult[$i]);
$this->assertEquals($aResult[$i], $oCell->GetCLIValue());
$this->assertEquals($aResult[$i], $oCell->GetCLIValue(), "Unexpected CLI result for cell " . $i);
if (null !== $aResultHTML) {
$this->assertEquals($aResultHTML[$i], $oCell->GetHTMLValue());
$this->assertEquals($aResultHTML[$i], $oCell->GetHTMLValue(), "Unexpected HTML result for cell " . $i);
}
}
}