From aa00da9b0a9459e1cb574ef5415a98925e553c72 Mon Sep 17 00:00:00 2001 From: sunil Date: Sun, 3 Apr 2016 14:44:33 +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 952d81c5dd..93c37e5db9 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 b06a0607f8..4b3770b6cd 100644 --- a/CRM/Utils/Hook.php +++ b/CRM/Utils/Hook.php @@ -2095,4 +2095,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