Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Commit86787f2

Browse files
author
Felipe Zimmerle
committed
Adds SecRemoteRules regression tests.
Added two test cases for SecRemoteRules. Contents are loaded fromhttps://www.modsecurity.org
1 parentb5398ab commit86787f2

File tree

1 file changed

+43
-0
lines changed

1 file changed

+43
-0
lines changed
Lines changed: 43 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,43 @@
1+
### SecRemoteRules
2+
3+
{
4+
type=>"misc",
5+
comment=>"SecRemoteRules load",
6+
conf=>qq(
7+
SecRuleEngineOn
8+
SecDebugLog $ENV{DEBUG_LOG}
9+
SecDebugLogLevel9
10+
SecRequestBodyAccessOn
11+
SecRemoteRules123"https://www.modsecurity.org/modsecurity-regression-test-secremoterules.txt"
12+
),
13+
match_log=> {
14+
error=> [qr/ModSecurity:Loaded1rule/,1],
15+
},
16+
},
17+
{
18+
type=>"misc",
19+
comment=>"SecRemoteRules apply some remote rules",
20+
conf=>qq(
21+
SecRuleEngineOn
22+
SecDebugLog $ENV{DEBUG_LOG}
23+
SecDebugLogLevel9
24+
SecRequestBodyAccessOn
25+
SecRemoteRules123"https://www.modsecurity.org/modsecurity-regression-test-secremoterules.txt"
26+
),
27+
match_log=> {
28+
error=> [qr/ModSecurity:Warning.Matchedphrase \"127.0.0.1\"atREQUEST_FILENAME./,1],
29+
debug=> [qr/Matchedphrase \"127.0.0.1\"atREQUEST_FILENAME/,1 ],
30+
},
31+
match_response=> {
32+
status=>qr/^404$/,
33+
},
34+
request=>newHTTP::Request(
35+
POST=>"http://$ENV{SERVER_NAME}:$ENV{SERVER_PORT}/127.0.0.1.html",
36+
[
37+
"Content-Type"=>"application/x-www-form-urlencoded",
38+
],
39+
# Args
40+
"some_variable=-1' and 1=1 union/* foo */select load_file('/etc/passwd')--"
41+
),
42+
},
43+

0 commit comments

Comments
 (0)

[8]ページ先頭

©2009-2025 Movatter.jp