Adds initial support to chained rules

This commit is contained in:
Felipe Zimmerle
2015-07-21 10:49:43 -03:00
parent 9c066e3198
commit 4f20f5bf74
8 changed files with 122 additions and 4 deletions

View File

@@ -20,6 +20,7 @@
#include "modsecurity/assay.h"
#include "actions/block.h"
#include "actions/chain.h"
#include "actions/redirect.h"
#include "actions/status.h"
#include "actions/rule_id.h"
@@ -27,6 +28,7 @@
#include "actions/severity.h"
#define IF_MATCH(a) \
if (op.compare(1, std::strlen(#a), #a) == 0)
@@ -79,7 +81,9 @@ Action *Action::instantiate(std::string name) {
if (name.compare(0, severity.length(), severity) == 0) {
return new Severity(name);
}
if (name == "chain") {
return new Chain(name);
}
return new Action(name);
}