1[
2  {
3    "enabled":1,
4    "version_min":300000,
5    "title":"Testing Variables :: ARGS - GET (1/7)",
6    "client":{
7      "ip":"200.249.12.31",
8      "port":123
9    },
10    "server":{
11      "ip":"200.249.12.31",
12      "port":80
13    },
14    "request":{
15      "headers":{
16        "Host":"localhost",
17        "User-Agent":"curl/7.38.0",
18        "Accept":"*/*"
19      },
20      "uri":"/?key=value&key=other_value",
21      "method":"GET"
22    },
23    "response":{
24      "headers":{
25        "Date":"Mon, 13 Jul 2015 20:02:41 GMT",
26        "Last-Modified":"Sun, 26 Oct 2014 22:33:37 GMT",
27        "Content-Type":"text/html"
28      },
29      "body":[
30        "no need."
31      ]
32    },
33    "expected":{
34      "debug_log":"Target value: \"other_value\""
35    },
36    "rules":[
37      "SecRuleEngine On",
38      "SecRule ARGS \"@contains test \" \"id:1,pass,t:trim\""
39    ]
40  },
41  {
42    "enabled":1,
43    "version_min":300000,
44    "title":"Testing Variables :: ARGS - GET (2/7)",
45    "client":{
46      "ip":"200.249.12.31",
47      "port":123
48    },
49    "server":{
50      "ip":"200.249.12.31",
51      "port":80
52    },
53    "request":{
54      "headers":{
55        "Host":"localhost",
56        "User-Agent":"curl/7.38.0",
57        "Accept":"*/*"
58      },
59      "uri":"/?key=value&key=other_value",
60      "method":"GET"
61    },
62    "response":{
63      "headers":{
64        "Date":"Mon, 13 Jul 2015 20:02:41 GMT",
65        "Last-Modified":"Sun, 26 Oct 2014 22:33:37 GMT",
66        "Content-Type":"text/html"
67      },
68      "body":[
69        "no need."
70      ]
71    },
72    "expected":{
73      "debug_log":"Target value: \"value\""
74    },
75    "rules":[
76      "SecRuleEngine On",
77      "SecRule ARGS \"@contains test \" \"id:1,pass,t:trim\""
78    ]
79  },
80  {
81    "enabled":1,
82    "version_min":300000,
83    "title":"Testing Variables :: ARGS - POST (3/7)",
84    "client":{
85      "ip":"200.249.12.31",
86      "port":123
87    },
88    "server":{
89      "ip":"200.249.12.31",
90      "port":80
91    },
92    "request":{
93      "headers":{
94        "Host":"localhost",
95        "User-Agent":"curl/7.38.0",
96        "Accept":"*/*",
97        "Content-Length": "27",
98        "Content-Type": "application/x-www-form-urlencoded"
99      },
100      "uri":"/",
101      "method":"POST",
102      "body": [
103        "param1=value1&param2=value2"
104      ]
105    },
106    "response":{
107      "headers":{
108        "Date":"Mon, 13 Jul 2015 20:02:41 GMT",
109        "Last-Modified":"Sun, 26 Oct 2014 22:33:37 GMT",
110        "Content-Type":"text/html"
111      },
112      "body":[
113        "no need."
114      ]
115    },
116    "expected":{
117      "debug_log":"Target value: \"value1\""
118    },
119    "rules":[
120      "SecRuleEngine On",
121      "SecRule ARGS \"@contains test \" \"id:1,phase:3,pass,t:trim\""
122    ]
123  },
124  {
125    "enabled":1,
126    "version_min":300000,
127    "title":"Testing Variables :: ARGS - POST (4/7)",
128    "client":{
129      "ip":"200.249.12.31",
130      "port":123
131    },
132    "server":{
133      "ip":"200.249.12.31",
134      "port":80
135    },
136    "request":{
137      "headers":{
138        "Host":"localhost",
139        "User-Agent":"curl/7.38.0",
140        "Accept":"*/*",
141        "Content-Length": "27",
142        "Content-Type": "application/x-www-form-urlencoded"
143      },
144      "uri":"/",
145      "method":"POST",
146      "body": [
147        "param1=value1&param2=value2"
148      ]
149    },
150    "response":{
151      "headers":{
152        "Date":"Mon, 13 Jul 2015 20:02:41 GMT",
153        "Last-Modified":"Sun, 26 Oct 2014 22:33:37 GMT",
154        "Content-Type":"text/html"
155      },
156      "body":[
157        "no need."
158      ]
159    },
160    "expected":{
161      "debug_log":"Target value: \"value2\""
162    },
163    "rules":[
164      "SecRuleEngine On",
165      "SecRule ARGS \"@contains test \" \"id:1,phase:3,pass,t:trim\""
166    ]
167  },
168  {
169    "enabled":1,
170    "version_min":300000,
171    "title":"Testing Variables :: ARGS - POST (5/7)",
172    "client":{
173      "ip":"200.249.12.31",
174      "port":123
175    },
176    "server":{
177      "ip":"200.249.12.31",
178      "port":80
179    },
180    "request":{
181      "headers":{
182        "Host":"localhost",
183        "User-Agent":"curl/7.38.0",
184        "Accept":"*/*",
185        "Content-Length": "27",
186        "Content-Type": "application/x-www-form-urlencoded"
187      },
188      "uri":"/",
189      "method":"POST",
190      "body": [
191        "param1=value1=morevalue1&param2=value2"
192      ]
193    },
194    "response":{
195      "headers":{
196        "Date":"Mon, 13 Jul 2015 20:02:41 GMT",
197        "Last-Modified":"Sun, 26 Oct 2014 22:33:37 GMT",
198        "Content-Type":"text/html"
199      },
200      "body":[
201        "no need."
202      ]
203    },
204    "expected":{
205      "debug_log":"Target value: \"value1=morevalue1\""
206    },
207    "rules":[
208      "SecRuleEngine On",
209      "SecRule ARGS \"@contains test \" \"id:1,phase:3,pass,t:trim\""
210    ]
211  },
212  {
213    "enabled":1,
214    "version_min":300000,
215    "title":"Testing Variables :: ARGS - POST (6/7)",
216    "client":{
217      "ip":"200.249.12.31",
218      "port":123
219    },
220    "server":{
221      "ip":"200.249.12.31",
222      "port":80
223    },
224    "request":{
225      "headers":{
226        "Host":"localhost",
227        "User-Agent":"curl/7.38.0",
228        "Accept":"*/*",
229        "Content-Length": "27",
230        "Content-Type": "application/x-www-form-urlencoded"
231      },
232      "uri":"/",
233      "method":"POST",
234      "body": [
235        "param1=value1=morevalue1&param2=value2&param3="
236      ]
237    },
238    "response":{
239      "headers":{
240        "Date":"Mon, 13 Jul 2015 20:02:41 GMT",
241        "Last-Modified":"Sun, 26 Oct 2014 22:33:37 GMT",
242        "Content-Type":"text/html"
243      },
244      "body":[
245        "no need."
246      ]
247    },
248    "expected":{
249      "debug_log":"Target value: \"\" \\(Variable: ARGS:param3\\)"
250    },
251    "rules":[
252      "SecRuleEngine On",
253      "SecRule ARGS:param3 \"@contains test \" \"id:1,phase:3,pass,t:trim\""
254    ]
255  },
256  {
257    "enabled":1,
258    "version_min":300000,
259    "title":"Testing Variables :: ARGS - POST (7/7)",
260    "client":{
261      "ip":"200.249.12.31",
262      "port":123
263    },
264    "server":{
265      "ip":"200.249.12.31",
266      "port":80
267    },
268    "request":{
269      "headers":{
270        "Host":"localhost",
271        "User-Agent":"curl/7.38.0",
272        "Accept":"*/*",
273        "Content-Length": "27",
274        "Content-Type": "application/x-www-form-urlencoded"
275      },
276      "uri":"/",
277      "method":"POST",
278      "body": [
279        "param1=value1=morevalue1&param2=value2&&&&&"
280      ]
281    },
282    "response":{
283      "headers":{
284        "Date":"Mon, 13 Jul 2015 20:02:41 GMT",
285        "Last-Modified":"Sun, 26 Oct 2014 22:33:37 GMT",
286        "Content-Type":"text/html"
287      },
288      "body":[
289        "no need."
290      ]
291    },
292    "expected":{
293      "debug_log":"Target value: \"value2\" \\(Variable: ARGS:param2\\)"
294    },
295    "rules":[
296      "SecRuleEngine On",
297      "SecRule ARGS:param2 \"@contains test \" \"id:1,phase:3,pass,t:trim\""
298    ]
299  }
300]
301
302