From afdc291970b29281e1f5c33b9598b0e44e0fa7d6 Mon Sep 17 00:00:00 2001 From: Neil Lathwood Date: Thu, 26 Feb 2015 01:14:52 +0000 Subject: [PATCH] Added fix for <> being used in alert rules --- html/forms/parse-alert-rule.inc.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/html/forms/parse-alert-rule.inc.php b/html/forms/parse-alert-rule.inc.php index 8e599d2eb..7ce44d675 100644 --- a/html/forms/parse-alert-rule.inc.php +++ b/html/forms/parse-alert-rule.inc.php @@ -20,7 +20,7 @@ $alert_id = $_POST['alert_id']; if(is_numeric($alert_id) && $alert_id > 0) { $rule = dbFetchRow("SELECT * FROM `alert_rules` WHERE `id` = ? LIMIT 1",array($alert_id)); - $rule_split = preg_split('/([a-zA-Z0-9_\-\.\=\%\ \"\'\!\~]+[&&||]+)/',$rule['rule'], -1, PREG_SPLIT_DELIM_CAPTURE | PREG_SPLIT_NO_EMPTY); + $rule_split = preg_split('/([a-zA-Z0-9_\-\.\=\%\<\>\ \"\'\!\~]+[&&||]+)/',$rule['rule'], -1, PREG_SPLIT_DELIM_CAPTURE | PREG_SPLIT_NO_EMPTY); $count = count($rule_split) - 1; $rule_split[$count] = $rule_split[$count].'&&'; $output = array('severity'=>$rule['severity'],'extra'=>$rule['extra'],'name'=>$rule['name'],'rules'=>$rule_split);