Skip to content

Commit

Permalink
Fix modsecurity-regression-test-secremoterules.txt URL in example
Browse files Browse the repository at this point in the history
  • Loading branch information
hnakamur committed Nov 1, 2024
1 parent 4b75aba commit 0016815
Show file tree
Hide file tree
Showing 5 changed files with 6 additions and 3 deletions.
2 changes: 1 addition & 1 deletion examples/simple_example_using_c/test.c
Original file line number Diff line number Diff line change
Expand Up @@ -47,7 +47,7 @@ int main (int argc, char **argv)
msc_rules_dump(rules);

ret = msc_rules_add_remote(rules, "test",
"https://www.modsecurity.org/modsecurity-regression-test-secremoterules.txt",
"https://raw.githubusercontent.com/owasp-modsecurity/ModSecurity/refs/heads/v3/master/test/modsecurity-regression-rules.txt",
&error);
if (ret < 0) {
fprintf(stderr, "Problems loading the rules --\n");
Expand Down
2 changes: 2 additions & 0 deletions test/modsecurity-regression-ip-list.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
127.0.0.1
8.8.4.4
1 change: 1 addition & 0 deletions test/modsecurity-regression-rules.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
SecRule REQUEST_FILENAME "@pmFromFile https://raw.githubusercontent.com/owasp-modsecurity/ModSecurity/refs/heads/v3/master/test/modsecurity-regression-ip-list.txt" "id:'123',phase:2,log,pass,t:none"
2 changes: 1 addition & 1 deletion test/test-cases/regression/config-secremoterules.json
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,7 @@
},
"rules":[
"SecRuleEngine On",
"SecRemoteRules key https://gist.githubusercontent.com/martinhsv/20705a36b7cfa8ff6d0dee0d4efce7e7/raw/faa96c7838b1fe972c1f0881efacbb440f9a4a5e/modsecurity-regression-rules.txt",
"SecRemoteRules key https://raw.githubusercontent.com/owasp-modsecurity/ModSecurity/refs/heads/v3/master/test/modsecurity-regression-rules.txt",
"SecRule ARGS \"@contains somethingelse\" \"id:9,pass,t:trim\""
]
},
Expand Down
2 changes: 1 addition & 1 deletion test/test-cases/regression/operator-ipMatchFromFile.json
Original file line number Diff line number Diff line change
Expand Up @@ -129,7 +129,7 @@
},
"rules":[
"SecRuleEngine On",
"SecRule REMOTE_ADDR \"@ipMatchFromFile https://gist.githubusercontent.com/martinhsv/20705a36b7cfa8ff6d0dee0d4efce7e7/raw/b9321f190eb0e81b98cb65a56db3d7e0a4f59314/modsecurity-regression-ip-list.txt\" \"id:1,phase:3,pass,t:trim\""
"SecRule REMOTE_ADDR \"@ipMatchFromFile https://raw.githubusercontent.com/owasp-modsecurity/ModSecurity/refs/heads/v3/master/test/modsecurity-regression-ip-list.txt\" \"id:1,phase:3,pass,t:trim\""
]
}
]

0 comments on commit 0016815

Please sign in to comment.