mirror of
https://github.com/Combodo/iTop.git
synced 2026-04-23 02:28:44 +02:00
N°602: InlineImage "randomly" not available for display.
Adding an InlineImage while adding an object in a IndirectLinkedSet at the same time would attach the InlineImage to the linked object instead of the host one. If their organizations were different, it could result in a security issue, denying the display of the InlineImage. SVN:trunk[4561]
This commit is contained in:
@@ -3328,8 +3328,6 @@ EOF
|
||||
{
|
||||
$res = parent::DBInsertNoReload();
|
||||
|
||||
InlineImage::FinalizeInlineImages($this);
|
||||
|
||||
// Invoke extensions after insertion (the object must exist, have an id, etc.)
|
||||
foreach (MetaModel::EnumPlugins('iApplicationObjectExtension') as $oExtensionInstance)
|
||||
{
|
||||
@@ -3339,6 +3337,14 @@ EOF
|
||||
return $res;
|
||||
}
|
||||
|
||||
/**
|
||||
* Attaches InlineImages to the current object
|
||||
*/
|
||||
protected function OnObjectKeyReady()
|
||||
{
|
||||
InlineImage::FinalizeInlineImages($this);
|
||||
}
|
||||
|
||||
protected function DBCloneTracked_Internal($newKey = null)
|
||||
{
|
||||
$oNewObj = parent::DBCloneTracked_Internal($newKey);
|
||||
|
||||
Reference in New Issue
Block a user