Extend RESPONSE_BODY test case.

This commit is contained in:
Lasse Karstensen
2017-08-03 13:28:16 +02:00
committed by Felipe Zimmerle
parent 31655e2c9b
commit fc06915cc6

View File

@@ -3,41 +3,32 @@
"enabled":1, "enabled":1,
"version_min":300000, "version_min":300000,
"title":"Testing Variables :: RESPONSE_BODY", "title":"Testing Variables :: RESPONSE_BODY",
"client":{ "client": {
"ip":"200.249.12.31", "ip":"200.249.12.31"
"port":123
}, },
"server":{ "request": {
"ip":"200.249.12.31", "headers": {
"port":80 "Host":"localhost"
}, },
"request":{ "uri":"/foo",
"headers":{
"Host":"localhost",
"User-Agent":"curl/7.38.0",
"Accept":"*/*"
},
"uri":"/?key=value&key=other_value",
"method":"GET",
"http_version":1.1 "http_version":1.1
}, },
"response":{ "response":{
"headers":{ "headers":{
"Date":"Mon, 13 Jul 2015 20:02:41 GMT", "Date":"Mon, 13 Jul 2015 20:02:41 GMT",
"Last-Modified":"Sun, 26 Oct 2014 22:33:37 GMT", "Last-Modified":"Sun, 26 Oct 2014 22:33:37 GMT",
"Content-Type":"text/html" "Content-Type":"text/plain"
}, },
"body":[ "body":[
"no need." "denystring"
] ]
}, },
"expected":{ "expected":{
"debug_log":"Target value: \"no need.\" \\(Variable: RESPONSE_BODY\\)" "http_code": 403
}, },
"rules":[ "rules":[
"SecRuleEngine On", "SecRuleEngine On",
"SecRule RESPONSE_BODY \"@contains test \" \"id:1,phase:4,pass,t:trim\"" "SecRule RESPONSE_BODY \"@contains denystring\" \"id:1,phase:4,deny\""
] ]
} }
] ]