Browse Source

Protect the deletion of objects with very long friendly names

git-svn-id: http://svn.code.sf.net/p/itop/code/trunk@2861 a333f486-631f-4898-b8df-5754b55c2be0
dflaven 11 years ago
parent
commit
9641922c4d
1 changed files with 1 additions and 1 deletions
  1. 1 1
      core/cmdbobject.class.inc.php

+ 1 - 1
core/cmdbobject.class.inc.php

@@ -176,7 +176,7 @@ abstract class CMDBObject extends DBObject
 		$oMyChangeOp->Set("objclass", MetaModel::GetRootClass(get_class($this)));
 		$oMyChangeOp->Set("objclass", MetaModel::GetRootClass(get_class($this)));
 		$oMyChangeOp->Set("objkey", $objkey);
 		$oMyChangeOp->Set("objkey", $objkey);
 		$oMyChangeOp->Set("fclass", get_class($this));
 		$oMyChangeOp->Set("fclass", get_class($this));
-		$oMyChangeOp->Set("fname", $this->GetRawName());
+		$oMyChangeOp->Set("fname", substr($this->GetRawName(), 0, 255)); // Protect against very long friendly names
 		$iId = $oMyChangeOp->DBInsertNoReload();
 		$iId = $oMyChangeOp->DBInsertNoReload();
 	}
 	}