From 115afffe33279363c1ca658802b09f153989ea82 Mon Sep 17 00:00:00 2001 From: Felipe Zimmerle Date: Wed, 14 Sep 2016 16:29:57 -0300 Subject: [PATCH] Cosmetic: Limit the matched log size --- src/rule.cc | 11 +++++------ 1 file changed, 5 insertions(+), 6 deletions(-) diff --git a/src/rule.cc b/src/rule.cc index 615cfaff..d2ec4b21 100644 --- a/src/rule.cc +++ b/src/rule.cc @@ -402,10 +402,11 @@ bool Rule::evaluate(Transaction *trasn) { globalRet = true; if (this->op->m_match_message.empty() == true) { - ruleMessage->m_match = "Matched \"Operator `" + this->op->op + - "' with parameter `" + this->op->param + "' against" \ - " variable `" + v->m_key + "' (Value: `" + value + "' ) " + - "\" at " + v->m_key; + ruleMessage->m_match = "Matched \"Operator `" + + this->op->op + "' with parameter `" + + limitTo(200, this->op->param) + + "' against variable `" + v->m_key + "' (Value: `" + + value + "' ) \" at " + v->m_key; } else { ruleMessage->m_match = this->op->m_match_message; } @@ -430,7 +431,6 @@ bool Rule::evaluate(Transaction *trasn) { } else { containsDisruptive = true; } - } } @@ -538,7 +538,6 @@ bool Rule::evaluate(Transaction *trasn) { trasn->m_collections.del("MATCHED_VARS:" + v->m_key); trasn->m_collections.del("MATCHED_VARS_NAMES:" + v->m_key); trasn->m_collections.del("MATCHED_VARS_NAME"); - #endif } }