X-Git-Url: https://vcs.fsf.org/?a=blobdiff_plain;f=CRM%2FCore%2FIDS.php;h=fb8a01974a9e2ecf9a617d70d05b69f0c447cd3e;hb=c5150c33459c9250da84d824105c461e25c3fef0;hp=59e48c24a6f082105011306f71f4bca5f22a4478;hpb=093e8cc14b638518ace7131472225302a9683eee;p=civicrm-core.git diff --git a/CRM/Core/IDS.php b/CRM/Core/IDS.php index 59e48c24a6..fb8a01974a 100644 --- a/CRM/Core/IDS.php +++ b/CRM/Core/IDS.php @@ -110,7 +110,8 @@ class CRM_Core_IDS { 'filter_type' => 'xml', 'filter_path' => "{$pkgs}/IDS/default_filter.xml", 'tmp_path' => $tmpDir, - 'HTML_Purifier_Path' => $pkgs . '/IDS/vendors/htmlpurifier/HTMLPurifier.auto.php', + // Ignored, uses autoloader + 'HTML_Purifier_Path' => TRUE, 'HTML_Purifier_Cache' => $tmpDir, 'scan_keys' => '', 'exceptions' => ['__utmz', '__utmc'], @@ -225,7 +226,7 @@ class CRM_Core_IDS { /** * This function writes an entry about the intrusion to the database. * - * @param array $result + * @param IDS_Report $result * @param int $reaction * * @return bool @@ -236,13 +237,14 @@ class CRM_Core_IDS { $data = []; $session = CRM_Core_Session::singleton(); + $session_id = CRM_Core_Config::singleton()->userSystem->getSessionId() ? CRM_Core_Config::singleton()->userSystem->getSessionId() : '0'; foreach ($result as $event) { $data[] = [ 'name' => $event->getName(), 'value' => stripslashes($event->getValue()), 'page' => $_SERVER['REQUEST_URI'], 'userid' => $session->get('userID'), - 'session' => session_id() ? session_id() : '0', + 'session' => $session_id, 'ip' => $ip, 'reaction' => $reaction, 'impact' => $result->getImpact(),