N°4360 Security hardening

This commit is contained in:
Pierre Goiffon
2021-11-16 09:42:12 +01:00
parent 75450ded1d
commit 8adf743cc7
2 changed files with 15 additions and 1 deletions

View File

@@ -1955,7 +1955,16 @@ abstract class DBObject implements iDisplay
}
if (!$oAtt->CheckFormat($toCheck))
{
return "Wrong format [$toCheck]";
$sErrorMessage = 'Wrong format';
if ($oAtt instanceof AttributeDBFieldVoid) {
$sErrorMessage .= " [$toCheck]";
}
if ($oAtt instanceof AttributeBlob) {
/** @var $toCheck \ormDocument */
$sErrorMessage .= ' ['.$toCheck->GetFileName().']';
}
return $sErrorMessage;
}
}
else