ModSecurity/test/test-cases/regression/config-include-bad.json
Felipe Zimmerle 02909f7cd8
parser: arbitraty text can be used instead of operator
The usage of an arbitrary text instead operator was expecting that the
arbitrary text start by something different from "@" or "!", now it can
start with anything, including "@", and/or "!". Notice however that
there aren't such thing as a bad  operator. Bad operator will be used as
input of @rx. Issue #1136.
2016-06-22 16:59:50 -03:00

64 lines
1.9 KiB
JSON

[
{
"enabled":1,
"version_min":300000,
"title":"Include - bad rule",
"expected":{
"parser_error": "Rules error. File: test-cases/data/config_example3.txt. Line: 2. Column: 42. invalid character .*"
},
"rules":[
"SecRuleEngine On",
"SecDebugLog \/tmp\/modsec_debug.log",
"SecDebugLogLevel 9",
"Include test-cases/data/config_example3.txt",
"SecRule ARGS \"@missing_operator test\" \"id:19,pass,t:trim\""
]
},
{
"enabled":1,
"version_min":300000,
"title":"Include - missing file",
"expected":{
"parser_error": "Rules error. File: config-include-bad.json. Line: 4. Column: 47. test-cases/data/config_example-ops.txt: Not able to open file."
},
"rules":[
"SecRuleEngine On",
"SecDebugLog \/tmp\/modsec_debug.log",
"SecDebugLogLevel 9",
"Include test-cases/data/config_example-ops.txt",
"SecRule ARGS \"@contains test\" \"id:19,pass,t:trim\""
]
},
{
"enabled":1,
"version_min":300000,
"title":"Include - missing at include",
"expected":{
"parser_error": "Rules error. File: test-cases/data/config_example-ops-include.txt. Line: 1. Column: 53. test-cases/data/config_example-not-exist.txt: Not able to open file."
},
"rules":[
"SecRuleEngine On",
"SecDebugLog \/tmp\/modsec_debug.log",
"SecDebugLogLevel 9",
"Include test-cases/data/config_example-ops-include.txt",
"SecRule ARGS \"@contains test\" \"id:19,pass,t:trim\""
]
},
{
"enabled":1,
"version_min":300000,
"title":"Include - duplicate id",
"expected":{
"parser_error": "Rule id: 40 is duplicated"
},
"rules":[
"SecRuleEngine On",
"SecDebugLog \/tmp\/modsec_debug.log",
"SecDebugLogLevel 9",
"Include test-cases/data/config_example.txt",
"Include test-cases/data/config_example.txt",
"SecRule ARGS \"@missing_operator test\" \"id:19,pass,t:trim\""
]
}
]