|
2 | 2 | { |
3 | 3 | "enabled":1, |
4 | 4 | "version_min":300000, |
5 | | - "title":"Testing Variables :: FILES (1/1)", |
| 5 | + "title":"Testing Variables :: FILES (1/2)", |
6 | 6 | "client":{ |
7 | 7 | "ip":"200.249.12.31", |
8 | 8 | "port":123 |
|
57 | 57 | "SecRuleEngine On", |
58 | 58 | "SecRule FILES \"@contains small_text_file.txt\" \"id:1,phase:3,pass,t:trim\"" |
59 | 59 | ] |
| 60 | + }, |
| 61 | + { |
| 62 | + "enabled":1, |
| 63 | + "version_min":300000, |
| 64 | + "title":"Testing Variables :: FILES (2/2)", |
| 65 | + "client":{ |
| 66 | + "ip":"200.249.12.31", |
| 67 | + "port":123 |
| 68 | + }, |
| 69 | + "server":{ |
| 70 | + "ip":"200.249.12.31", |
| 71 | + "port":80 |
| 72 | + }, |
| 73 | + "request":{ |
| 74 | + "headers":{ |
| 75 | + "Host":"localhost", |
| 76 | + "User-Agent":"curl/7.38.0", |
| 77 | + "Accept":"*/*", |
| 78 | + "Content-Length":"330", |
| 79 | + "Content-Type":"multipart/form-data; boundary=--------------------------756b6d74fa1a8ee2", |
| 80 | + "Expect":"100-continue" |
| 81 | + }, |
| 82 | + "uri":"/", |
| 83 | + "method":"POST", |
| 84 | + "body":[ |
| 85 | + "----------------------------756b6d74fa1a8ee2", |
| 86 | + "Content-Disposition: form-data; name=\"name\"", |
| 87 | + "", |
| 88 | + "test", |
| 89 | + "----------------------------756b6d74fa1a8ee2", |
| 90 | + "Content-Disposition: form-data; name=\"filedata1\"; filename=\"myfile.txt\"", |
| 91 | + "Content-Type: text/plain", |
| 92 | + "", |
| 93 | + "This is a very small test file..", |
| 94 | + "----------------------------756b6d74fa1a8ee2", |
| 95 | + "Content-Disposition: form-data; name=\"filedata2\"; filename=\"nextfile.txt\"", |
| 96 | + "Content-Type: text/plain", |
| 97 | + "", |
| 98 | + "This is another very small test file..", |
| 99 | + "----------------------------756b6d74fa1a8ee2--" |
| 100 | + ] |
| 101 | + }, |
| 102 | + "response":{ |
| 103 | + "headers":{ |
| 104 | + "Date":"Mon, 13 Jul 2015 20:02:41 GMT", |
| 105 | + "Last-Modified":"Sun, 26 Oct 2014 22:33:37 GMT", |
| 106 | + "Content-Type":"text/html" |
| 107 | + }, |
| 108 | + "body":[ |
| 109 | + "no need." |
| 110 | + ] |
| 111 | + }, |
| 112 | + "expected":{ |
| 113 | + "http_code": 403 |
| 114 | + }, |
| 115 | + "rules":[ |
| 116 | + "SecRuleEngine On", |
| 117 | + "SecRule FILES:filedata1 \"@contains myfile.txt\" \"id:1,phase:2,deny,status:403\"" |
| 118 | + ] |
60 | 119 | } |
61 | 120 | ] |
0 commit comments