Splits Rule class into: Rule, RuleBase, RuleMarker

This commit is contained in:
Felipe Zimmerle
2019-02-18 15:42:13 -03:00
parent fda03c0016
commit 43f8aee6b6
18 changed files with 948 additions and 851 deletions

View File

@@ -35,7 +35,7 @@ invalidScanfArgType_int:src/rules_set_properties.cc:102
unmatchedSuppression:src/utils/geo_lookup.cc:82
useInitializationList:src/utils/shared_files.h:87
unmatchedSuppression:src/utils/msc_tree.cc
functionStatic:headers/modsecurity/transaction.h:373
functionStatic:headers/modsecurity/transaction.h:404
duplicateBranch:src/audit_log/audit_log.cc:223
unreadVariable:src/request_body_processor/multipart.cc:435
stlcstrParam:src/audit_log/writer/parallel.cc:145

View File

@@ -81,11 +81,12 @@ int main(int argc, char **argv) {
std::unordered_map<std::string, int> op2var;
for (int i = 0; i < rules->size(); i++) {
std::shared_ptr<Rule> z = rules->at(i);
std::string key;
auto z = rules->at(i);
//std::string key;
if (z == NULL) {
continue;
}
#if 0
if (z->isUnconditional() == false) {
std::string op = z->getOperatorName();
if (operators.count(op) > 0) {
@@ -95,6 +96,7 @@ int main(int argc, char **argv) {
}
key = op;
}
#endif
#if 0
FIXME: This test may not be useful anymore. Disabling it for now.

View File

@@ -110,7 +110,7 @@
},
"expected": {
"audit_log": "",
"debug_log": "Out of a SecMarker after skip 6 rules.",
"debug_log": "Rule: 6",
"error_log": ""
},
"rules": [