mirror of
https://github.com/Combodo/iTop.git
synced 2026-02-12 23:14:18 +01:00
N°7514 - hardening code
This commit is contained in:
@@ -53,7 +53,8 @@ class MultipleChoicesValidator extends AbstractValidator
|
||||
private function CheckValueAgainstChoices(string $sValue, array &$aErrorMessages): void
|
||||
{
|
||||
if (false === array_key_exists($sValue, $this->aChoices)) {
|
||||
$aErrorMessages[] = "Value ({$sValue}) is not part of the field possible values list";
|
||||
$sValue = utils::HtmlEntities($sValue);
|
||||
$aErrorMessages[] = "Value ({$sValue}) is not part of the field possible values list";
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -37,6 +37,7 @@ class SelectObjectValidator extends AbstractValidator
|
||||
$iObjectsCount = $oSetForExistingCurrentValue->CountWithLimit(1);
|
||||
|
||||
if ($iObjectsCount === 0) {
|
||||
$value = utils::HtmlEntities($value);
|
||||
return ["Value $value does not match the corresponding filter set"];
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user