1[
2  {
3    "enabled":1,
4    "version_min":300000,
5    "title":"Testing Variables :: REQUEST_URI",
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      "http_version":1.1
23    },
24    "response":{
25      "headers":{
26        "Date":"Mon, 13 Jul 2015 20:02:41 GMT",
27        "Last-Modified":"Sun, 26 Oct 2014 22:33:37 GMT",
28        "Content-Type":"text/html"
29      },
30      "body":[
31        "no need."
32      ]
33    },
34    "expected":{
35      "debug_log":"Target value: \"/\\?key=value\\&key=other_value\" \\(Variable: REQUEST_URI\\)"
36    },
37    "rules":[
38      "SecRuleEngine On",
39      "SecRule REQUEST_URI \"@contains test \" \"id:1,pass,t:trim\""
40    ]
41  },
42  {
43    "enabled":1,
44    "version_min":300000,
45    "title":"Testing Variables :: REQUEST_URI (with URI fragment)",
46    "client":{
47      "ip":"200.249.12.31",
48      "port":123
49    },
50    "server":{
51      "ip":"200.249.12.31",
52      "port":80
53    },
54    "request":{
55      "headers":{
56        "Host":"localhost",
57        "User-Agent":"curl/7.38.0",
58        "Accept":"*/*"
59      },
60      "uri":"/?key=value&key=other_value#urifrag",
61      "method":"GET",
62      "http_version":1.1
63    },
64    "response":{
65      "headers":{
66        "Date":"Mon, 13 Jul 2015 20:02:41 GMT",
67        "Last-Modified":"Sun, 26 Oct 2014 22:33:37 GMT",
68        "Content-Type":"text/html"
69      },
70      "body":[
71        "no need."
72      ]
73    },
74    "expected":{
75      "http_code": 403
76    },
77    "rules":[
78      "SecRuleEngine On",
79      "SecRule REQUEST_URI \"!@contains urifrag\" \"id:1,phase:1,deny,status:403\""
80    ]
81  },
82  {
83    "enabled":1,
84    "version_min":300000,
85    "title":"Testing Variables :: REQUEST_URI (with URI fragment)",
86    "client":{
87      "ip":"200.249.12.31",
88      "port":123
89    },
90    "server":{
91      "ip":"200.249.12.31",
92      "port":80
93    },
94    "request":{
95      "headers":{
96        "Host":"localhost",
97        "User-Agent":"curl/7.38.0",
98        "Accept":"*/*"
99      },
100      "uri":"/one/two/testpost.php#urifrag",
101      "method":"GET",
102      "http_version":1.1
103    },
104    "response":{
105      "headers":{
106        "Date":"Mon, 13 Jul 2015 20:02:41 GMT",
107        "Last-Modified":"Sun, 26 Oct 2014 22:33:37 GMT",
108        "Content-Type":"text/html"
109      },
110      "body":[
111        "no need."
112      ]
113    },
114    "expected":{
115      "http_code": 403
116    },
117    "rules":[
118      "SecRuleEngine On",
119      "SecRule REQUEST_URI \"!@contains urifrag\" \"id:1,phase:1,deny,status:403\""
120    ]
121  }
122]
123
124