<?php
/*
+--------------------------------------------------------------------+
- | CiviCRM version 4.6 |
+ | CiviCRM version 4.7 |
+--------------------------------------------------------------------+
- | Copyright CiviCRM LLC (c) 2004-2014 |
+ | Copyright CiviCRM LLC (c) 2004-2015 |
+--------------------------------------------------------------------+
| This file is a part of CiviCRM. |
| |
/**
*
* @package CRM
- * @copyright CiviCRM LLC (c) 2004-2014
- * $Id$
- *
+ * @copyright CiviCRM LLC (c) 2004-2015
*/
class CRM_Core_IDS {
/**
- * Define the threshold for the ids reactions
+ * Define the threshold for the ids reactions.
*/
private $threshold = array(
'log' => 25,
private $init = NULL;
/**
+ * Check function.
+ *
* This function includes the IDS vendor parts and runs the
* detection routines on the request array.
*
return NULL;
}
- #add request url and user agent
+ // Add request url and user agent.
$_REQUEST['IDS_request_uri'] = $_SERVER['REQUEST_URI'];
if (isset($_SERVER['HTTP_USER_AGENT'])) {
$_REQUEST['IDS_user_agent'] = $_SERVER['HTTP_USER_AGENT'];
}
/**
- * Create the default config file for the IDS system
+ * Create the default config file for the IDS system.
*
* @param bool $force
* Should we recreate it irrespective if it exists or not.
exceptions[] = report_header
exceptions[] = report_footer
exceptions[] = data
+ exceptions[] = json
exceptions[] = instructions
exceptions[] = suggested_message
exceptions[] = page_text
}
/**
- * This function rects on the values in
- * the incoming results array.
+ * This function reacts on the values in the incoming results array.
*
* Depending on the impact value certain actions are
* performed.
}
/**
- * This function writes an entry about the intrusion
- * to the intrusion database
+ * This function writes an entry about the intrusion to the database.
*
* @param array $result
* @param int $reaction
}
/**
- * //todo
+ * Warn about IDS.
+ *
+ * @param array $result
+ *
+ * @return array
*/
private function warn($result) {
return $result;
}
/**
- * //todo
+ * Kick (whatever that means!).
+ *
+ * @param array $result
+ *
+ * @throws \Exception
*/
private function kick($result) {
$session = CRM_Core_Session::singleton();