From 2cdf351ece027627e00edfdb585a2df0a0e53461 Mon Sep 17 00:00:00 2001 From: sunil Date: Sun, 3 Apr 2016 14:36:02 +0530 Subject: [PATCH] skip url from IDS check --- CRM/Core/IDS.php | 3 ++- CRM/Utils/Hook.php | 11 +++++++++++ 2 files changed, 13 insertions(+), 1 deletion(-) diff --git a/CRM/Core/IDS.php b/CRM/Core/IDS.php index 889fa27e38..ea7538f9fe 100644 --- a/CRM/Core/IDS.php +++ b/CRM/Core/IDS.php @@ -58,7 +58,8 @@ class CRM_Core_IDS { */ public function check(&$args) { // lets bypass a few civicrm urls from this check - static $skip = array('civicrm/admin/setting/updateConfigBackend', 'civicrm/admin/messageTemplates'); + $skip = array('civicrm/admin/setting/updateConfigBackend', 'civicrm/admin/messageTemplates'); + CRM_Utils_Hook::idsException($skip); $path = implode('/', $args); if (in_array($path, $skip)) { return NULL; diff --git a/CRM/Utils/Hook.php b/CRM/Utils/Hook.php index e96d7c473f..2d8f29ac3e 100644 --- a/CRM/Utils/Hook.php +++ b/CRM/Utils/Hook.php @@ -1966,4 +1966,15 @@ abstract class CRM_Utils_Hook { ); } + /** + * This hook is called for bypass a few civicrm urls from IDS check + * @param array $skip list of civicrm url; + */ + public static function idsException(&$skip) { + return self::singleton()->invoke(1, $skip, self::$_nullObject, + self::$_nullObject, self::$_nullObject, self::$_nullObject, self::$_nullObject, + 'civicrm_idsException' + ); + } + } -- 2.25.1