Skip to content

Commit 2bdc5f9

Browse files
committed
Adds test case to cover issue #2005
1 parent 74eee93 commit 2bdc5f9

File tree

1 file changed

+45
-0
lines changed

1 file changed

+45
-0
lines changed

test/test-cases/regression/config-update-action-by-id.json

Lines changed: 45 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -222,6 +222,51 @@
222222
"SecRule ARGS \"@contains value1\" \"phase:3,id:200004,block\"",
223223
"SecRule ARGS \"@contains value1\" \"phase:3,id:200005,log\""
224224
]
225+
},
226+
{
227+
"enabled":1,
228+
"version_min":300000,
229+
"title":"SecRuleUpdateActionById (6/n)",
230+
"issue":"2005",
231+
"client":{
232+
"ip":"200.249.12.31",
233+
"port":123
234+
},
235+
"server":{
236+
"ip":"200.249.12.31",
237+
"port":80
238+
},
239+
"request":{
240+
"headers":{
241+
"Host":"localhost",
242+
"User-Agent":"curl/7.38.0",
243+
"Accept":"*/*",
244+
"Content-Length":"330",
245+
"Content-Type":"application/lhebs",
246+
"Expect":"100-continue"
247+
},
248+
"uri":"/a=urlencoded?param1=value1",
249+
"method":"GET"
250+
},
251+
"response":{
252+
"headers":{
253+
"Date":"Mon, 13 Jul 2015 20:02:41 GMT",
254+
"Last-Modified":"Sun, 26 Oct 2014 22:33:37 GMT",
255+
"Content-Type":"text/html"
256+
},
257+
"body":[
258+
"no need."
259+
]
260+
},
261+
"expected":{
262+
"http_code": 302,
263+
"error_log": "Access denied with code 302"
264+
},
265+
"rules":[
266+
"SecRuleEngine On",
267+
"SecRuleUpdateActionById 200004 \"redirect:'https://%{request_headers.host}/'\"",
268+
"SecRule ARGS \"@contains value1\" \"phase:3,id:200004,block,deny\""
269+
]
225270
}
226271
]
227272

0 commit comments

Comments
 (0)