mirror of
https://github.com/Combodo/iTop.git
synced 2026-02-13 07:24:13 +01:00
Revert "N°4360 Security hardening"
This reverts commit 8adf743cc7.
We will implement a different solution later (hopefully for 2.6.5 / 2.7.6 / 3.0.0 as well)
This commit is contained in:
@@ -7351,11 +7351,6 @@ class AttributeImage extends AttributeBlob
|
||||
{
|
||||
if ($value instanceof ormDocument && !$value->IsEmpty())
|
||||
{
|
||||
if ($value->GetMimeType() === 'image/svg+xml') {
|
||||
// N°4360 SVG can contain JavaScript...
|
||||
return false;
|
||||
}
|
||||
|
||||
return ($value->GetMainMimeType() == 'image');
|
||||
}
|
||||
|
||||
|
||||
@@ -1955,16 +1955,7 @@ abstract class DBObject implements iDisplay
|
||||
}
|
||||
if (!$oAtt->CheckFormat($toCheck))
|
||||
{
|
||||
$sErrorMessage = 'Wrong format';
|
||||
if ($oAtt instanceof AttributeDBFieldVoid) {
|
||||
$sErrorMessage .= " [$toCheck]";
|
||||
}
|
||||
if ($oAtt instanceof AttributeBlob) {
|
||||
/** @var $toCheck \ormDocument */
|
||||
$sErrorMessage .= ' ['.$toCheck->GetFileName().']';
|
||||
}
|
||||
|
||||
return $sErrorMessage;
|
||||
return "Wrong format [$toCheck]";
|
||||
}
|
||||
}
|
||||
else
|
||||
|
||||
Reference in New Issue
Block a user