mirror of
https://github.com/owasp-modsecurity/ModSecurity.git
synced 2025-09-29 11:16:33 +03:00
Fix @pmFromFile with multiple files issue
This commit is contained in:
2
test/test-cases/data/pattern-file1.data
Normal file
2
test/test-cases/data/pattern-file1.data
Normal file
@@ -0,0 +1,2 @@
|
||||
# comment
|
||||
pattern1
|
2
test/test-cases/data/pattern-file2.data
Normal file
2
test/test-cases/data/pattern-file2.data
Normal file
@@ -0,0 +1,2 @@
|
||||
# comment
|
||||
pattern2
|
39
test/test-cases/regression/operator-pmfromfile.json
Normal file
39
test/test-cases/regression/operator-pmfromfile.json
Normal file
@@ -0,0 +1,39 @@
|
||||
[
|
||||
{
|
||||
"enabled": 1,
|
||||
"version_min": 300000,
|
||||
"version_max": 0,
|
||||
"title": "pmFromFile operator test",
|
||||
"client": {
|
||||
"ip": "10.20.30.40",
|
||||
"port": 2313
|
||||
},
|
||||
"server": {
|
||||
"ip": "1.2.3.4",
|
||||
"port": 80
|
||||
},
|
||||
"request": {
|
||||
"headers": {
|
||||
"Host": "foobar.com"
|
||||
},
|
||||
"uri": "\/test.php?param1=pattern2",
|
||||
"method": "GET",
|
||||
"http_version": 1.1,
|
||||
"body": ""
|
||||
},
|
||||
"response": {
|
||||
"headers": {
|
||||
"Content-Type": "text\/html; charset=utf-8\n\r",
|
||||
"Content-Length": "10\n\r"
|
||||
}
|
||||
},
|
||||
"expected": {
|
||||
"debug_log": "Rule returned 1",
|
||||
"http_code": 403
|
||||
},
|
||||
"rules": [
|
||||
"SecRuleEngine On",
|
||||
"SecRule ARGS \"@pmFromFile test-cases/data/pattern-file1.data test-cases/data/pattern-file2.data\" \"phase:1,id:999,deny\""
|
||||
]
|
||||
}
|
||||
]
|
Reference in New Issue
Block a user