mirror of
https://github.com/owasp-modsecurity/ModSecurity.git
synced 2025-09-29 19:24:29 +03:00
Extends the direct access model to other collections
This commit is contained in:
committed by
Felipe Zimmerle
parent
ca24b6bb06
commit
f2d149fc5f
@@ -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 {
|
||||
|
@@ -71,7 +71,7 @@
|
||||
]
|
||||
},
|
||||
"expected":{
|
||||
"debug_log":"Target value: \"\" \\(Variable: MATCHED_VAR\\)"
|
||||
"debug_log":"Target value: \"other_value\" \\(Variable: MATCHED_VAR\\)"
|
||||
},
|
||||
"rules":[
|
||||
"SecRuleEngine On",
|
||||
|
@@ -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":[
|
||||
|
@@ -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",
|
||||
|
@@ -71,7 +71,7 @@
|
||||
]
|
||||
},
|
||||
"expected":{
|
||||
"debug_log":"Target value: \"\" \\(Variable: MATCHED_VAR\\)"
|
||||
"debug_log":"Rule returned 0"
|
||||
},
|
||||
"rules":[
|
||||
"SecRuleEngine On",
|
||||
|
@@ -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",
|
||||
|
@@ -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",
|
||||
|
Reference in New Issue
Block a user