From b1e845211c39571e0b51869f7ea5f5ccbe068861 Mon Sep 17 00:00:00 2001 From: Felipe Zimmerle Date: Tue, 15 Sep 2015 16:09:44 -0300 Subject: [PATCH] Limits the variable size into the debuglogs and print it in hex if needed --- src/rule.cc | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/src/rule.cc b/src/rule.cc index 42f85d71..cdaa01f4 100644 --- a/src/rule.cc +++ b/src/rule.cc @@ -29,6 +29,7 @@ #include "modsecurity/modsecurity.h" #include "actions/transformations/none.h" #include "variables/variations/exclusion.h" +#include "src/utils.h" using ModSecurity::Variables::Variations::Exclusion; @@ -271,8 +272,8 @@ bool Rule::evaluate(Assay *assay) { } } - assay->debug(9, "Target value: \"" + value + "\" (Variable: " + \ - v.first + ")"); + assay->debug(9, "Target value: \"" + limitTo(80, toHexIfNeeded(value)) + \ + "\" (Variable: " + v.first + ")"); ret = this->op->evaluate(assay, value);