diff --git a/core/cmdbobject.class.inc.php b/core/cmdbobject.class.inc.php index 443a5ca4f..ea490edff 100644 --- a/core/cmdbobject.class.inc.php +++ b/core/cmdbobject.class.inc.php @@ -396,41 +396,6 @@ abstract class CMDBObject extends DBObject } } - /** - * Helper to ultimately check user rights before writing (Insert, Update or Delete) - * The check should never fail, because the UI should prevent from such a usage - * Anyhow, if the user has found a workaround... the security gets enforced here - * - * @deprecated 3.0.0 N°2591 will be removed in 3.1.0 - * - * @param bool $bSkipStrongSecurity - * @param int $iActionCode - * - * @throws \SecurityException - */ - protected function CheckUserRights($bSkipStrongSecurity, $iActionCode) - { - DeprecatedCallsLog::NotifyDeprecatedPhpMethod(); - if (is_null($bSkipStrongSecurity)) { - // This is temporary - // We have implemented this safety net right before releasing iTop 1.0 - // and we decided that it was too risky to activate it - // Anyhow, users willing to have a very strong security could set - // skip_strong_security = 0, in the config file - $bSkipStrongSecurity = MetaModel::GetConfig()->Get('skip_strong_security'); - } - if (!$bSkipStrongSecurity) - { - $sClass = get_class($this); - $oSet = DBObjectSet::FromObject($this); - if (!UserRights::IsActionAllowed($sClass, $iActionCode, $oSet)) - { - // Intrusion detected - throw new SecurityException('You are not allowed to modify objects of class: '.$sClass); - } - } - } - public function DBClone($newKey = null) { $newKey = parent::DBClone($newKey); diff --git a/core/config.class.inc.php b/core/config.class.inc.php index 5be4cdaa7..3622c4193 100644 --- a/core/config.class.inc.php +++ b/core/config.class.inc.php @@ -308,15 +308,6 @@ class Config 'source_of_value' => '', 'show_in_conf_sample' => false, ], - // Deprecated in 3.0.0 N°2591 Will be removed in 3.1 - 'skip_strong_security' => [ - 'type' => 'bool', - 'description' => 'Disable strong security - TEMPORARY: this flag should be removed when we are more confident in the recent change in security', - 'default' => true, - 'value' => true, - 'source_of_value' => '', - 'show_in_conf_sample' => false, - ], 'query_optimization_enabled' => [ 'type' => 'bool', 'description' => 'The queries are optimized based on the assumption that the DB integrity has been preserved. By disabling the optimization one can ensure that the fetched data is clean... but this can be really slower or not usable at all (some queries will exceed the allowed number of joins in MySQL: 61!)',