1[ 2 { 3 "enabled":1, 4 "version_min":300000, 5 "title":"Testing Variables :: ARGS_NAMES - GET (1/4)", 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":"/?key1=value&key2=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: \"key1\"" 35 }, 36 "rules":[ 37 "SecRuleEngine On", 38 "SecRule ARGS_NAMES \"@contains test \" \"id:1,pass,t:trim\"" 39 ] 40 }, 41 { 42 "enabled":1, 43 "version_min":300000, 44 "title":"Testing Variables :: ARGS_NAMES - GET (2/4)", 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":"/?key1=value&key2=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: \"key2\"" 74 }, 75 "rules":[ 76 "SecRuleEngine On", 77 "SecRule ARGS_NAMES \"@contains test \" \"id:1,pass,t:trim\"" 78 ] 79 }, 80 { 81 "enabled":1, 82 "version_min":300000, 83 "title":"Testing Variables :: ARGS_NAMES - POST (3/4)", 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¶m2=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: \"param1\"" 118 }, 119 "rules":[ 120 "SecRuleEngine On", 121 "SecRule ARGS_NAMES \"@contains test \" \"id:1,phase:3,pass,t:trim\"" 122 ] 123 }, 124 { 125 "enabled":1, 126 "version_min":300000, 127 "title":"Testing Variables :: ARGS_NAMES - POST (4/4)", 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¶m2=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: \"param2\"" 162 }, 163 "rules":[ 164 "SecRuleEngine On", 165 "SecRule ARGS_NAMES \"@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_NAMES (3/x)", 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":"330", 186 "Content-Type":"multipart/form-data; boundary=0000", 187 "Expect":"100-continue" 188 }, 189 "uri":"/", 190 "method":"POST", 191 "body":[ 192 "--0000\r", 193 "Content-Disposition: form-data; name=\"name1\"\r", 194 "\r", 195 "content1\r", 196 "--0000\r", 197 "Content-Disposition: form-data; name=\"name2\"\r", 198 "\r", 199 "content2\r", 200 "--0000--\r" 201 ] 202 }, 203 "response":{ 204 "headers":{ 205 "Content-Type":"text/html" 206 }, 207 "body":[ 208 "no need." 209 ] 210 }, 211 "expected":{ 212 "debug_log":"Target value: \"name1\" \\(Variable: ARGS_NAMES\\)" 213 }, 214 "rules":[ 215 "SecRuleEngine On", 216 "SecRequestBodyAccess On", 217 "SecRule ARGS_NAMES \"@contains test \" \"id:1,phase:3,pass,t:trim\"" 218 ] 219 } 220] 221 222