|
2 | 2 | {
|
3 | 3 | "enabled":1,
|
4 | 4 | "version_min":300000,
|
5 |
| - "title":"Testing Variables :: ENV (1/3)", |
| 5 | + "title":"Testing Variables :: ENV (1/4)", |
6 | 6 | "client":{
|
7 | 7 | "ip":"200.249.12.31",
|
8 | 8 | "port":123
|
|
46 | 46 | {
|
47 | 47 | "enabled":1,
|
48 | 48 | "version_min":300000,
|
49 |
| - "title":"Testing Variables :: ENV (2/3)", |
| 49 | + "title":"Testing Variables :: ENV (2/4)", |
50 | 50 | "client":{
|
51 | 51 | "ip":"200.249.12.31",
|
52 | 52 | "port":123
|
|
80 | 80 | ]
|
81 | 81 | },
|
82 | 82 | "expected":{
|
83 |
| - "debug_log":"Variable: ENV:TERM" |
| 83 | + "debug_log":"regression tests\" .Variable: ENV:MODSECURITY." |
84 | 84 | },
|
85 | 85 | "rules":[
|
86 | 86 | "SecRuleEngine On",
|
87 |
| - "SecRule ENV:TERM \"@contains test\" \"id:1,phase:3,pass,t:trim\"" |
| 87 | + "SecRule ENV:MODSECURITY \"@contains test\" \"id:1,phase:3,pass,t:trim\"" |
88 | 88 | ]
|
89 | 89 | },
|
90 | 90 | {
|
91 | 91 | "enabled":1,
|
92 | 92 | "version_min":300000,
|
93 |
| - "title":"Testing Variables :: ENV (3/3)", |
| 93 | + "title":"Testing Variables :: ENV (3/4)", |
| 94 | + "client":{ |
| 95 | + "ip":"200.249.12.31", |
| 96 | + "port":123 |
| 97 | + }, |
| 98 | + "server":{ |
| 99 | + "ip":"200.249.12.31", |
| 100 | + "port":80 |
| 101 | + }, |
| 102 | + "request":{ |
| 103 | + "headers":{ |
| 104 | + "Host":"localhost", |
| 105 | + "User-Agent":"curl/7.38.0", |
| 106 | + "Accept":"*/*", |
| 107 | + "Content-Length": "27", |
| 108 | + "Content-Type": "application/x-www-form-urlencoded" |
| 109 | + }, |
| 110 | + "uri":"/", |
| 111 | + "method":"POST", |
| 112 | + "body": [ |
| 113 | + "param1=value1¶m2=value2" |
| 114 | + ] |
| 115 | + }, |
| 116 | + "response":{ |
| 117 | + "headers":{ |
| 118 | + "Date":"Mon, 13 Jul 2015 20:02:41 GMT", |
| 119 | + "Last-Modified":"Sun, 26 Oct 2014 22:33:37 GMT", |
| 120 | + "Content-Type":"text/html" |
| 121 | + }, |
| 122 | + "body":[ |
| 123 | + "no need." |
| 124 | + ] |
| 125 | + }, |
| 126 | + "expected":{ |
| 127 | + "debug_log":"Target value: \"bar\" .Variable: ENV:modfoo." |
| 128 | + }, |
| 129 | + "rules":[ |
| 130 | + "SecRuleEngine On", |
| 131 | + "SecRule ARGS \"@contains value\" \"id:1,phase:3,pass,t:trim,setenv:modfoo=bar\"", |
| 132 | + "SecRule ENV:modfoo \"@contains test\" \"id:2,phase:3,pass,t:trim\"" |
| 133 | + ] |
| 134 | + }, |
| 135 | + { |
| 136 | + "enabled":1, |
| 137 | + "version_min":300000, |
| 138 | + "title":"Testing Variables :: ENV (4/4)", |
94 | 139 | "client":{
|
95 | 140 | "ip":"200.249.12.31",
|
96 | 141 | "port":123
|
|
0 commit comments