skip url from IDS check
authorsunil <esunil.pawar@gmail.com>
Sun, 3 Apr 2016 09:14:33 +0000 (14:44 +0530)
committersunil <esunil.pawar@gmail.com>
Sun, 3 Apr 2016 09:14:33 +0000 (14:44 +0530)
CRM/Core/IDS.php
CRM/Utils/Hook.php

index 952d81c5dd3f020d10588f557b4a1f57d7ad669a..93c37e5db9a83d9b9434fec9dcba5bd6c7a2649d 100644 (file)
@@ -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;
index b06a0607f8e580a8811160961e7d9839df12909c..4b3770b6cd0c5566c37559d4f1c0a9d1ad3627fc 100644 (file)
@@ -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'
+    );
+  }
+
 }