Extends the direct access model to other collections

This commit is contained in:
Felipe Zimmerle
2017-01-26 23:13:38 -03:00
committed by Felipe Zimmerle
parent ca24b6bb06
commit f2d149fc5f
157 changed files with 7711 additions and 4959 deletions

View File

@@ -84,8 +84,8 @@ int main(int argc, char **argv) {
if (z == NULL) {
continue;
}
if (z->op != NULL) {
std::string op = z->op->m_op;
if (z->m_op != NULL) {
std::string op = z->m_op->m_op;
if (operators.count(op) > 0) {
operators[op] = 1 + operators[op];
} else {
@@ -93,8 +93,8 @@ int main(int argc, char **argv) {
}
key = op;
}
if (z->variables != NULL) {
std::string var = Variable::to_s(z->variables);
if (z->m_variables != NULL) {
std::string var = Variable::to_s(z->m_variables);
if (variables.count(var) > 0) {
variables[var] = 1 + variables[var];
} else {
@@ -102,7 +102,7 @@ int main(int argc, char **argv) {
}
key = key + var;
}
if (z->variables != NULL && z->op != NULL) {
if (z->m_variables != NULL && z->m_op != NULL) {
if (op2var.count(key) > 0) {
op2var[key] = 1 + op2var[key];
} else {

View File

@@ -71,7 +71,7 @@
]
},
"expected":{
"debug_log":"Target value: \"\" \\(Variable: MATCHED_VAR\\)"
"debug_log":"Target value: \"other_value\" \\(Variable: MATCHED_VAR\\)"
},
"rules":[
"SecRuleEngine On",

View File

@@ -34,7 +34,7 @@
"version_min":300000,
"title":"Testing Disruptive actions (3/n)",
"expected":{
"debug_log": "_Not_ running .disruptive. action: block. SecRuleEngine is not On",
"debug_log": "Not running disruptive action: block. SecRuleEngine is not On",
"http_code":200
},
"rules":[

View File

@@ -51,7 +51,7 @@
]
},
"expected":{
"debug_log":"Expect: 100-continue\\x0aContent-Type: multipart/form-data; boundary=------------"
"debug_log":"Content-Type: multipart/form-data; boundary=------------"
},
"rules":[
"SecRuleEngine On",

View File

@@ -71,7 +71,7 @@
]
},
"expected":{
"debug_log":"Target value: \"\" \\(Variable: MATCHED_VAR\\)"
"debug_log":"Rule returned 0"
},
"rules":[
"SecRuleEngine On",

View File

@@ -51,7 +51,7 @@
]
},
"expected":{
"debug_log":"Target value: \"small_text_file.txt\" \\(Variable: MULTIPART_FILENAME\\)"
"debug_log":"Target value: \"small_text_file.txt\" \\(Variable: MULTIPART_FILENAME"
},
"rules":[
"SecRuleEngine On",
@@ -110,7 +110,7 @@
]
},
"expected":{
"debug_log":"Target value: \"small_text_file2.txt\" \\(Variable: MULTIPART_FILENAME\\)"
"debug_log":"Target value: \"small_text_file2.txt\" \\(Variable: MULTIPART_FILENAME"
},
"rules":[
"SecRuleEngine On",

View File

@@ -51,7 +51,7 @@
]
},
"expected":{
"debug_log":"Target value: \"filedata\" \\(Variable: MULTIPART_NAME\\)"
"debug_log":"Target value: \"filedata\" \\(Variable: MULTIPART_NAME"
},
"rules":[
"SecRuleEngine On",
@@ -110,7 +110,7 @@
]
},
"expected":{
"debug_log":"Target value: \"filedata2\" \\(Variable: MULTIPART_NAME\\)"
"debug_log":"Target value: \"filedata2\" \\(Variable: MULTIPART_NAME"
},
"rules":[
"SecRuleEngine On",