Adds macro expansion for all operators

This commit is contained in:
Felipe Zimmerle
2015-09-16 11:25:07 -03:00
parent 320bcde89e
commit 9d60dc6df8
15 changed files with 49 additions and 19 deletions

View File

@@ -16,12 +16,14 @@
#include "operators/str_eq.h"
#include <string>
#include "src/macro_expansion.h"
namespace ModSecurity {
namespace operators {
bool StrEq::evaluate(Assay *assay, const std::string &str) {
bool eq = !this->param.compare(str);
std::string p = MacroExpansion::expand(param, assay);
bool eq = !p.compare(str);
if (negation) {
return !eq;