Skip to content

Commit 760e425

Browse files
committed
Add test case
1 parent 2f0e66f commit 760e425

File tree

1 file changed

+61
-0
lines changed

1 file changed

+61
-0
lines changed

test/test-cases/regression/variable-MULTIPART_UNMATCHED_BOUNDARY.json

Lines changed: 61 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -57,5 +57,66 @@
5757
"SecRuleEngine On",
5858
"SecRule MULTIPART_UNMATCHED_BOUNDARY \"@contains small_text_file.txt\" \"id:1,phase:3,pass,t:trim\""
5959
]
60+
},
61+
{
62+
"enabled":1,
63+
"version_min":300000,
64+
"title":"Testing Variables :: MULTIPART_UNMATCHED_BOUNDARY - DENY",
65+
"client":{
66+
"ip":"200.249.12.31",
67+
"port":123
68+
},
69+
"server":{
70+
"ip":"200.249.12.31",
71+
"port":80
72+
},
73+
"request":{
74+
"headers":{
75+
"Host":"localhost",
76+
"User-Agent":"curl/7.38.0",
77+
"Accept":"*/*",
78+
"Content-Length":"330",
79+
"Content-Type":"multipart/form-data; boundary=--------------------------756b6d74fa1a8ee2",
80+
"Expect":"100-continue"
81+
},
82+
"uri":"/",
83+
"method":"POST",
84+
"body":[
85+
"----------------------------756b6d74fa1a8ee2",
86+
"Content-Disposition: form-data; name=\"name\"",
87+
"",
88+
"test",
89+
"----------------------------756b6d74fa1a8ee2",
90+
"Content-Disposition: form-data; name=\"filedata\"; filename=\"small_text_file.txt\"",
91+
"Content-Type: text/plain",
92+
"",
93+
"This is a very small test file..",
94+
"A----------------------------756b6d74fa1a8ee2",
95+
"Content-Disposition: form-data; name=\"filedata\"; filename=\"small_text_file.txt\"",
96+
"Content-Type: text/plain",
97+
"",
98+
"This is another very small test file..",
99+
"----------------------------756b6d74fa1a8ee2--",
100+
""
101+
]
102+
},
103+
"response":{
104+
"headers":{
105+
"Date":"Mon, 13 Jul 2015 20:02:41 GMT",
106+
"Last-Modified":"Sun, 26 Oct 2014 22:33:37 GMT",
107+
"Content-Type":"text/html"
108+
},
109+
"body":[
110+
"no need."
111+
]
112+
},
113+
"expected":{
114+
"debug_log":"Target value: \"1\" \\(Variable: MULTIPART_UNMATCHED_BOUNDARY\\)",
115+
"http_code": 403
116+
},
117+
"rules":[
118+
"SecRuleEngine On",
119+
"SecRule MULTIPART_UNMATCHED_BOUNDARY \"@eq 1\" \"id:1,phase:2,deny,t:none\""
120+
]
60121
}
61122
]

0 commit comments

Comments
 (0)