From 035040cd13cd61fc77305cde778dcb592da14369 Mon Sep 17 00:00:00 2001 From: Felipe Zimmerle Date: Wed, 2 Sep 2015 10:03:22 -0300 Subject: [PATCH] Adds sanity check to confirm that the rule has an ID and it is not duplicated --- src/parser/driver.cc | 26 ++++++++++- src/parser/seclang-parser.yy | 4 +- src/parser/seclang-scanner.ll | 1 + .../data/config_example-bad-op-include.txt | 2 +- test/test-cases/data/config_example.txt | 3 +- test/test-cases/data/config_example2.txt | 3 +- test/test-cases/data/config_example3.txt | 2 + test/test-cases/regression/action-msg.json | 4 +- test/test-cases/regression/action-tag.json | 8 ++-- test/test-cases/regression/actions.json | 12 ++--- test/test-cases/regression/auditlog.json | 6 +-- .../regression/collection-tx-with-macro.json | 22 +++++----- test/test-cases/regression/collection-tx.json | 22 +++++----- .../regression/config-include-bad.json | 28 +++++++++--- .../test-cases/regression/config-include.json | 3 +- test/test-cases/regression/debug_log.json | 8 ++-- .../regression/operator-ipMatchFromFile.json | 6 +-- .../regression/sec_component_signature.json | 2 +- .../regression/transformation-none.json | 2 +- .../regression/transformations.json | 4 +- test/test-cases/regression/variable-ARGS.json | 8 ++-- .../variable-ARGS_COMBINED_SIZE.json | 14 +++--- .../regression/variable-ARGS_GET.json | 4 +- .../regression/variable-ARGS_GET_NAMES.json | 4 +- .../regression/variable-ARGS_NAMES.json | 8 ++-- .../regression/variable-ARGS_POST.json | 4 +- .../regression/variable-ARGS_POST_NAMES.json | 4 +- .../regression/variable-AUTH_TYPE.json | 4 +- .../regression/variable-DURATION.json | 6 +-- test/test-cases/regression/variable-ENV.json | 6 +-- .../test-cases/regression/variable-FILES.json | 2 +- .../variable-FILES_COMBINED_SIZE.json | 2 +- .../regression/variable-FILES_NAMES.json | 2 +- .../regression/variable-FILES_SIZES.json | 2 +- .../variable-FILES_TMP_CONTENT.json | 2 +- .../regression/variable-FULL_REQUEST.json | 2 +- .../variable-FULL_REQUEST_LENGTH.json | 2 +- test/test-cases/regression/variable-GEO.json | 44 +++++++++---------- .../regression/variable-HIGHEST_SEVERITY.json | 8 ++-- .../variable-INBOUND_DATA_ERROR.json | 4 +- .../regression/variable-MODSEC_BUILD.json | 2 +- .../variable-MULTIPART_CRLF_LF_LINES.json | 4 +- .../variable-MULTIPART_FILENAME.json | 4 +- .../regression/variable-MULTIPART_NAME.json | 4 +- .../variable-MULTIPART_STRICT_ERROR.json | 12 ++--- ...variable-MULTIPART_UNMATCHED_BOUNDARY.json | 2 +- .../variable-OUTBOUND_DATA_ERROR.json | 4 +- .../regression/variable-PATH_INFO.json | 6 +-- .../regression/variable-QUERY_STRING.json | 2 +- .../regression/variable-REMOTE_ADDR.json | 4 +- .../regression/variable-REMOTE_HOST.json | 4 +- .../regression/variable-REMOTE_PORT.json | 4 +- .../regression/variable-REQUEST_BASENAME.json | 2 +- .../regression/variable-REQUEST_BODY.json | 2 +- .../variable-REQUEST_BODY_LENGTH.json | 2 +- .../regression/variable-REQUEST_COOKIES.json | 6 +-- .../variable-REQUEST_COOKIES_NAMES.json | 6 +-- .../regression/variable-REQUEST_FILENAME.json | 2 +- .../regression/variable-REQUEST_HEADERS.json | 2 +- .../variable-REQUEST_HEADERS_NAMES.json | 2 +- .../regression/variable-REQUEST_LINE.json | 2 +- .../regression/variable-REQUEST_METHOD.json | 2 +- .../regression/variable-REQUEST_PROTOCOL.json | 2 +- .../regression/variable-REQUEST_URI.json | 2 +- .../regression/variable-REQUEST_URI_RAW.json | 2 +- .../regression/variable-RESPONSE_BODY.json | 2 +- .../variable-RESPONSE_CONTENT_LENGTH.json | 2 +- .../variable-RESPONSE_CONTENT_TYPE.json | 2 +- .../regression/variable-RESPONSE_HEADERS.json | 2 +- .../variable-RESPONSE_HEADERS_NAMES.json | 2 +- .../regression/variable-SERVER_ADDR.json | 4 +- .../regression/variable-SERVER_PORT.json | 4 +- test/test-cases/regression/variable-TIME.json | 2 +- .../regression/variable-TIME_DAY.json | 2 +- .../regression/variable-TIME_EPOCH.json | 2 +- .../regression/variable-TIME_HOUR.json | 2 +- .../regression/variable-TIME_MIN.json | 2 +- .../regression/variable-TIME_MON.json | 2 +- .../regression/variable-TIME_SEC.json | 2 +- .../regression/variable-TIME_WDAY.json | 2 +- .../regression/variable-TIME_YEAR.json | 2 +- test/test-cases/regression/variable-TX.json | 4 +- .../regression/variable-UNIQUE_ID.json | 2 +- .../regression/variable-variation-count.json | 6 +-- .../variable-variation-exclusion.json | 4 +- 85 files changed, 240 insertions(+), 198 deletions(-) create mode 100644 test/test-cases/data/config_example3.txt diff --git a/src/parser/driver.cc b/src/parser/driver.cc index e62235e1..ce59ce73 100644 --- a/src/parser/driver.cc +++ b/src/parser/driver.cc @@ -63,6 +63,24 @@ int Driver::addSecRule(Rule *rule) { } } + /* + * Checking if the rule has an ID and also checking if this ID is not used + * by other rule + */ + if (rule->rule_id == 0) { + parserError << "Rules must have an ID." << std::endl; + return false; + } + for (int i = 0; i < ModSecurity::Phases::NUMBER_OF_PHASES; i++) { + std::vector rules = this->rules[i]; + for (int j = 0; j < rules.size(); j++) { + if (rules[j]->rule_id == rule->rule_id) { + parserError << "Rule id: " << std::to_string(rule->rule_id) << " is duplicated" << std::endl; + return false; + } + } + } + lastRule = rule; rules[rule->phase].push_back(rule); return true; @@ -83,11 +101,12 @@ int Driver::parse(const std::string &f, const std::string &ref) { yy::seclang_parser parser(*this); parser.set_debug_level(trace_parsing); int res = parser.parse(); + scan_end(); if (audit_log->init() == false) { + parserError << "Problems while initializing the audit logs" << std::endl; return false; } - scan_end(); return res == 0; } @@ -126,6 +145,11 @@ void Driver::error(const yy::location& l, const std::string& m, parserError << "Line: " << l.end.line << ". "; parserError << "Column: " << l.end.column << ". "; } + /* + if (m.empty() == false) { + parserError << " " << m << "."; + } + */ if (c.empty() == false) { parserError << c; } diff --git a/src/parser/seclang-parser.yy b/src/parser/seclang-parser.yy index 89b77954..35801d13 100644 --- a/src/parser/seclang-parser.yy +++ b/src/parser/seclang-parser.yy @@ -324,7 +324,9 @@ expression: /* variables */ $3, /* actions */ $8 ); - driver.addSecRule(rule); + if (driver.addSecRule(rule) == false) { + YYERROR; + } } | DIRECTIVE SPACE variables SPACE FREE_TEXT SPACE QUOTATION_MARK actions SPACE QUOTATION_MARK | DIRECTIVE SPACE variables SPACE FREE_TEXT SPACE QUOTATION_MARK actions QUOTATION_MARK diff --git a/src/parser/seclang-scanner.ll b/src/parser/seclang-scanner.ll index 8d96a1ab..7b960dcd 100755 --- a/src/parser/seclang-scanner.ll +++ b/src/parser/seclang-scanner.ll @@ -374,6 +374,7 @@ bool Driver::scan_begin () { } void Driver::scan_end () { + yylex_destroy(); BEGIN(INITIAL); } diff --git a/test/test-cases/data/config_example-bad-op-include.txt b/test/test-cases/data/config_example-bad-op-include.txt index c255c20f..2b350248 100644 --- a/test/test-cases/data/config_example-bad-op-include.txt +++ b/test/test-cases/data/config_example-bad-op-include.txt @@ -1,2 +1,2 @@ SecRule ARGS "@contains config_example" "id:10,pass,t:trim" -SecRule ARGS "@missingOperator config_example" "id:10,pass,t:trim" +SecRule ARGS "@missingOperator config_example" "id:11,pass,t:trim" diff --git a/test/test-cases/data/config_example.txt b/test/test-cases/data/config_example.txt index 39d369c7..d5e098d9 100644 --- a/test/test-cases/data/config_example.txt +++ b/test/test-cases/data/config_example.txt @@ -1,3 +1,2 @@ Include test-cases/data/config_example2.txt -SecRule ARGS "@contains config_example" "id:10,pass,t:trim" -Include test-cases/data/config_example2.txt \ No newline at end of file +SecRule ARGS "@contains config_example" "id:101,pass,t:trim" \ No newline at end of file diff --git a/test/test-cases/data/config_example2.txt b/test/test-cases/data/config_example2.txt index fa8a7102..1d5015c5 100644 --- a/test/test-cases/data/config_example2.txt +++ b/test/test-cases/data/config_example2.txt @@ -1,2 +1 @@ -SecRule ARGS "@contains config_example2" "id:20,pass,t:trim" - +SecRule ARGS "@contains config_example2" "id:40,pass,t:trim" \ No newline at end of file diff --git a/test/test-cases/data/config_example3.txt b/test/test-cases/data/config_example3.txt new file mode 100644 index 00000000..311b1a07 --- /dev/null +++ b/test/test-cases/data/config_example3.txt @@ -0,0 +1,2 @@ +Include test-cases/data/config_example2.txt +SecRule ARGS "@contains config_example" ops "id:1000,pass,t:trim" \ No newline at end of file diff --git a/test/test-cases/regression/action-msg.json b/test/test-cases/regression/action-msg.json index c0cc023f..f443df0f 100644 --- a/test/test-cases/regression/action-msg.json +++ b/test/test-cases/regression/action-msg.json @@ -55,8 +55,8 @@ "SecRuleEngine On", "SecDebugLog \/tmp\/modsec_debug.log", "SecDebugLogLevel 9", - "SecRule REQUEST_HEADERS \"@contains PHPSESSID\" \"t:lowercase,t:none,msg:'This is a test, %{REQUEST_HEADERS:Accept}%'\"", - "SecRule TX \"@contains to_test\" \"t:lowercase,t:none\"" + "SecRule REQUEST_HEADERS \"@contains PHPSESSID\" \"id:1,t:lowercase,t:none,msg:'This is a test, %{REQUEST_HEADERS:Accept}%'\"", + "SecRule TX \"@contains to_test\" \"id:2,t:lowercase,t:none\"" ] } ] \ No newline at end of file diff --git a/test/test-cases/regression/action-tag.json b/test/test-cases/regression/action-tag.json index f05d0d48..c84e556b 100644 --- a/test/test-cases/regression/action-tag.json +++ b/test/test-cases/regression/action-tag.json @@ -55,8 +55,8 @@ "SecRuleEngine On", "SecDebugLog \/tmp\/modsec_debug.log", "SecDebugLogLevel 9", - "SecRule REQUEST_HEADERS \"@contains PHPSESSID\" \"tag:'teste',t:lowercase,t:none\"", - "SecRule TX \"@contains to_test\" \"t:lowercase,t:none\"" + "SecRule REQUEST_HEADERS \"@contains PHPSESSID\" \"id:1,tag:'teste',t:lowercase,t:none\"", + "SecRule TX \"@contains to_test\" \"id:2,t:lowercase,t:none\"" ] }, { @@ -115,8 +115,8 @@ "SecRuleEngine On", "SecDebugLog \/tmp\/modsec_debug.log", "SecDebugLogLevel 9", - "SecRule REQUEST_HEADERS \"@contains PHPSESSID\" \"tag:'teste %{REQUEST_HEADERS:Pragma}%',t:lowercase,t:none\"", - "SecRule TX \"@contains to_test\" \"t:lowercase,t:none\"" + "SecRule REQUEST_HEADERS \"@contains PHPSESSID\" \"id:1,tag:'teste %{REQUEST_HEADERS:Pragma}%',t:lowercase,t:none\"", + "SecRule TX \"@contains to_test\" \"id:2,t:lowercase,t:none\"" ] } ] \ No newline at end of file diff --git a/test/test-cases/regression/actions.json b/test/test-cases/regression/actions.json index 864872e3..cea5ec67 100644 --- a/test/test-cases/regression/actions.json +++ b/test/test-cases/regression/actions.json @@ -57,7 +57,7 @@ "SecRuleEngine On", "SecDebugLog \/tmp\/modsec_debug.log", "SecDebugLogLevel 9", - "SecRule ARGS \"@contains test\" \"t:trim,block\"" + "SecRule ARGS \"@contains test\" \"id:1,t:trim,block\"" ] }, { @@ -119,7 +119,7 @@ "SecRuleEngine On", "SecDebugLog \/tmp\/modsec_debug.log", "SecDebugLogLevel 9", - "SecRule ARGS \"@contains test\" \"t:trim,redirect:http://www.google.com\"" + "SecRule ARGS \"@contains test\" \"id:1,t:trim,redirect:http://www.google.com\"" ] }, { @@ -181,7 +181,7 @@ "SecRuleEngine On", "SecDebugLog \/tmp\/modsec_debug.log", "SecDebugLogLevel 9", - "SecRule ARGS \"@contains test\" \"t:trim,status:500,redirect:http://www.google.com\"" + "SecRule ARGS \"@contains test\" \"id:1,t:trim,status:500,redirect:http://www.google.com\"" ] }, { @@ -242,7 +242,7 @@ "SecRuleEngine On", "SecDebugLog \/tmp\/modsec_debug.log", "SecDebugLogLevel 9", - "SecRule ARGS \"@contains test\" \"t:trim,status:500\"" + "SecRule ARGS \"@contains test\" \"id:1,t:trim,status:500\"" ] }, { @@ -303,7 +303,7 @@ "SecRuleEngine On", "SecDebugLog \/tmp\/modsec_debug.log", "SecDebugLogLevel 9", - "SecRule ARGS \"@contains test\" \"phase:1,t:trim,status:500\"" + "SecRule ARGS \"@contains test\" \"id:1,phase:1,t:trim,status:500\"" ] }, { @@ -364,7 +364,7 @@ "SecRuleEngine On", "SecDebugLog \/tmp\/modsec_debug.log", "SecDebugLogLevel 9", - "SecRule ARGS \"@contains test\" \"phase:4,t:trim,status:500\"" + "SecRule ARGS \"@contains test\" \"id:1,phase:4,t:trim,status:500\"" ] } ] diff --git a/test/test-cases/regression/auditlog.json b/test/test-cases/regression/auditlog.json index 4953dfd0..19111c77 100644 --- a/test/test-cases/regression/auditlog.json +++ b/test/test-cases/regression/auditlog.json @@ -48,7 +48,7 @@ "SecRuleEngine On", "SecDebugLog \/tmp\/modsec_debug.log", "SecDebugLogLevel 9", - "SecRule ARGS \"@contains test\" \"t:trim,block,auditlog\"", + "SecRule ARGS \"@contains test\" \"id:1,t:trim,block,auditlog\"", "SecAuditEngine RelevantOnly", "SecAuditLogParts ABCFHZ", "SecAuditLogStorageDir /tmp/test", @@ -107,7 +107,7 @@ "SecRuleEngine On", "SecDebugLog \/tmp\/modsec_debug.log", "SecDebugLogLevel 9", - "SecRule ARGS \"@contains test\" \"t:trim,block,auditlog\"", + "SecRule ARGS \"@contains test\" \"id:1,t:trim,block,auditlog\"", "SecAuditEngine RelevantOnly", "SecAuditLogParts ABCFHZ", "SecAuditLogStorageDir /tmp/test", @@ -167,7 +167,7 @@ "SecRuleEngine On", "SecDebugLog \/tmp\/modsec_debug.log", "SecDebugLogLevel 9", - "SecRule ARGS \"@contains test\" \"t:trim,block,auditlog\"", + "SecRule ARGS \"@contains test\" \"id:1,t:trim,block,auditlog\"", "SecAuditEngine RelevantOnly", "SecAuditLogParts ABCFHZ", "SecAuditLogStorageDir /tmp/test", diff --git a/test/test-cases/regression/collection-tx-with-macro.json b/test/test-cases/regression/collection-tx-with-macro.json index 425ad320..9a3c8eb7 100644 --- a/test/test-cases/regression/collection-tx-with-macro.json +++ b/test/test-cases/regression/collection-tx-with-macro.json @@ -55,8 +55,8 @@ "SecRuleEngine On", "SecDebugLog \/tmp\/modsec_debug.log", "SecDebugLogLevel 9", - "SecRule REQUEST_HEADERS \"@contains PHPSESSID\" \"t:lowercase,t:none,setvar:TX.something=%{REQUEST_HEADERS:Cookie}%\"", - "SecRule TX \"@contains to_test\" \"t:lowercase,t:none\"" + "SecRule REQUEST_HEADERS \"@contains PHPSESSID\" \"id:1,t:lowercase,t:none,setvar:TX.something=%{REQUEST_HEADERS:Cookie}%\"", + "SecRule TX \"@contains to_test\" \"id:2,t:lowercase,t:none\"" ] }, { @@ -115,8 +115,8 @@ "SecRuleEngine On", "SecDebugLog \/tmp\/modsec_debug.log", "SecDebugLogLevel 9", - "SecRule REQUEST_HEADERS \"@contains PHPSESSID\" \"t:lowercase,t:none,setvar:TX.something%{REQUEST_HEADERS:Cookie}%\"", - "SecRule TX \"@contains to_test\" \"t:lowercase,t:none\"" + "SecRule REQUEST_HEADERS \"@contains PHPSESSID\" \"id:1,t:lowercase,t:none,setvar:TX.something%{REQUEST_HEADERS:Cookie}%\"", + "SecRule TX \"@contains to_test\" \"id:2,t:lowercase,t:none\"" ] }, { @@ -175,9 +175,9 @@ "SecRuleEngine On", "SecDebugLog \/tmp\/modsec_debug.log", "SecDebugLogLevel 9", - "SecRule REQUEST_HEADERS \"@contains PHPSESSID\" \"t:lowercase,t:none,setvar:TX.something=%{REQUEST_HEADERS:Keep-Alive}%\"", - "SecRule REQUEST_HEADERS \"@contains PHPSESSID\" \"t:lowercase,t:none,setvar:TX.something=+10\"", - "SecRule TX \"@contains to_test\" \"t:lowercase,t:none\"" + "SecRule REQUEST_HEADERS \"@contains PHPSESSID\" \"id:1,t:lowercase,t:none,setvar:TX.something=%{REQUEST_HEADERS:Keep-Alive}%\"", + "SecRule REQUEST_HEADERS \"@contains PHPSESSID\" \"id:2,t:lowercase,t:none,setvar:TX.something=+10\"", + "SecRule TX \"@contains to_test\" \"id:3,t:lowercase,t:none\"" ] }, { @@ -236,10 +236,10 @@ "SecRuleEngine On", "SecDebugLog \/tmp\/modsec_debug.log", "SecDebugLogLevel 9", - "SecRule REQUEST_HEADERS \"@contains PHPSESSID\" \"t:lowercase,t:none,setvar:TX.something=+10\"", - "SecRule REQUEST_HEADERS \"@contains PHPSESSID\" \"t:lowercase,t:none,setvar:TX.something_else=%{tx.something}%\"", - "SecRule REQUEST_HEADERS \"@contains PHPSESSID\" \"t:lowercase,t:none,setvar:TX.something_else=-5\"", - "SecRule TX:something_else \"@contains to_test\" \"t:lowercase,t:none\"" + "SecRule REQUEST_HEADERS \"@contains PHPSESSID\" \"id:1,t:lowercase,t:none,setvar:TX.something=+10\"", + "SecRule REQUEST_HEADERS \"@contains PHPSESSID\" \"id:2,t:lowercase,t:none,setvar:TX.something_else=%{tx.something}%\"", + "SecRule REQUEST_HEADERS \"@contains PHPSESSID\" \"id:3,t:lowercase,t:none,setvar:TX.something_else=-5\"", + "SecRule TX:something_else \"@contains to_test\" \"id:4,t:lowercase,t:none\"" ] } ] \ No newline at end of file diff --git a/test/test-cases/regression/collection-tx.json b/test/test-cases/regression/collection-tx.json index 83e977a1..7dc7f8da 100644 --- a/test/test-cases/regression/collection-tx.json +++ b/test/test-cases/regression/collection-tx.json @@ -55,8 +55,8 @@ "SecRuleEngine On", "SecDebugLog \/tmp\/modsec_debug.log", "SecDebugLogLevel 9", - "SecRule REQUEST_HEADERS \"@contains PHPSESSID\" \"t:lowercase,t:none,setvar:TX.something=to_test\"", - "SecRule TX \"@contains to_test\" \"t:lowercase,t:none\"" + "SecRule REQUEST_HEADERS \"@contains PHPSESSID\" \"id:1,t:lowercase,t:none,setvar:TX.something=to_test\"", + "SecRule TX \"@contains to_test\" \"id:2,t:lowercase,t:none\"" ] }, { @@ -115,8 +115,8 @@ "SecRuleEngine On", "SecDebugLog \/tmp\/modsec_debug.log", "SecDebugLogLevel 9", - "SecRule REQUEST_HEADERS \"@contains PHPSESSID\" \"t:lowercase,t:none,setvar:TX.something\"", - "SecRule TX \"@contains to_test\" \"t:lowercase,t:none\"" + "SecRule REQUEST_HEADERS \"@contains PHPSESSID\" \"id:1,t:lowercase,t:none,setvar:TX.something\"", + "SecRule TX \"@contains to_test\" \"id:2,t:lowercase,t:none\"" ] }, { @@ -175,9 +175,9 @@ "SecRuleEngine On", "SecDebugLog \/tmp\/modsec_debug.log", "SecDebugLogLevel 9", - "SecRule REQUEST_HEADERS \"@contains PHPSESSID\" \"t:lowercase,t:none,setvar:TX.something=+10\"", - "SecRule REQUEST_HEADERS \"@contains PHPSESSID\" \"t:lowercase,t:none,setvar:TX.something=+10\"", - "SecRule TX \"@contains to_test\" \"t:lowercase,t:none\"" + "SecRule REQUEST_HEADERS \"@contains PHPSESSID\" \"id:1,t:lowercase,t:none,setvar:TX.something=+10\"", + "SecRule REQUEST_HEADERS \"@contains PHPSESSID\" \"id:2,t:lowercase,t:none,setvar:TX.something=+10\"", + "SecRule TX \"@contains to_test\" \"id:3,t:lowercase,t:none\"" ] }, { @@ -236,10 +236,10 @@ "SecRuleEngine On", "SecDebugLog \/tmp\/modsec_debug.log", "SecDebugLogLevel 9", - "SecRule REQUEST_HEADERS \"@contains PHPSESSID\" \"t:lowercase,t:none,setvar:TX.something=+10\"", - "SecRule REQUEST_HEADERS \"@contains PHPSESSID\" \"t:lowercase,t:none,setvar:TX.something=+10\"", - "SecRule REQUEST_HEADERS \"@contains PHPSESSID\" \"t:lowercase,t:none,setvar:TX.something=-5\"", - "SecRule TX \"@contains to_test\" \"t:lowercase,t:none\"" + "SecRule REQUEST_HEADERS \"@contains PHPSESSID\" \"id:1,t:lowercase,t:none,setvar:TX.something=+10\"", + "SecRule REQUEST_HEADERS \"@contains PHPSESSID\" \"id:2,t:lowercase,t:none,setvar:TX.something=+10\"", + "SecRule REQUEST_HEADERS \"@contains PHPSESSID\" \"id:3,t:lowercase,t:none,setvar:TX.something=-5\"", + "SecRule TX \"@contains to_test\" \"id:4,t:lowercase,t:none\"" ] } ] \ No newline at end of file diff --git a/test/test-cases/regression/config-include-bad.json b/test/test-cases/regression/config-include-bad.json index 219b1bc5..86a3dbba 100644 --- a/test/test-cases/regression/config-include-bad.json +++ b/test/test-cases/regression/config-include-bad.json @@ -4,14 +4,14 @@ "version_min":300000, "title":"Include - bad rule", "expected":{ - "parser_error": "Rules error. File: config-include-bad.json. Line: 5. Column: 33." + "parser_error": "Rules error. File: test-cases/data/config_example3.txt. Line: 2. Column: 42. ops" }, "rules":[ "SecRuleEngine On", "SecDebugLog \/tmp\/modsec_debug.log", "SecDebugLogLevel 9", - "Include test-cases/data/config_example.txt", - "SecRule ARGS \"@missing_operator test\" \"id:9,pass,t:trim\"" + "Include test-cases/data/config_example3.txt", + "SecRule ARGS \"@missing_operator test\" \"id:19,pass,t:trim\"" ] }, { @@ -26,7 +26,7 @@ "SecDebugLog \/tmp\/modsec_debug.log", "SecDebugLogLevel 9", "Include test-cases/data/config_example-ops.txt", - "SecRule ARGS \"@contains test\" \"id:9,pass,t:trim\"" + "SecRule ARGS \"@contains test\" \"id:19,pass,t:trim\"" ] }, { @@ -41,7 +41,7 @@ "SecDebugLog \/tmp\/modsec_debug.log", "SecDebugLogLevel 9", "Include test-cases/data/config_example-ops-include.txt", - "SecRule ARGS \"@contains test\" \"id:9,pass,t:trim\"" + "SecRule ARGS \"@contains test\" \"id:19,pass,t:trim\"" ] }, { @@ -56,7 +56,23 @@ "SecDebugLog \/tmp\/modsec_debug.log", "SecDebugLogLevel 9", "Include test-cases/data/config_example-bad-op-include.txt", - "SecRule ARGS \"@contains test\" \"id:9,pass,t:trim\"" + "SecRule ARGS \"@contains test\" \"id:19,pass,t:trim\"" + ] + }, + { + "enabled":1, + "version_min":300000, + "title":"Include - duplicate id", + "expected":{ + "parser_error": "Rule id: 40.000000 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\"" ] } ] diff --git a/test/test-cases/regression/config-include.json b/test/test-cases/regression/config-include.json index 1b48f411..19cc7a39 100644 --- a/test/test-cases/regression/config-include.json +++ b/test/test-cases/regression/config-include.json @@ -37,7 +37,7 @@ "SecRuleEngine On", "SecDebugLog \/tmp\/modsec_debug.log", "SecDebugLogLevel 9", - "Include test-cases/data/config_example.txt", + "Include test-cases/data/config_example2.txt", "SecRule ARGS \"@contains test\" \"id:9,pass,t:trim\"" ] }, @@ -207,7 +207,6 @@ "SecDebugLogLevel 9", "SecRule ARGS \"@contains test\" \"id:1,pass,t:trim\"", "Include test-cases/data/config_example.txt", - "Include test-cases/data/config_example.txt", "SecRule ARGS \"@contains test\" \"id:3,pass,t:trim\"" ] }, diff --git a/test/test-cases/regression/debug_log.json b/test/test-cases/regression/debug_log.json index 6286c63a..2adc2cfa 100644 --- a/test/test-cases/regression/debug_log.json +++ b/test/test-cases/regression/debug_log.json @@ -56,10 +56,10 @@ "SecRuleEngine On", "SecDebugLog \/tmp\/modsec_debug.log", "SecDebugLogLevel 9", - "SecRule ARGS \"@contains test\" \"pass\"", - "SecRule ARGS \"@contains /test.txt\" \"allow\"", - "SecRule ARGS:teste \"@contains /test.txt\" \" allow,deny\"", - "SecRule ARGS \"@contains /test.txt\" \"allow, allow,deny\"" + "SecRule ARGS \"@contains test\" \"id:3,pass\"", + "SecRule ARGS \"@contains /test.txt\" \"id:4,allow\"", + "SecRule ARGS:teste \"@contains /test.txt\" \" id:1,allow,deny\"", + "SecRule ARGS \"@contains /test.txt\" \"allow, allow,id:2,deny\"" ] } diff --git a/test/test-cases/regression/operator-ipMatchFromFile.json b/test/test-cases/regression/operator-ipMatchFromFile.json index e872fcfe..8c0e18cd 100644 --- a/test/test-cases/regression/operator-ipMatchFromFile.json +++ b/test/test-cases/regression/operator-ipMatchFromFile.json @@ -42,7 +42,7 @@ "SecRuleEngine On", "SecDebugLog \/tmp\/modsec_debug.log", "SecDebugLogLevel 9", - "SecRule REMOTE_ADDR \"@ipMatchFromFile test-cases\/data\/ipMatchFromFile.txt\" \"phase:3,pass,t:trim\"" + "SecRule REMOTE_ADDR \"@ipMatchFromFile test-cases\/data\/ipMatchFromFile.txt\" \"id:1,phase:3,pass,t:trim\"" ] }, { @@ -88,7 +88,7 @@ "SecRuleEngine On", "SecDebugLog \/tmp\/modsec_debug.log", "SecDebugLogLevel 9", - "SecRule REMOTE_ADDR \"@ipMatchFromFile file-not-found.txt\" \"phase:3,pass,t:trim\"" + "SecRule REMOTE_ADDR \"@ipMatchFromFile file-not-found.txt\" \"id:1,phase:3,pass,t:trim\"" ] }, { @@ -134,7 +134,7 @@ "SecRuleEngine On", "SecDebugLog \/tmp\/modsec_debug.log", "SecDebugLogLevel 9", - "SecRule REMOTE_ADDR \"@ipMatchFromFile https://www.modsecurity.org/modsecurity-regression-test.txt\" \"phase:3,pass,t:trim\"" + "SecRule REMOTE_ADDR \"@ipMatchFromFile https://www.modsecurity.org/modsecurity-regression-test.txt\" \"id:1,phase:3,pass,t:trim\"" ] } ] \ No newline at end of file diff --git a/test/test-cases/regression/sec_component_signature.json b/test/test-cases/regression/sec_component_signature.json index 86d61b8f..e05c3d4e 100644 --- a/test/test-cases/regression/sec_component_signature.json +++ b/test/test-cases/regression/sec_component_signature.json @@ -49,7 +49,7 @@ "SecDebugLog \/tmp\/modsec_debug.log", "SecDebugLogLevel 9", "SecComponentSignature \"OWASP_CRS/2.2.9\"", - "SecRule ARGS \"@contains test\" \"t:trim,block,auditlog\"" + "SecRule ARGS \"@contains test\" \"id:1,t:trim,block,auditlog\"" ] } ] \ No newline at end of file diff --git a/test/test-cases/regression/transformation-none.json b/test/test-cases/regression/transformation-none.json index e497635b..4107139b 100644 --- a/test/test-cases/regression/transformation-none.json +++ b/test/test-cases/regression/transformation-none.json @@ -56,7 +56,7 @@ "SecRuleEngine On", "SecDebugLog \/tmp\/modsec_debug.log", "SecDebugLogLevel 9", - "SecRule REQUEST_COOKIES \"@contains test \" \"t:lowercase,t:none\"" + "SecRule REQUEST_COOKIES \"@contains test \" \"id:1,t:lowercase,t:none\"" ] }, { diff --git a/test/test-cases/regression/transformations.json b/test/test-cases/regression/transformations.json index 2741d060..6d2731fb 100644 --- a/test/test-cases/regression/transformations.json +++ b/test/test-cases/regression/transformations.json @@ -56,7 +56,7 @@ "SecRuleEngine On", "SecDebugLog \/tmp\/modsec_debug.log", "SecDebugLogLevel 9", - "SecRule ARGS \"@contains test \" \"pass,t:trim\"" + "SecRule ARGS \"@contains test \" \"id:1,pass,t:trim\"" ] }, { @@ -116,7 +116,7 @@ "SecRuleEngine On", "SecDebugLog \/tmp\/modsec_debug.log", "SecDebugLogLevel 9", - "SecRule ARGS \"@contains test \" \"pass,t:trim,t:lowercase\"" + "SecRule ARGS \"@contains test \" \"id:1,pass,t:trim,t:lowercase\"" ] } ] diff --git a/test/test-cases/regression/variable-ARGS.json b/test/test-cases/regression/variable-ARGS.json index 2d64e9ab..f9646bc8 100644 --- a/test/test-cases/regression/variable-ARGS.json +++ b/test/test-cases/regression/variable-ARGS.json @@ -37,7 +37,7 @@ "SecRuleEngine On", "SecDebugLog \/tmp\/modsec_debug.log", "SecDebugLogLevel 9", - "SecRule ARGS \"@contains test \" \"pass,t:trim\"" + "SecRule ARGS \"@contains test \" \"id:1,pass,t:trim\"" ] }, { @@ -78,7 +78,7 @@ "SecRuleEngine On", "SecDebugLog \/tmp\/modsec_debug.log", "SecDebugLogLevel 9", - "SecRule ARGS \"@contains test \" \"pass,t:trim\"" + "SecRule ARGS \"@contains test \" \"id:1,pass,t:trim\"" ] }, { @@ -124,7 +124,7 @@ "SecRuleEngine On", "SecDebugLog \/tmp\/modsec_debug.log", "SecDebugLogLevel 9", - "SecRule ARGS \"@contains test \" \"phase:3,pass,t:trim\"" + "SecRule ARGS \"@contains test \" \"id:1,phase:3,pass,t:trim\"" ] }, { @@ -170,7 +170,7 @@ "SecRuleEngine On", "SecDebugLog \/tmp\/modsec_debug.log", "SecDebugLogLevel 9", - "SecRule ARGS \"@contains test \" \"phase:3,pass,t:trim\"" + "SecRule ARGS \"@contains test \" \"id:1,phase:3,pass,t:trim\"" ] } ] diff --git a/test/test-cases/regression/variable-ARGS_COMBINED_SIZE.json b/test/test-cases/regression/variable-ARGS_COMBINED_SIZE.json index 297bdfd5..a391857c 100644 --- a/test/test-cases/regression/variable-ARGS_COMBINED_SIZE.json +++ b/test/test-cases/regression/variable-ARGS_COMBINED_SIZE.json @@ -37,7 +37,7 @@ "SecRuleEngine On", "SecDebugLog \/tmp\/modsec_debug.log", "SecDebugLogLevel 9", - "SecRule ARGS_COMBINED_SIZE \"@gt 10 \" \"pass\"" + "SecRule ARGS_COMBINED_SIZE \"@gt 10 \" \"id:1,pass\"" ] }, { @@ -78,7 +78,7 @@ "SecRuleEngine On", "SecDebugLog \/tmp\/modsec_debug.log", "SecDebugLogLevel 9", - "SecRule ARGS_COMBINED_SIZE \"@gt 10 \" \"pass\"" + "SecRule ARGS_COMBINED_SIZE \"@gt 10 \" \"id:1,pass\"" ] }, { @@ -124,7 +124,7 @@ "SecRuleEngine On", "SecDebugLog \/tmp\/modsec_debug.log", "SecDebugLogLevel 9", - "SecRule ARGS_COMBINED_SIZE \"@gt 10 \" \"phase:3,pass\"" + "SecRule ARGS_COMBINED_SIZE \"@gt 10 \" \"id:1,phase:3,pass\"" ] }, { @@ -170,7 +170,7 @@ "SecRuleEngine On", "SecDebugLog \/tmp\/modsec_debug.log", "SecDebugLogLevel 9", - "SecRule ARGS_COMBINED_SIZE \"@gt 10 \" \"phase:3,pass,t:trim\"" + "SecRule ARGS_COMBINED_SIZE \"@gt 10 \" \"id:1,phase:3,pass,t:trim\"" ] }, { @@ -216,7 +216,7 @@ "SecRuleEngine On", "SecDebugLog \/tmp\/modsec_debug.log", "SecDebugLogLevel 9", - "SecRule ARGS_COMBINED_SIZE \"@gt 10 \" \"phase:3,pass,t:trim\"" + "SecRule ARGS_COMBINED_SIZE \"@gt 10 \" \"id:1,phase:3,pass,t:trim\"" ] }, { @@ -259,7 +259,7 @@ "SecRuleEngine On", "SecDebugLog \/tmp\/modsec_debug.log", "SecDebugLogLevel 9", - "SecRule ARGS_COMBINED_SIZE \"@gt 10 \" \"phase:3,pass,t:trim\"" + "SecRule ARGS_COMBINED_SIZE \"@gt 10 \" \"id:1,phase:3,pass,t:trim\"" ] }, { @@ -302,7 +302,7 @@ "SecRuleEngine On", "SecDebugLog \/tmp\/modsec_debug.log", "SecDebugLogLevel 9", - "SecRule ARGS_COMBINED_SIZE \"@gt 10 \" \"phase:3,pass,t:trim\"" + "SecRule ARGS_COMBINED_SIZE \"@gt 10 \" \"id:1,phase:3,pass,t:trim\"" ] } ] diff --git a/test/test-cases/regression/variable-ARGS_GET.json b/test/test-cases/regression/variable-ARGS_GET.json index a0d2d272..13e5e263 100644 --- a/test/test-cases/regression/variable-ARGS_GET.json +++ b/test/test-cases/regression/variable-ARGS_GET.json @@ -37,7 +37,7 @@ "SecRuleEngine On", "SecDebugLog \/tmp\/modsec_debug.log", "SecDebugLogLevel 9", - "SecRule ARGS_GET \"@contains test \" \"pass,t:trim\"" + "SecRule ARGS_GET \"@contains test \" \"id:1,pass,t:trim\"" ] }, { @@ -78,7 +78,7 @@ "SecRuleEngine On", "SecDebugLog \/tmp\/modsec_debug.log", "SecDebugLogLevel 9", - "SecRule ARGS_GET \"@contains test \" \"pass,t:trim\"" + "SecRule ARGS_GET \"@contains test \" \"id:1,pass,t:trim\"" ] } ] diff --git a/test/test-cases/regression/variable-ARGS_GET_NAMES.json b/test/test-cases/regression/variable-ARGS_GET_NAMES.json index ce8c1b28..74b3150e 100644 --- a/test/test-cases/regression/variable-ARGS_GET_NAMES.json +++ b/test/test-cases/regression/variable-ARGS_GET_NAMES.json @@ -37,7 +37,7 @@ "SecRuleEngine On", "SecDebugLog \/tmp\/modsec_debug.log", "SecDebugLogLevel 9", - "SecRule ARGS_GET_NAMES \"@contains test \" \"pass,t:trim\"" + "SecRule ARGS_GET_NAMES \"@contains test \" \"id:1,pass,t:trim\"" ] }, { @@ -78,7 +78,7 @@ "SecRuleEngine On", "SecDebugLog \/tmp\/modsec_debug.log", "SecDebugLogLevel 9", - "SecRule ARGS_GET_NAMES \"@contains test \" \"pass,t:trim\"" + "SecRule ARGS_GET_NAMES \"@contains test \" \"id:1,pass,t:trim\"" ] } ] diff --git a/test/test-cases/regression/variable-ARGS_NAMES.json b/test/test-cases/regression/variable-ARGS_NAMES.json index 92f7a8c6..1108c6ab 100644 --- a/test/test-cases/regression/variable-ARGS_NAMES.json +++ b/test/test-cases/regression/variable-ARGS_NAMES.json @@ -37,7 +37,7 @@ "SecRuleEngine On", "SecDebugLog \/tmp\/modsec_debug.log", "SecDebugLogLevel 9", - "SecRule ARGS_NAMES \"@contains test \" \"pass,t:trim\"" + "SecRule ARGS_NAMES \"@contains test \" \"id:1,pass,t:trim\"" ] }, { @@ -78,7 +78,7 @@ "SecRuleEngine On", "SecDebugLog \/tmp\/modsec_debug.log", "SecDebugLogLevel 9", - "SecRule ARGS_NAMES \"@contains test \" \"pass,t:trim\"" + "SecRule ARGS_NAMES \"@contains test \" \"id:1,pass,t:trim\"" ] }, { @@ -124,7 +124,7 @@ "SecRuleEngine On", "SecDebugLog \/tmp\/modsec_debug.log", "SecDebugLogLevel 9", - "SecRule ARGS_NAMES \"@contains test \" \"phase:3,pass,t:trim\"" + "SecRule ARGS_NAMES \"@contains test \" \"id:1,phase:3,pass,t:trim\"" ] }, { @@ -170,7 +170,7 @@ "SecRuleEngine On", "SecDebugLog \/tmp\/modsec_debug.log", "SecDebugLogLevel 9", - "SecRule ARGS_NAMES \"@contains test \" \"phase:3,pass,t:trim\"" + "SecRule ARGS_NAMES \"@contains test \" \"id:1,phase:3,pass,t:trim\"" ] } ] diff --git a/test/test-cases/regression/variable-ARGS_POST.json b/test/test-cases/regression/variable-ARGS_POST.json index e1141b98..2bf03fe6 100644 --- a/test/test-cases/regression/variable-ARGS_POST.json +++ b/test/test-cases/regression/variable-ARGS_POST.json @@ -42,7 +42,7 @@ "SecRuleEngine On", "SecDebugLog \/tmp\/modsec_debug.log", "SecDebugLogLevel 9", - "SecRule ARGS_POST \"@contains test \" \"phase:3,pass,t:trim\"" + "SecRule ARGS_POST \"@contains test \" \"id:1,phase:3,pass,t:trim\"" ] }, { @@ -88,7 +88,7 @@ "SecRuleEngine On", "SecDebugLog \/tmp\/modsec_debug.log", "SecDebugLogLevel 9", - "SecRule ARGS_POST \"@contains test \" \"phase:3,pass,t:trim\"" + "SecRule ARGS_POST \"@contains test \" \"id:1,phase:3,pass,t:trim\"" ] } ] diff --git a/test/test-cases/regression/variable-ARGS_POST_NAMES.json b/test/test-cases/regression/variable-ARGS_POST_NAMES.json index 41526b06..725d46a4 100644 --- a/test/test-cases/regression/variable-ARGS_POST_NAMES.json +++ b/test/test-cases/regression/variable-ARGS_POST_NAMES.json @@ -42,7 +42,7 @@ "SecRuleEngine On", "SecDebugLog \/tmp\/modsec_debug.log", "SecDebugLogLevel 9", - "SecRule ARGS_POST_NAMES \"@contains test \" \"phase:3,pass,t:trim\"" + "SecRule ARGS_POST_NAMES \"@contains test \" \"id:1,phase:3,pass,t:trim\"" ] }, { @@ -88,7 +88,7 @@ "SecRuleEngine On", "SecDebugLog \/tmp\/modsec_debug.log", "SecDebugLogLevel 9", - "SecRule ARGS_POST_NAMES \"@contains test \" \"phase:3,pass,t:trim\"" + "SecRule ARGS_POST_NAMES \"@contains test \" \"id:1,phase:3,pass,t:trim\"" ] } ] diff --git a/test/test-cases/regression/variable-AUTH_TYPE.json b/test/test-cases/regression/variable-AUTH_TYPE.json index 71837754..7dab5b98 100644 --- a/test/test-cases/regression/variable-AUTH_TYPE.json +++ b/test/test-cases/regression/variable-AUTH_TYPE.json @@ -43,7 +43,7 @@ "SecRuleEngine On", "SecDebugLog \/tmp\/modsec_debug.log", "SecDebugLogLevel 9", - "SecRule AUTH_TYPE \"@contains test \" \"phase:3,pass,t:trim\"" + "SecRule AUTH_TYPE \"@contains test \" \"id:1,phase:3,pass,t:trim\"" ] }, { @@ -90,7 +90,7 @@ "SecRuleEngine On", "SecDebugLog \/tmp\/modsec_debug.log", "SecDebugLogLevel 9", - "SecRule AUTH_TYPE \"@contains test \" \"phase:3,pass,t:trim\"" + "SecRule AUTH_TYPE \"@contains test \" \"id:1,phase:3,pass,t:trim\"" ] } ] diff --git a/test/test-cases/regression/variable-DURATION.json b/test/test-cases/regression/variable-DURATION.json index d88edebc..df6cc5bc 100644 --- a/test/test-cases/regression/variable-DURATION.json +++ b/test/test-cases/regression/variable-DURATION.json @@ -43,9 +43,9 @@ "SecRuleEngine On", "SecDebugLog \/tmp\/modsec_debug.log", "SecDebugLogLevel 9", - "SecRule DURATION \"@contains test \" \"phase:3,pass,t:trim\"", - "SecRule DURATION \"@contains test \" \"phase:3,pass,t:trim\"", - "SecRule DURATION \"@contains test \" \"phase:3,pass,t:trim\"" + "SecRule DURATION \"@contains test \" \"id:1,phase:3,pass,t:trim\"", + "SecRule DURATION \"@contains test \" \"id:2,phase:3,pass,t:trim\"", + "SecRule DURATION \"@contains test \" \"id:3,phase:3,pass,t:trim\"" ] } ] diff --git a/test/test-cases/regression/variable-ENV.json b/test/test-cases/regression/variable-ENV.json index 7d58acc5..8cfea56d 100644 --- a/test/test-cases/regression/variable-ENV.json +++ b/test/test-cases/regression/variable-ENV.json @@ -42,7 +42,7 @@ "SecRuleEngine On", "SecDebugLog \/tmp\/modsec_debug.log", "SecDebugLogLevel 9", - "SecRule ENV:PATH \"@contains test\" \"phase:3,pass,t:trim\"" + "SecRule ENV:PATH \"@contains test\" \"id:1,phase:3,pass,t:trim\"" ] }, { @@ -88,7 +88,7 @@ "SecRuleEngine On", "SecDebugLog \/tmp\/modsec_debug.log", "SecDebugLogLevel 9", - "SecRule ENV:TERM \"@contains test\" \"phase:3,pass,t:trim\"" + "SecRule ENV:TERM \"@contains test\" \"id:1,phase:3,pass,t:trim\"" ] }, { @@ -134,7 +134,7 @@ "SecRuleEngine On", "SecDebugLog \/tmp\/modsec_debug.log", "SecDebugLogLevel 9", - "SecRule ENV \"@contains test\" \"phase:3,pass,t:trim\"" + "SecRule ENV \"@contains test\" \"id:1,phase:3,pass,t:trim\"" ] } ] diff --git a/test/test-cases/regression/variable-FILES.json b/test/test-cases/regression/variable-FILES.json index 2b2dd9d9..2bd19cc6 100644 --- a/test/test-cases/regression/variable-FILES.json +++ b/test/test-cases/regression/variable-FILES.json @@ -57,7 +57,7 @@ "SecRuleEngine On", "SecDebugLog \/tmp\/modsec_debug.log", "SecDebugLogLevel 9", - "SecRule FILES \"@contains small_text_file.txt\" \"phase:3,pass,t:trim\"" + "SecRule FILES \"@contains small_text_file.txt\" \"id:1,phase:3,pass,t:trim\"" ] } ] \ No newline at end of file diff --git a/test/test-cases/regression/variable-FILES_COMBINED_SIZE.json b/test/test-cases/regression/variable-FILES_COMBINED_SIZE.json index 7932877a..89945a57 100644 --- a/test/test-cases/regression/variable-FILES_COMBINED_SIZE.json +++ b/test/test-cases/regression/variable-FILES_COMBINED_SIZE.json @@ -57,7 +57,7 @@ "SecRuleEngine On", "SecDebugLog \/tmp\/modsec_debug.log", "SecDebugLogLevel 9", - "SecRule FILES_COMBINED_SIZE \"@gt 70.000000\" \"phase:3,pass,t:trim\"" + "SecRule FILES_COMBINED_SIZE \"@gt 70.000000\" \"id:1,phase:3,pass,t:trim\"" ] } ] \ No newline at end of file diff --git a/test/test-cases/regression/variable-FILES_NAMES.json b/test/test-cases/regression/variable-FILES_NAMES.json index d2052e59..b15faa3b 100644 --- a/test/test-cases/regression/variable-FILES_NAMES.json +++ b/test/test-cases/regression/variable-FILES_NAMES.json @@ -57,7 +57,7 @@ "SecRuleEngine On", "SecDebugLog \/tmp\/modsec_debug.log", "SecDebugLogLevel 9", - "SecRule FILES_NAMES \"@contains small_text_file.txt\" \"phase:3,pass,t:trim\"" + "SecRule FILES_NAMES \"@contains small_text_file.txt\" \"id:1,phase:3,pass,t:trim\"" ] } ] \ No newline at end of file diff --git a/test/test-cases/regression/variable-FILES_SIZES.json b/test/test-cases/regression/variable-FILES_SIZES.json index ea8de578..f0221a9c 100644 --- a/test/test-cases/regression/variable-FILES_SIZES.json +++ b/test/test-cases/regression/variable-FILES_SIZES.json @@ -57,7 +57,7 @@ "SecRuleEngine On", "SecDebugLog \/tmp\/modsec_debug.log", "SecDebugLogLevel 9", - "SecRule FILES_SIZES \"@gt 70.000000\" \"phase:3,pass,t:trim\"" + "SecRule FILES_SIZES \"@gt 70.000000\" \"id:1,phase:3,pass,t:trim\"" ] } ] \ No newline at end of file diff --git a/test/test-cases/regression/variable-FILES_TMP_CONTENT.json b/test/test-cases/regression/variable-FILES_TMP_CONTENT.json index 9ad0d3d0..17faa673 100644 --- a/test/test-cases/regression/variable-FILES_TMP_CONTENT.json +++ b/test/test-cases/regression/variable-FILES_TMP_CONTENT.json @@ -57,7 +57,7 @@ "SecRuleEngine On", "SecDebugLog \/tmp\/modsec_debug.log", "SecDebugLogLevel 9", - "SecRule FILES_TMP_CONTENT \"@contains small_text_file.txt\" \"phase:3,pass,t:trim\"" + "SecRule FILES_TMP_CONTENT \"@contains small_text_file.txt\" \"id:1,phase:3,pass,t:trim\"" ] } ] \ No newline at end of file diff --git a/test/test-cases/regression/variable-FULL_REQUEST.json b/test/test-cases/regression/variable-FULL_REQUEST.json index 76e6fc22..57ba1f8c 100644 --- a/test/test-cases/regression/variable-FULL_REQUEST.json +++ b/test/test-cases/regression/variable-FULL_REQUEST.json @@ -57,7 +57,7 @@ "SecRuleEngine On", "SecDebugLog \/tmp\/modsec_debug.log", "SecDebugLogLevel 9", - "SecRule FULL_REQUEST \"@contains small_text_file.txt\" \"phase:3,pass,t:trim\"" + "SecRule FULL_REQUEST \"@contains small_text_file.txt\" \"id:1,phase:3,pass,t:trim\"" ] } ] \ No newline at end of file diff --git a/test/test-cases/regression/variable-FULL_REQUEST_LENGTH.json b/test/test-cases/regression/variable-FULL_REQUEST_LENGTH.json index c23619af..4bc51832 100644 --- a/test/test-cases/regression/variable-FULL_REQUEST_LENGTH.json +++ b/test/test-cases/regression/variable-FULL_REQUEST_LENGTH.json @@ -57,7 +57,7 @@ "SecRuleEngine On", "SecDebugLog \/tmp\/modsec_debug.log", "SecDebugLogLevel 9", - "SecRule FULL_REQUEST_LENGTH \"@contains small_text_file.txt\" \"phase:3,pass,t:trim\"" + "SecRule FULL_REQUEST_LENGTH \"@contains small_text_file.txt\" \"id:1,phase:3,pass,t:trim\"" ] } ] \ No newline at end of file diff --git a/test/test-cases/regression/variable-GEO.json b/test/test-cases/regression/variable-GEO.json index 02d39e78..36d794db 100644 --- a/test/test-cases/regression/variable-GEO.json +++ b/test/test-cases/regression/variable-GEO.json @@ -38,8 +38,8 @@ "SecDebugLog \/tmp\/modsec_debug.log", "SecDebugLogLevel 9", "SecGeoLookupDb test-cases\/data\/geo\/GeoIPCity.dat", - "SecRule REMOTE_ADDR \"@geoLookup\" \"pass,t:trim\"", - "SecRule GEO \"@contains test \" \"pass,t:trim\"" + "SecRule REMOTE_ADDR \"@geoLookup\" \"id:1,pass,t:trim\"", + "SecRule GEO \"@contains test \" \"id:2,pass,t:trim\"" ] }, { @@ -81,8 +81,8 @@ "SecDebugLog \/tmp\/modsec_debug.log", "SecDebugLogLevel 9", "SecGeoLookupDb test-cases\/data\/geo\/GeoIPCity.dat", - "SecRule REMOTE_ADDR \"@geoLookup\" \"pass,t:trim\"", - "SecRule GEO \"@contains test \" \"pass,t:trim\"" + "SecRule REMOTE_ADDR \"@geoLookup\" \"id:1,pass,t:trim\"", + "SecRule GEO \"@contains test \" \"id:2,pass,t:trim\"" ] }, { @@ -124,8 +124,8 @@ "SecDebugLog \/tmp\/modsec_debug.log", "SecDebugLogLevel 9", "SecGeoLookupDb test-cases\/data\/geo\/GeoIPCity.dat", - "SecRule REMOTE_ADDR \"@geoLookup\" \"pass,t:trim\"", - "SecRule GEO \"@contains test \" \"pass,t:trim\"" + "SecRule REMOTE_ADDR \"@geoLookup\" \"id:1,pass,t:trim\"", + "SecRule GEO \"@contains test \" \"id:2,pass,t:trim\"" ] }, { @@ -167,8 +167,8 @@ "SecDebugLog \/tmp\/modsec_debug.log", "SecDebugLogLevel 9", "SecGeoLookupDb test-cases\/data\/geo\/GeoIPCity.dat", - "SecRule REMOTE_ADDR \"@geoLookup\" \"pass,t:trim\"", - "SecRule GEO \"@contains test \" \"pass,t:trim\"" + "SecRule REMOTE_ADDR \"@geoLookup\" \"id:1,pass,t:trim\"", + "SecRule GEO \"@contains test \" \"id:2,pass,t:trim\"" ] }, { @@ -210,8 +210,8 @@ "SecDebugLog \/tmp\/modsec_debug.log", "SecDebugLogLevel 9", "SecGeoLookupDb test-cases\/data\/geo\/GeoIPCity.dat", - "SecRule REMOTE_ADDR \"@geoLookup\" \"pass,t:trim\"", - "SecRule GEO \"@contains test \" \"pass,t:trim\"" + "SecRule REMOTE_ADDR \"@geoLookup\" \"id:1,pass,t:trim\"", + "SecRule GEO \"@contains test \" \"id:2,pass,t:trim\"" ] }, { @@ -253,8 +253,8 @@ "SecDebugLog \/tmp\/modsec_debug.log", "SecDebugLogLevel 9", "SecGeoLookupDb test-cases\/data\/geo\/GeoIPCity.dat", - "SecRule REMOTE_ADDR \"@geoLookup\" \"pass,t:trim\"", - "SecRule GEO \"@contains test \" \"pass,t:trim\"" + "SecRule REMOTE_ADDR \"@geoLookup\" \"id:1,pass,t:trim\"", + "SecRule GEO \"@contains test \" \"id:2,pass,t:trim\"" ] }, { @@ -296,8 +296,8 @@ "SecDebugLog \/tmp\/modsec_debug.log", "SecDebugLogLevel 9", "SecGeoLookupDb test-cases\/data\/geo\/GeoIPCity.dat", - "SecRule REMOTE_ADDR \"@geoLookup\" \"pass,t:trim\"", - "SecRule GEO \"@contains test \" \"pass,t:trim\"" + "SecRule REMOTE_ADDR \"@geoLookup\" \"id:1,pass,t:trim\"", + "SecRule GEO \"@contains test \" \"id:2,pass,t:trim\"" ] }, { @@ -339,8 +339,8 @@ "SecDebugLog \/tmp\/modsec_debug.log", "SecDebugLogLevel 9", "SecGeoLookupDb test-cases\/data\/geo\/GeoIPCity.dat", - "SecRule REMOTE_ADDR \"@geoLookup\" \"pass,t:trim\"", - "SecRule GEO \"@contains test \" \"pass,t:trim\"" + "SecRule REMOTE_ADDR \"@geoLookup\" \"id:1,pass,t:trim\"", + "SecRule GEO \"@contains test \" \"id:2,pass,t:trim\"" ] }, { @@ -382,8 +382,8 @@ "SecDebugLog \/tmp\/modsec_debug.log", "SecDebugLogLevel 9", "SecGeoLookupDb test-cases\/data\/geo\/GeoIPCity.dat", - "SecRule REMOTE_ADDR \"@geoLookup\" \"pass,t:trim\"", - "SecRule GEO \"@contains test \" \"pass,t:trim\"" + "SecRule REMOTE_ADDR \"@geoLookup\" \"id:1,pass,t:trim\"", + "SecRule GEO \"@contains test \" \"id:2,pass,t:trim\"" ] }, { @@ -425,8 +425,8 @@ "SecDebugLog \/tmp\/modsec_debug.log", "SecDebugLogLevel 9", "SecGeoLookupDb test-cases\/data\/geo\/GeoIPCity.dat", - "SecRule REMOTE_ADDR \"@geoLookup\" \"pass,t:trim\"", - "SecRule GEO \"@contains test \" \"pass,t:trim\"" + "SecRule REMOTE_ADDR \"@geoLookup\" \"id:1,pass,t:trim\"", + "SecRule GEO \"@contains test \" \"id:2,pass,t:trim\"" ] }, { @@ -468,8 +468,8 @@ "SecDebugLog \/tmp\/modsec_debug.log", "SecDebugLogLevel 9", "SecGeoLookupDb test-cases\/data\/geo\/GeoIPCity.dat", - "SecRule REMOTE_ADDR \"@geoLookup\" \"pass,t:trim\"", - "SecRule GEO \"@contains test \" \"pass,t:trim\"" + "SecRule REMOTE_ADDR \"@geoLookup\" \"id:1,pass,t:trim\"", + "SecRule GEO \"@contains test \" \"id:2,pass,t:trim\"" ] } ] diff --git a/test/test-cases/regression/variable-HIGHEST_SEVERITY.json b/test/test-cases/regression/variable-HIGHEST_SEVERITY.json index a0583b12..091fc2a0 100644 --- a/test/test-cases/regression/variable-HIGHEST_SEVERITY.json +++ b/test/test-cases/regression/variable-HIGHEST_SEVERITY.json @@ -37,8 +37,8 @@ "SecRuleEngine On", "SecDebugLog \/tmp\/modsec_debug.log", "SecDebugLogLevel 9", - "SecRule REMOTE_ADDR \"@contains 200.249\" \"pass,t:trim,severity:0\"", - "SecRule HIGHEST_SEVERITY \"@lt 10\" \"pass,t:trim\"" + "SecRule REMOTE_ADDR \"@contains 200.249\" \"id:1,pass,t:trim,severity:0\"", + "SecRule HIGHEST_SEVERITY \"@lt 10\" \"id:2,pass,t:trim\"" ] }, { @@ -79,8 +79,8 @@ "SecRuleEngine On", "SecDebugLog \/tmp\/modsec_debug.log", "SecDebugLogLevel 9", - "SecRule REMOTE_ADDR \"@contains 200.249\" \"pass,t:trim,severity:EMERGENCY\"", - "SecRule HIGHEST_SEVERITY \"@lt 10\" \"pass,t:trim\"" + "SecRule REMOTE_ADDR \"@contains 200.249\" \"id:1,pass,t:trim,severity:EMERGENCY\"", + "SecRule HIGHEST_SEVERITY \"@lt 10\" \"id:2,pass,t:trim\"" ] } ] diff --git a/test/test-cases/regression/variable-INBOUND_DATA_ERROR.json b/test/test-cases/regression/variable-INBOUND_DATA_ERROR.json index 4d676f42..2231bd7a 100644 --- a/test/test-cases/regression/variable-INBOUND_DATA_ERROR.json +++ b/test/test-cases/regression/variable-INBOUND_DATA_ERROR.json @@ -37,7 +37,7 @@ "SecRuleEngine On", "SecDebugLog \/tmp\/modsec_debug.log", "SecDebugLogLevel 9", - "SecRule INBOUND_DATA_ERROR \"@eq 1\" \"phase:3,pass,t:trim\"" + "SecRule INBOUND_DATA_ERROR \"@eq 1\" \"id:1,phase:3,pass,t:trim\"" ] }, { @@ -99,7 +99,7 @@ "SecDebugLog \/tmp\/modsec_debug.log", "SecRequestBodyLimit 2", "SecDebugLogLevel 9", - "SecRule INBOUND_DATA_ERROR \"@eq 1\" \"phase:3,pass,t:trim\"" + "SecRule INBOUND_DATA_ERROR \"@eq 1\" \"id:1,phase:3,pass,t:trim\"" ] } ] diff --git a/test/test-cases/regression/variable-MODSEC_BUILD.json b/test/test-cases/regression/variable-MODSEC_BUILD.json index 2a49b6a2..4473ba03 100644 --- a/test/test-cases/regression/variable-MODSEC_BUILD.json +++ b/test/test-cases/regression/variable-MODSEC_BUILD.json @@ -42,7 +42,7 @@ "SecRuleEngine On", "SecDebugLog \/tmp\/modsec_debug.log", "SecDebugLogLevel 9", - "SecRule MODSEC_BUILD \"@contains test\" \"phase:3,pass,t:trim\"" + "SecRule MODSEC_BUILD \"@contains test\" \"id:1,phase:3,pass,t:trim\"" ] } ] diff --git a/test/test-cases/regression/variable-MULTIPART_CRLF_LF_LINES.json b/test/test-cases/regression/variable-MULTIPART_CRLF_LF_LINES.json index 69566e2c..681f5d68 100644 --- a/test/test-cases/regression/variable-MULTIPART_CRLF_LF_LINES.json +++ b/test/test-cases/regression/variable-MULTIPART_CRLF_LF_LINES.json @@ -57,7 +57,7 @@ "SecRuleEngine On", "SecDebugLog \/tmp\/modsec_debug.log", "SecDebugLogLevel 9", - "SecRule MULTIPART_CRLF_LF_LINES \"@contains 0\" \"phase:3,pass,t:trim\"" + "SecRule MULTIPART_CRLF_LF_LINES \"@contains 0\" \"id:1,phase:3,pass,t:trim\"" ] }, { @@ -118,7 +118,7 @@ "SecRuleEngine On", "SecDebugLog \/tmp\/modsec_debug.log", "SecDebugLogLevel 9", - "SecRule MULTIPART_CRLF_LF_LINES \"@contains 0\" \"phase:3,pass,t:trim\"" + "SecRule MULTIPART_CRLF_LF_LINES \"@contains 0\" \"id:1,phase:3,pass,t:trim\"" ] } ] diff --git a/test/test-cases/regression/variable-MULTIPART_FILENAME.json b/test/test-cases/regression/variable-MULTIPART_FILENAME.json index 7fc38f23..2597284d 100644 --- a/test/test-cases/regression/variable-MULTIPART_FILENAME.json +++ b/test/test-cases/regression/variable-MULTIPART_FILENAME.json @@ -57,7 +57,7 @@ "SecRuleEngine On", "SecDebugLog \/tmp\/modsec_debug.log", "SecDebugLogLevel 9", - "SecRule MULTIPART_FILENAME \"@contains 0\" \"phase:3,pass,t:trim\"" + "SecRule MULTIPART_FILENAME \"@contains 0\" \"id:1,phase:3,pass,t:trim\"" ] }, { @@ -118,7 +118,7 @@ "SecRuleEngine On", "SecDebugLog \/tmp\/modsec_debug.log", "SecDebugLogLevel 9", - "SecRule MULTIPART_FILENAME \"@contains 0\" \"phase:3,pass,t:trim\"" + "SecRule MULTIPART_FILENAME \"@contains 0\" \"id:1,phase:3,pass,t:trim\"" ] } ] diff --git a/test/test-cases/regression/variable-MULTIPART_NAME.json b/test/test-cases/regression/variable-MULTIPART_NAME.json index a01dab60..7d41de57 100644 --- a/test/test-cases/regression/variable-MULTIPART_NAME.json +++ b/test/test-cases/regression/variable-MULTIPART_NAME.json @@ -57,7 +57,7 @@ "SecRuleEngine On", "SecDebugLog \/tmp\/modsec_debug.log", "SecDebugLogLevel 9", - "SecRule MULTIPART_NAME \"@contains 0\" \"phase:3,pass,t:trim\"" + "SecRule MULTIPART_NAME \"@contains 0\" \"id:1,phase:3,pass,t:trim\"" ] }, { @@ -118,7 +118,7 @@ "SecRuleEngine On", "SecDebugLog \/tmp\/modsec_debug.log", "SecDebugLogLevel 9", - "SecRule MULTIPART_NAME \"@contains 0\" \"phase:3,pass,t:trim\"" + "SecRule MULTIPART_NAME \"@contains 0\" \"id:1,phase:3,pass,t:trim\"" ] } ] diff --git a/test/test-cases/regression/variable-MULTIPART_STRICT_ERROR.json b/test/test-cases/regression/variable-MULTIPART_STRICT_ERROR.json index f434106c..ed7af8ad 100644 --- a/test/test-cases/regression/variable-MULTIPART_STRICT_ERROR.json +++ b/test/test-cases/regression/variable-MULTIPART_STRICT_ERROR.json @@ -57,7 +57,7 @@ "SecRuleEngine On", "SecDebugLog \/tmp\/modsec_debug.log", "SecDebugLogLevel 9", - "SecRule MULTIPART_STRICT_ERROR \"@contains 0\" \"phase:3,pass,t:trim\"" + "SecRule MULTIPART_STRICT_ERROR \"@contains 0\" \"id:1,phase:3,pass,t:trim\"" ] }, { @@ -118,7 +118,7 @@ "SecRuleEngine On", "SecDebugLog \/tmp\/modsec_debug.log", "SecDebugLogLevel 9", - "SecRule MULTIPART_STRICT_ERROR \"@contains 0\" \"phase:3,pass,t:trim\"" + "SecRule MULTIPART_STRICT_ERROR \"@contains 0\" \"id:1,phase:3,pass,t:trim\"" ] }, { @@ -179,7 +179,7 @@ "SecRuleEngine On", "SecDebugLog \/tmp\/modsec_debug.log", "SecDebugLogLevel 9", - "SecRule MULTIPART_STRICT_ERROR \"@contains 0\" \"phase:3,pass,t:trim\"" + "SecRule MULTIPART_STRICT_ERROR \"@contains 0\" \"id:1,phase:3,pass,t:trim\"" ] }, { @@ -240,7 +240,7 @@ "SecRuleEngine On", "SecDebugLog \/tmp\/modsec_debug.log", "SecDebugLogLevel 9", - "SecRule MULTIPART_STRICT_ERROR \"@contains 0\" \"phase:3,pass,t:trim\"" + "SecRule MULTIPART_STRICT_ERROR \"@contains 0\" \"id:1,phase:3,pass,t:trim\"" ] }, { @@ -301,7 +301,7 @@ "SecRuleEngine On", "SecDebugLog \/tmp\/modsec_debug.log", "SecDebugLogLevel 9", - "SecRule MULTIPART_STRICT_ERROR \"@contains 0\" \"phase:3,pass,t:trim\"" + "SecRule MULTIPART_STRICT_ERROR \"@contains 0\" \"id:1,phase:3,pass,t:trim\"" ] }, { @@ -362,7 +362,7 @@ "SecRuleEngine On", "SecDebugLog \/tmp\/modsec_debug.log", "SecDebugLogLevel 9", - "SecRule MULTIPART_STRICT_ERROR \"@contains 0\" \"phase:3,pass,t:trim\"" + "SecRule MULTIPART_STRICT_ERROR \"@contains 0\" \"id:1,phase:3,pass,t:trim\"" ] } ] diff --git a/test/test-cases/regression/variable-MULTIPART_UNMATCHED_BOUNDARY.json b/test/test-cases/regression/variable-MULTIPART_UNMATCHED_BOUNDARY.json index 0bcb5d9c..0a4f4a4c 100644 --- a/test/test-cases/regression/variable-MULTIPART_UNMATCHED_BOUNDARY.json +++ b/test/test-cases/regression/variable-MULTIPART_UNMATCHED_BOUNDARY.json @@ -57,7 +57,7 @@ "SecRuleEngine On", "SecDebugLog \/tmp\/modsec_debug.log", "SecDebugLogLevel 9", - "SecRule MULTIPART_UNMATCHED_BOUNDARY \"@contains small_text_file.txt\" \"phase:3,pass,t:trim\"" + "SecRule MULTIPART_UNMATCHED_BOUNDARY \"@contains small_text_file.txt\" \"id:1,phase:3,pass,t:trim\"" ] } ] \ No newline at end of file diff --git a/test/test-cases/regression/variable-OUTBOUND_DATA_ERROR.json b/test/test-cases/regression/variable-OUTBOUND_DATA_ERROR.json index d0cdd925..7d8098e3 100644 --- a/test/test-cases/regression/variable-OUTBOUND_DATA_ERROR.json +++ b/test/test-cases/regression/variable-OUTBOUND_DATA_ERROR.json @@ -37,7 +37,7 @@ "SecRuleEngine On", "SecDebugLog \/tmp\/modsec_debug.log", "SecDebugLogLevel 9", - "SecRule OUTBOUND_DATA_ERROR \"@eq 1\" \"phase:4,pass,t:trim\"" + "SecRule OUTBOUND_DATA_ERROR \"@eq 1\" \"id:1,phase:4,pass,t:trim\"" ] }, { @@ -113,7 +113,7 @@ "SecDebugLog \/tmp\/modsec_debug.log", "SecResponseBodyLimit 2", "SecDebugLogLevel 9", - "SecRule OUTBOUND_DATA_ERROR \"@eq 1\" \"phase:4,pass,t:trim\"" + "SecRule OUTBOUND_DATA_ERROR \"@eq 1\" \"id:1,phase:4,pass,t:trim\"" ] } ] diff --git a/test/test-cases/regression/variable-PATH_INFO.json b/test/test-cases/regression/variable-PATH_INFO.json index 7c08fad5..904c1c49 100644 --- a/test/test-cases/regression/variable-PATH_INFO.json +++ b/test/test-cases/regression/variable-PATH_INFO.json @@ -42,7 +42,7 @@ "SecRuleEngine On", "SecDebugLog \/tmp\/modsec_debug.log", "SecDebugLogLevel 9", - "SecRule PATH_INFO \"@contains test \" \"phase:3,pass,t:trim\"" + "SecRule PATH_INFO \"@contains test \" \"id:1,phase:3,pass,t:trim\"" ] }, { @@ -88,7 +88,7 @@ "SecRuleEngine On", "SecDebugLog \/tmp\/modsec_debug.log", "SecDebugLogLevel 9", - "SecRule PATH_INFO \"@contains test \" \"phase:3,pass,t:trim\"" + "SecRule PATH_INFO \"@contains test \" \"id:1,phase:3,pass,t:trim\"" ] }, { @@ -134,7 +134,7 @@ "SecRuleEngine On", "SecDebugLog \/tmp\/modsec_debug.log", "SecDebugLogLevel 9", - "SecRule PATH_INFO \"@contains test \" \"phase:3,pass,t:trim\"" + "SecRule PATH_INFO \"@contains test \" \"id:1,phase:3,pass,t:trim\"" ] } ] \ No newline at end of file diff --git a/test/test-cases/regression/variable-QUERY_STRING.json b/test/test-cases/regression/variable-QUERY_STRING.json index 80cb0ec7..5a462241 100644 --- a/test/test-cases/regression/variable-QUERY_STRING.json +++ b/test/test-cases/regression/variable-QUERY_STRING.json @@ -39,7 +39,7 @@ "SecRuleEngine On", "SecDebugLog \/tmp\/modsec_debug.log", "SecDebugLogLevel 9", - "SecRule QUERY_STRING \"@contains test \" \"phase:3,pass,t:trim\"" + "SecRule QUERY_STRING \"@contains test \" \"id:1,phase:3,pass,t:trim\"" ] } ] \ No newline at end of file diff --git a/test/test-cases/regression/variable-REMOTE_ADDR.json b/test/test-cases/regression/variable-REMOTE_ADDR.json index d7767d45..f9db48e3 100644 --- a/test/test-cases/regression/variable-REMOTE_ADDR.json +++ b/test/test-cases/regression/variable-REMOTE_ADDR.json @@ -39,7 +39,7 @@ "SecRuleEngine On", "SecDebugLog \/tmp\/modsec_debug.log", "SecDebugLogLevel 9", - "SecRule REMOTE_ADDR \"@contains test \" \"phase:3,pass,t:trim\"" + "SecRule REMOTE_ADDR \"@contains test \" \"id:1,phase:3,pass,t:trim\"" ] }, { @@ -82,7 +82,7 @@ "SecRuleEngine On", "SecDebugLog \/tmp\/modsec_debug.log", "SecDebugLogLevel 9", - "SecRule REMOTE_ADDR \"@contains test \" \"phase:3,pass,t:trim\"" + "SecRule REMOTE_ADDR \"@contains test \" \"id:1,phase:3,pass,t:trim\"" ] } ] \ No newline at end of file diff --git a/test/test-cases/regression/variable-REMOTE_HOST.json b/test/test-cases/regression/variable-REMOTE_HOST.json index 7f168886..e967556a 100644 --- a/test/test-cases/regression/variable-REMOTE_HOST.json +++ b/test/test-cases/regression/variable-REMOTE_HOST.json @@ -39,7 +39,7 @@ "SecRuleEngine On", "SecDebugLog \/tmp\/modsec_debug.log", "SecDebugLogLevel 9", - "SecRule REMOTE_HOST \"@contains test \" \"phase:3,pass,t:trim\"" + "SecRule REMOTE_HOST \"@contains test \" \"id:1,phase:3,pass,t:trim\"" ] }, { @@ -82,7 +82,7 @@ "SecRuleEngine On", "SecDebugLog \/tmp\/modsec_debug.log", "SecDebugLogLevel 9", - "SecRule REMOTE_HOST \"@contains test \" \"phase:3,pass,t:trim\"" + "SecRule REMOTE_HOST \"@contains test \" \"id:1,phase:3,pass,t:trim\"" ] } ] \ No newline at end of file diff --git a/test/test-cases/regression/variable-REMOTE_PORT.json b/test/test-cases/regression/variable-REMOTE_PORT.json index e8e0d9f3..212ccc45 100644 --- a/test/test-cases/regression/variable-REMOTE_PORT.json +++ b/test/test-cases/regression/variable-REMOTE_PORT.json @@ -39,7 +39,7 @@ "SecRuleEngine On", "SecDebugLog \/tmp\/modsec_debug.log", "SecDebugLogLevel 9", - "SecRule REMOTE_PORT \"@contains test \" \"phase:3,pass,t:trim\"" + "SecRule REMOTE_PORT \"@contains test \" \"id:1,phase:3,pass,t:trim\"" ] }, { @@ -82,7 +82,7 @@ "SecRuleEngine On", "SecDebugLog \/tmp\/modsec_debug.log", "SecDebugLogLevel 9", - "SecRule REMOTE_PORT \"@contains test \" \"phase:3,pass,t:trim\"" + "SecRule REMOTE_PORT \"@contains test \" \"id:1,phase:3,pass,t:trim\"" ] } ] \ No newline at end of file diff --git a/test/test-cases/regression/variable-REQUEST_BASENAME.json b/test/test-cases/regression/variable-REQUEST_BASENAME.json index bf56d16d..b248ad05 100644 --- a/test/test-cases/regression/variable-REQUEST_BASENAME.json +++ b/test/test-cases/regression/variable-REQUEST_BASENAME.json @@ -39,7 +39,7 @@ "SecRuleEngine On", "SecDebugLog \/tmp\/modsec_debug.log", "SecDebugLogLevel 9", - "SecRule REQUEST_BASENAME \"@contains test \" \"phase:3,pass,t:trim\"" + "SecRule REQUEST_BASENAME \"@contains test \" \"id:1,phase:3,pass,t:trim\"" ] } ] \ No newline at end of file diff --git a/test/test-cases/regression/variable-REQUEST_BODY.json b/test/test-cases/regression/variable-REQUEST_BODY.json index 0af524c0..82e3ec42 100644 --- a/test/test-cases/regression/variable-REQUEST_BODY.json +++ b/test/test-cases/regression/variable-REQUEST_BODY.json @@ -57,7 +57,7 @@ "SecRuleEngine On", "SecDebugLog \/tmp\/modsec_debug.log", "SecDebugLogLevel 9", - "SecRule REQUEST_BODY \"@contains small_text_file.txt\" \"phase:3,pass,t:trim\"" + "SecRule REQUEST_BODY \"@contains small_text_file.txt\" \"id:1,phase:3,pass,t:trim\"" ] } ] \ No newline at end of file diff --git a/test/test-cases/regression/variable-REQUEST_BODY_LENGTH.json b/test/test-cases/regression/variable-REQUEST_BODY_LENGTH.json index 7e0f51c8..538ed151 100644 --- a/test/test-cases/regression/variable-REQUEST_BODY_LENGTH.json +++ b/test/test-cases/regression/variable-REQUEST_BODY_LENGTH.json @@ -57,7 +57,7 @@ "SecRuleEngine On", "SecDebugLog \/tmp\/modsec_debug.log", "SecDebugLogLevel 9", - "SecRule REQUEST_BODY_LENGTH \"@contains small_text_file.txt\" \"phase:3,pass,t:trim\"" + "SecRule REQUEST_BODY_LENGTH \"@contains small_text_file.txt\" \"id:1,phase:3,pass,t:trim\"" ] } ] \ No newline at end of file diff --git a/test/test-cases/regression/variable-REQUEST_COOKIES.json b/test/test-cases/regression/variable-REQUEST_COOKIES.json index aa769265..23a88140 100644 --- a/test/test-cases/regression/variable-REQUEST_COOKIES.json +++ b/test/test-cases/regression/variable-REQUEST_COOKIES.json @@ -38,7 +38,7 @@ "SecRuleEngine On", "SecDebugLog \/tmp\/modsec_debug.log", "SecDebugLogLevel 9", - "SecRule REQUEST_COOKIES \"@contains test \" \"pass,t:trim\"" + "SecRule REQUEST_COOKIES \"@contains test \" \"id:1,pass,t:trim\"" ] }, { @@ -80,7 +80,7 @@ "SecRuleEngine On", "SecDebugLog \/tmp\/modsec_debug.log", "SecDebugLogLevel 9", - "SecRule REQUEST_COOKIES \"@contains test \" \"pass,t:trim\"" + "SecRule REQUEST_COOKIES \"@contains test \" \"id:1,pass,t:trim\"" ] }, { @@ -122,7 +122,7 @@ "SecRuleEngine On", "SecDebugLog \/tmp\/modsec_debug.log", "SecDebugLogLevel 9", - "SecRule REQUEST_COOKIES \"@contains test \" \"pass,t:trim\"" + "SecRule REQUEST_COOKIES \"@contains test \" \"id:1,pass,t:trim\"" ] } ] diff --git a/test/test-cases/regression/variable-REQUEST_COOKIES_NAMES.json b/test/test-cases/regression/variable-REQUEST_COOKIES_NAMES.json index 9b7fd65f..d4d71eb4 100644 --- a/test/test-cases/regression/variable-REQUEST_COOKIES_NAMES.json +++ b/test/test-cases/regression/variable-REQUEST_COOKIES_NAMES.json @@ -38,7 +38,7 @@ "SecRuleEngine On", "SecDebugLog \/tmp\/modsec_debug.log", "SecDebugLogLevel 9", - "SecRule REQUEST_COOKIES_NAMES \"@contains test \" \"pass,t:trim\"" + "SecRule REQUEST_COOKIES_NAMES \"@contains test \" \"id:1,pass,t:trim\"" ] }, { @@ -80,7 +80,7 @@ "SecRuleEngine On", "SecDebugLog \/tmp\/modsec_debug.log", "SecDebugLogLevel 9", - "SecRule REQUEST_COOKIES_NAMES \"@contains test \" \"pass,t:trim\"" + "SecRule REQUEST_COOKIES_NAMES \"@contains test \" \"id:1,pass,t:trim\"" ] }, { @@ -122,7 +122,7 @@ "SecRuleEngine On", "SecDebugLog \/tmp\/modsec_debug.log", "SecDebugLogLevel 9", - "SecRule REQUEST_COOKIES_NAMES \"@contains test \" \"pass,t:trim\"" + "SecRule REQUEST_COOKIES_NAMES \"@contains test \" \"id:1,pass,t:trim\"" ] } ] diff --git a/test/test-cases/regression/variable-REQUEST_FILENAME.json b/test/test-cases/regression/variable-REQUEST_FILENAME.json index 6644b381..85aa1134 100644 --- a/test/test-cases/regression/variable-REQUEST_FILENAME.json +++ b/test/test-cases/regression/variable-REQUEST_FILENAME.json @@ -39,7 +39,7 @@ "SecRuleEngine On", "SecDebugLog \/tmp\/modsec_debug.log", "SecDebugLogLevel 9", - "SecRule REQUEST_FILENAME \"@contains test \" \"phase:3,pass,t:trim\"" + "SecRule REQUEST_FILENAME \"@contains test \" \"id:1,phase:3,pass,t:trim\"" ] } ] \ No newline at end of file diff --git a/test/test-cases/regression/variable-REQUEST_HEADERS.json b/test/test-cases/regression/variable-REQUEST_HEADERS.json index 6eb004f0..4ebf0fa8 100644 --- a/test/test-cases/regression/variable-REQUEST_HEADERS.json +++ b/test/test-cases/regression/variable-REQUEST_HEADERS.json @@ -57,7 +57,7 @@ "SecRuleEngine On", "SecDebugLog \/tmp\/modsec_debug.log", "SecDebugLogLevel 9", - "SecRule REQUEST_HEADERS \"@contains small_text_file.txt\" \"phase:3,pass,t:trim\"" + "SecRule REQUEST_HEADERS \"@contains small_text_file.txt\" \"id:1,phase:3,pass,t:trim\"" ] } ] \ No newline at end of file diff --git a/test/test-cases/regression/variable-REQUEST_HEADERS_NAMES.json b/test/test-cases/regression/variable-REQUEST_HEADERS_NAMES.json index 72e95d35..09621241 100644 --- a/test/test-cases/regression/variable-REQUEST_HEADERS_NAMES.json +++ b/test/test-cases/regression/variable-REQUEST_HEADERS_NAMES.json @@ -57,7 +57,7 @@ "SecRuleEngine On", "SecDebugLog \/tmp\/modsec_debug.log", "SecDebugLogLevel 9", - "SecRule REQUEST_HEADERS_NAMES \"@contains small_text_file.txt\" \"phase:3,pass,t:trim\"" + "SecRule REQUEST_HEADERS_NAMES \"@contains small_text_file.txt\" \"id:1,phase:3,pass,t:trim\"" ] } ] \ No newline at end of file diff --git a/test/test-cases/regression/variable-REQUEST_LINE.json b/test/test-cases/regression/variable-REQUEST_LINE.json index 678f7c58..28c1611d 100644 --- a/test/test-cases/regression/variable-REQUEST_LINE.json +++ b/test/test-cases/regression/variable-REQUEST_LINE.json @@ -38,7 +38,7 @@ "SecRuleEngine On", "SecDebugLog \/tmp\/modsec_debug.log", "SecDebugLogLevel 9", - "SecRule REQUEST_LINE \"@contains test \" \"pass,t:trim\"" + "SecRule REQUEST_LINE \"@contains test \" \"id:1,pass,t:trim\"" ] } ] diff --git a/test/test-cases/regression/variable-REQUEST_METHOD.json b/test/test-cases/regression/variable-REQUEST_METHOD.json index 8cd40436..67bd46f2 100644 --- a/test/test-cases/regression/variable-REQUEST_METHOD.json +++ b/test/test-cases/regression/variable-REQUEST_METHOD.json @@ -38,7 +38,7 @@ "SecRuleEngine On", "SecDebugLog \/tmp\/modsec_debug.log", "SecDebugLogLevel 9", - "SecRule REQUEST_METHOD \"@contains test \" \"pass,t:trim\"" + "SecRule REQUEST_METHOD \"@contains test \" \"id:1,pass,t:trim\"" ] } ] diff --git a/test/test-cases/regression/variable-REQUEST_PROTOCOL.json b/test/test-cases/regression/variable-REQUEST_PROTOCOL.json index 2acc034e..0d854d1e 100644 --- a/test/test-cases/regression/variable-REQUEST_PROTOCOL.json +++ b/test/test-cases/regression/variable-REQUEST_PROTOCOL.json @@ -38,7 +38,7 @@ "SecRuleEngine On", "SecDebugLog \/tmp\/modsec_debug.log", "SecDebugLogLevel 9", - "SecRule REQUEST_PROTOCOL \"@contains test \" \"pass,t:trim\"" + "SecRule REQUEST_PROTOCOL \"@contains test \" \"id:1,pass,t:trim\"" ] } ] diff --git a/test/test-cases/regression/variable-REQUEST_URI.json b/test/test-cases/regression/variable-REQUEST_URI.json index 21ae4ae4..d360d7b8 100644 --- a/test/test-cases/regression/variable-REQUEST_URI.json +++ b/test/test-cases/regression/variable-REQUEST_URI.json @@ -38,7 +38,7 @@ "SecRuleEngine On", "SecDebugLog \/tmp\/modsec_debug.log", "SecDebugLogLevel 9", - "SecRule REQUEST_URI \"@contains test \" \"pass,t:trim\"" + "SecRule REQUEST_URI \"@contains test \" \"id:1,pass,t:trim\"" ] } ] diff --git a/test/test-cases/regression/variable-REQUEST_URI_RAW.json b/test/test-cases/regression/variable-REQUEST_URI_RAW.json index ab5a7677..447be89d 100644 --- a/test/test-cases/regression/variable-REQUEST_URI_RAW.json +++ b/test/test-cases/regression/variable-REQUEST_URI_RAW.json @@ -38,7 +38,7 @@ "SecRuleEngine On", "SecDebugLog \/tmp\/modsec_debug.log", "SecDebugLogLevel 9", - "SecRule REQUEST_URI_RAW \"@contains test \" \"pass,t:trim\"" + "SecRule REQUEST_URI_RAW \"@contains test \" \"id:1,pass,t:trim\"" ] } ] diff --git a/test/test-cases/regression/variable-RESPONSE_BODY.json b/test/test-cases/regression/variable-RESPONSE_BODY.json index 6a6fe2a6..2f9d73d3 100644 --- a/test/test-cases/regression/variable-RESPONSE_BODY.json +++ b/test/test-cases/regression/variable-RESPONSE_BODY.json @@ -38,7 +38,7 @@ "SecRuleEngine On", "SecDebugLog \/tmp\/modsec_debug.log", "SecDebugLogLevel 9", - "SecRule RESPONSE_BODY \"@contains test \" \"phase:4,pass,t:trim\"" + "SecRule RESPONSE_BODY \"@contains test \" \"id:1,phase:4,pass,t:trim\"" ] } ] diff --git a/test/test-cases/regression/variable-RESPONSE_CONTENT_LENGTH.json b/test/test-cases/regression/variable-RESPONSE_CONTENT_LENGTH.json index fde10a27..ea008335 100644 --- a/test/test-cases/regression/variable-RESPONSE_CONTENT_LENGTH.json +++ b/test/test-cases/regression/variable-RESPONSE_CONTENT_LENGTH.json @@ -38,7 +38,7 @@ "SecRuleEngine On", "SecDebugLog \/tmp\/modsec_debug.log", "SecDebugLogLevel 9", - "SecRule RESPONSE_CONTENT_LENGTH \"@contains test \" \"phase:4,pass,t:trim\"" + "SecRule RESPONSE_CONTENT_LENGTH \"@contains test \" \"id:1,phase:4,pass,t:trim\"" ] } ] diff --git a/test/test-cases/regression/variable-RESPONSE_CONTENT_TYPE.json b/test/test-cases/regression/variable-RESPONSE_CONTENT_TYPE.json index 109086fc..c3a401e6 100644 --- a/test/test-cases/regression/variable-RESPONSE_CONTENT_TYPE.json +++ b/test/test-cases/regression/variable-RESPONSE_CONTENT_TYPE.json @@ -38,7 +38,7 @@ "SecRuleEngine On", "SecDebugLog \/tmp\/modsec_debug.log", "SecDebugLogLevel 9", - "SecRule RESPONSE_CONTENT_TYPE \"@contains test \" \"phase:3,pass,t:trim\"" + "SecRule RESPONSE_CONTENT_TYPE \"@contains test \" \"id:1,phase:3,pass,t:trim\"" ] } ] diff --git a/test/test-cases/regression/variable-RESPONSE_HEADERS.json b/test/test-cases/regression/variable-RESPONSE_HEADERS.json index 891c51d4..4053616f 100644 --- a/test/test-cases/regression/variable-RESPONSE_HEADERS.json +++ b/test/test-cases/regression/variable-RESPONSE_HEADERS.json @@ -57,7 +57,7 @@ "SecRuleEngine On", "SecDebugLog \/tmp\/modsec_debug.log", "SecDebugLogLevel 9", - "SecRule RESPONSE_HEADERS \"@contains small_text_file.txt\" \"phase:3,pass,t:trim\"" + "SecRule RESPONSE_HEADERS \"@contains small_text_file.txt\" \"id:1,phase:3,pass,t:trim\"" ] } ] \ No newline at end of file diff --git a/test/test-cases/regression/variable-RESPONSE_HEADERS_NAMES.json b/test/test-cases/regression/variable-RESPONSE_HEADERS_NAMES.json index 6e3d1503..a9d7635a 100644 --- a/test/test-cases/regression/variable-RESPONSE_HEADERS_NAMES.json +++ b/test/test-cases/regression/variable-RESPONSE_HEADERS_NAMES.json @@ -57,7 +57,7 @@ "SecRuleEngine On", "SecDebugLog \/tmp\/modsec_debug.log", "SecDebugLogLevel 9", - "SecRule RESPONSE_HEADERS_NAMES \"@contains small_text_file.txt\" \"phase:3,pass,t:trim\"" + "SecRule RESPONSE_HEADERS_NAMES \"@contains small_text_file.txt\" \"id:1,phase:3,pass,t:trim\"" ] } ] \ No newline at end of file diff --git a/test/test-cases/regression/variable-SERVER_ADDR.json b/test/test-cases/regression/variable-SERVER_ADDR.json index 9722d8ae..f1e9c208 100644 --- a/test/test-cases/regression/variable-SERVER_ADDR.json +++ b/test/test-cases/regression/variable-SERVER_ADDR.json @@ -39,7 +39,7 @@ "SecRuleEngine On", "SecDebugLog \/tmp\/modsec_debug.log", "SecDebugLogLevel 9", - "SecRule SERVER_ADDR \"@contains test \" \"phase:3,pass,t:trim\"" + "SecRule SERVER_ADDR \"@contains test \" \"id:1,phase:3,pass,t:trim\"" ] }, { @@ -82,7 +82,7 @@ "SecRuleEngine On", "SecDebugLog \/tmp\/modsec_debug.log", "SecDebugLogLevel 9", - "SecRule SERVER_ADDR \"@contains test \" \"phase:3,pass,t:trim\"" + "SecRule SERVER_ADDR \"@contains test \" \"id:1,phase:3,pass,t:trim\"" ] } ] \ No newline at end of file diff --git a/test/test-cases/regression/variable-SERVER_PORT.json b/test/test-cases/regression/variable-SERVER_PORT.json index 52e5cfdf..100078c9 100644 --- a/test/test-cases/regression/variable-SERVER_PORT.json +++ b/test/test-cases/regression/variable-SERVER_PORT.json @@ -39,7 +39,7 @@ "SecRuleEngine On", "SecDebugLog \/tmp\/modsec_debug.log", "SecDebugLogLevel 9", - "SecRule SERVER_PORT \"@contains test \" \"phase:3,pass,t:trim\"" + "SecRule SERVER_PORT \"@contains test \" \"id:1,phase:3,pass,t:trim\"" ] }, { @@ -82,7 +82,7 @@ "SecRuleEngine On", "SecDebugLog \/tmp\/modsec_debug.log", "SecDebugLogLevel 9", - "SecRule SERVER_PORT \"@contains test \" \"phase:3,pass,t:trim\"" + "SecRule SERVER_PORT \"@contains test \" \"id:1,phase:3,pass,t:trim\"" ] } ] \ No newline at end of file diff --git a/test/test-cases/regression/variable-TIME.json b/test/test-cases/regression/variable-TIME.json index da5e1399..075419ae 100644 --- a/test/test-cases/regression/variable-TIME.json +++ b/test/test-cases/regression/variable-TIME.json @@ -39,7 +39,7 @@ "SecRuleEngine On", "SecDebugLog \/tmp\/modsec_debug.log", "SecDebugLogLevel 9", - "SecRule TIME \"@contains test \" \"phase:3,pass,t:trim\"" + "SecRule TIME \"@contains test \" \"id:1,phase:3,pass,t:trim\"" ] } ] \ No newline at end of file diff --git a/test/test-cases/regression/variable-TIME_DAY.json b/test/test-cases/regression/variable-TIME_DAY.json index 5344a530..f4869361 100644 --- a/test/test-cases/regression/variable-TIME_DAY.json +++ b/test/test-cases/regression/variable-TIME_DAY.json @@ -39,7 +39,7 @@ "SecRuleEngine On", "SecDebugLog \/tmp\/modsec_debug.log", "SecDebugLogLevel 9", - "SecRule TIME_DAY \"@contains test \" \"phase:3,pass,t:trim\"" + "SecRule TIME_DAY \"@contains test \" \"id:1,phase:3,pass,t:trim\"" ] } ] \ No newline at end of file diff --git a/test/test-cases/regression/variable-TIME_EPOCH.json b/test/test-cases/regression/variable-TIME_EPOCH.json index 91a8884c..a278ba43 100644 --- a/test/test-cases/regression/variable-TIME_EPOCH.json +++ b/test/test-cases/regression/variable-TIME_EPOCH.json @@ -39,7 +39,7 @@ "SecRuleEngine On", "SecDebugLog \/tmp\/modsec_debug.log", "SecDebugLogLevel 9", - "SecRule TIME_EPOCH \"@contains test \" \"phase:3,pass,t:trim\"" + "SecRule TIME_EPOCH \"@contains test \" \"id:1,phase:3,pass,t:trim\"" ] } ] \ No newline at end of file diff --git a/test/test-cases/regression/variable-TIME_HOUR.json b/test/test-cases/regression/variable-TIME_HOUR.json index 53a61e8a..9156ef06 100644 --- a/test/test-cases/regression/variable-TIME_HOUR.json +++ b/test/test-cases/regression/variable-TIME_HOUR.json @@ -39,7 +39,7 @@ "SecRuleEngine On", "SecDebugLog \/tmp\/modsec_debug.log", "SecDebugLogLevel 9", - "SecRule TIME_HOUR \"@contains test \" \"phase:3,pass,t:trim\"" + "SecRule TIME_HOUR \"@contains test \" \"id:1,phase:3,pass,t:trim\"" ] } ] \ No newline at end of file diff --git a/test/test-cases/regression/variable-TIME_MIN.json b/test/test-cases/regression/variable-TIME_MIN.json index a876c69d..17516a5e 100644 --- a/test/test-cases/regression/variable-TIME_MIN.json +++ b/test/test-cases/regression/variable-TIME_MIN.json @@ -39,7 +39,7 @@ "SecRuleEngine On", "SecDebugLog \/tmp\/modsec_debug.log", "SecDebugLogLevel 9", - "SecRule TIME_MIN \"@contains test \" \"phase:3,pass,t:trim\"" + "SecRule TIME_MIN \"@contains test \" \"id:1,phase:3,pass,t:trim\"" ] } ] \ No newline at end of file diff --git a/test/test-cases/regression/variable-TIME_MON.json b/test/test-cases/regression/variable-TIME_MON.json index 13f8e560..39263e61 100644 --- a/test/test-cases/regression/variable-TIME_MON.json +++ b/test/test-cases/regression/variable-TIME_MON.json @@ -39,7 +39,7 @@ "SecRuleEngine On", "SecDebugLog \/tmp\/modsec_debug.log", "SecDebugLogLevel 9", - "SecRule TIME_MON \"@contains test \" \"phase:3,pass,t:trim\"" + "SecRule TIME_MON \"@contains test \" \"id:1,phase:3,pass,t:trim\"" ] } ] \ No newline at end of file diff --git a/test/test-cases/regression/variable-TIME_SEC.json b/test/test-cases/regression/variable-TIME_SEC.json index 32cceca6..c6b5e56b 100644 --- a/test/test-cases/regression/variable-TIME_SEC.json +++ b/test/test-cases/regression/variable-TIME_SEC.json @@ -39,7 +39,7 @@ "SecRuleEngine On", "SecDebugLog \/tmp\/modsec_debug.log", "SecDebugLogLevel 9", - "SecRule TIME_SEC \"@contains test \" \"phase:3,pass,t:trim\"" + "SecRule TIME_SEC \"@contains test \" \"id:1,phase:3,pass,t:trim\"" ] } ] \ No newline at end of file diff --git a/test/test-cases/regression/variable-TIME_WDAY.json b/test/test-cases/regression/variable-TIME_WDAY.json index cf70d802..1301597d 100644 --- a/test/test-cases/regression/variable-TIME_WDAY.json +++ b/test/test-cases/regression/variable-TIME_WDAY.json @@ -39,7 +39,7 @@ "SecRuleEngine On", "SecDebugLog \/tmp\/modsec_debug.log", "SecDebugLogLevel 9", - "SecRule TIME_WDAY \"@contains test \" \"phase:3,pass,t:trim\"" + "SecRule TIME_WDAY \"@contains test \" \"id:1,phase:3,pass,t:trim\"" ] } ] \ No newline at end of file diff --git a/test/test-cases/regression/variable-TIME_YEAR.json b/test/test-cases/regression/variable-TIME_YEAR.json index 451b24f3..30d8c77a 100644 --- a/test/test-cases/regression/variable-TIME_YEAR.json +++ b/test/test-cases/regression/variable-TIME_YEAR.json @@ -39,7 +39,7 @@ "SecRuleEngine On", "SecDebugLog \/tmp\/modsec_debug.log", "SecDebugLogLevel 9", - "SecRule TIME_YEAR \"@contains test \" \"phase:3,pass,t:trim\"" + "SecRule TIME_YEAR \"@contains test \" \"id:1,phase:3,pass,t:trim\"" ] } ] \ No newline at end of file diff --git a/test/test-cases/regression/variable-TX.json b/test/test-cases/regression/variable-TX.json index 9fd1d82f..65576ed3 100644 --- a/test/test-cases/regression/variable-TX.json +++ b/test/test-cases/regression/variable-TX.json @@ -40,7 +40,7 @@ "SecDebugLog \/tmp\/modsec_debug.log", "SecDebugLogLevel 9", "SecRequestBodyAccess On", - "SecRule RESPONSE_BODY \"@rx ([0-9]+)\" \"phase:4,capture,id:105\"", + "SecRule RESPONSE_BODY \"@rx ([0-9]+)\" \"id:1,phase:4,capture,id:105\"", "SecRule TX \"@rx ([A-z]+)\" \"phase:4,id:106\"" ] }, @@ -80,7 +80,7 @@ "SecRuleEngine On", "SecDebugLog \/tmp\/modsec_debug.log", "SecDebugLogLevel 9", - "SecRule REQUEST_HEADERS \"@rx ([A-z]+)\" \"log,pass,capture,id:14\"", + "SecRule REQUEST_HEADERS \"@rx ([A-z]+)\" \"id:1,log,pass,capture,id:14\"", "SecRule TX:0 \"@rx ([A-z]+)\" \"id:15\"" ] } diff --git a/test/test-cases/regression/variable-UNIQUE_ID.json b/test/test-cases/regression/variable-UNIQUE_ID.json index 2bf41f2c..76653712 100644 --- a/test/test-cases/regression/variable-UNIQUE_ID.json +++ b/test/test-cases/regression/variable-UNIQUE_ID.json @@ -39,7 +39,7 @@ "SecRuleEngine On", "SecDebugLog \/tmp\/modsec_debug.log", "SecDebugLogLevel 9", - "SecRule UNIQUE_ID \"@contains test \" \"phase:3,pass,t:trim\"" + "SecRule UNIQUE_ID \"@contains test \" \"id:1,phase:3,pass,t:trim\"" ] } ] \ No newline at end of file diff --git a/test/test-cases/regression/variable-variation-count.json b/test/test-cases/regression/variable-variation-count.json index 8fd2c9fe..5fc10153 100644 --- a/test/test-cases/regression/variable-variation-count.json +++ b/test/test-cases/regression/variable-variation-count.json @@ -55,7 +55,7 @@ "SecRuleEngine On", "SecDebugLog \/tmp\/modsec_debug.log", "SecDebugLogLevel 9", - "SecRule &REQUEST_HEADERS \"@contains test \" \"t:lowercase,t:none\"" + "SecRule &REQUEST_HEADERS \"@contains test \" \"id:1,t:lowercase,t:none\"" ] }, { @@ -114,7 +114,7 @@ "SecRuleEngine On", "SecDebugLog \/tmp\/modsec_debug.log", "SecDebugLogLevel 9", - "SecRule &REQUEST_HEADERS:Accept \"@contains test \" \"t:lowercase,t:none\"" + "SecRule &REQUEST_HEADERS:Accept \"@contains test \" \"id:1,t:lowercase,t:none\"" ] }, { @@ -173,7 +173,7 @@ "SecRuleEngine On", "SecDebugLog \/tmp\/modsec_debug.log", "SecDebugLogLevel 9", - "SecRule &REQUEST_HEADERS:missing \"@contains test \" \"t:lowercase,t:none\"" + "SecRule &REQUEST_HEADERS:missing \"@contains test \" \"id:1,t:lowercase,t:none\"" ] } ] diff --git a/test/test-cases/regression/variable-variation-exclusion.json b/test/test-cases/regression/variable-variation-exclusion.json index 541f67ff..a0d9fc9a 100644 --- a/test/test-cases/regression/variable-variation-exclusion.json +++ b/test/test-cases/regression/variable-variation-exclusion.json @@ -55,7 +55,7 @@ "SecRuleEngine On", "SecDebugLog \/tmp\/modsec_debug.log", "SecDebugLogLevel 9", - "SecRule REQUEST_HEADERS|!REQUEST_HEADERS:Accept|!REMOTE_HOST \"@contains test \" \"t:lowercase,t:none\"" + "SecRule REQUEST_HEADERS|!REQUEST_HEADERS:Accept|!REMOTE_HOST \"@contains test \" \"id:1,t:lowercase,t:none\"" ] }, { @@ -114,7 +114,7 @@ "SecRuleEngine On", "SecDebugLog \/tmp\/modsec_debug.log", "SecDebugLogLevel 9", - "SecRule REQUEST_HEADERS|!REQUEST_HEADERS \"@contains test \" \"t:lowercase,t:none\"" + "SecRule REQUEST_HEADERS|!REQUEST_HEADERS \"@contains test \" \"id:1,t:lowercase,t:none\"" ] } ] \ No newline at end of file