|
| 1 | +[ |
| 2 | + { |
| 3 | + "enabled": 1, |
| 4 | + "version_min": 300000, |
| 5 | + "resource": "regex-dollar-endonly", |
| 6 | + "title": "Testing Operator :: @rx --enable-regex-dollar-endonly (single-line match still blocks)", |
| 7 | + "client": { |
| 8 | + "ip": "200.249.12.31", |
| 9 | + "port": 123 |
| 10 | + }, |
| 11 | + "server": { |
| 12 | + "ip": "200.249.12.31", |
| 13 | + "port": 80 |
| 14 | + }, |
| 15 | + "request": { |
| 16 | + "headers": { |
| 17 | + "Host": "localhost", |
| 18 | + "User-Agent": "curl/7.38.0", |
| 19 | + "Accept": "*/*", |
| 20 | + "Content-Length": "0" |
| 21 | + }, |
| 22 | + "uri": "/?param1=hello%20world", |
| 23 | + "method": "GET", |
| 24 | + "body": [ |
| 25 | + "" |
| 26 | + ] |
| 27 | + }, |
| 28 | + "response": { |
| 29 | + "headers": { |
| 30 | + "Date": "Mon, 13 Jul 2015 20:02:41 GMT", |
| 31 | + "Last-Modified": "Sun, 26 Oct 2014 22:33:37 GMT", |
| 32 | + "Content-Type": "text/html", |
| 33 | + "Content-Length": "8" |
| 34 | + }, |
| 35 | + "body": [ |
| 36 | + "no need." |
| 37 | + ] |
| 38 | + }, |
| 39 | + "expected": { |
| 40 | + "debug_log": "Executing operator \"Rx\"", |
| 41 | + "http_code": 403 |
| 42 | + }, |
| 43 | + "rules": [ |
| 44 | + "SecRuleEngine On", |
| 45 | + "SecRule ARGS:param1 \"^hello.*world$\" \"id:1,phase:2,deny,log,msg:'multiline-anchor-test'\"" |
| 46 | + ] |
| 47 | + }, |
| 48 | + { |
| 49 | + "enabled": 1, |
| 50 | + "version_min": 300000, |
| 51 | + "resource": "regex-dollar-endonly", |
| 52 | + "title": "Testing Operator :: @rx --enable-regex-dollar-endonly (anchors do not span internal line breaks)", |
| 53 | + "client": { |
| 54 | + "ip": "200.249.12.31", |
| 55 | + "port": 123 |
| 56 | + }, |
| 57 | + "server": { |
| 58 | + "ip": "200.249.12.31", |
| 59 | + "port": 80 |
| 60 | + }, |
| 61 | + "request": { |
| 62 | + "headers": { |
| 63 | + "Host": "localhost", |
| 64 | + "User-Agent": "curl/7.38.0", |
| 65 | + "Accept": "*/*", |
| 66 | + "Content-Length": "0" |
| 67 | + }, |
| 68 | + "uri": "/?param1=test%0Ahello%20world%0Amore", |
| 69 | + "method": "GET", |
| 70 | + "body": [ |
| 71 | + "" |
| 72 | + ] |
| 73 | + }, |
| 74 | + "response": { |
| 75 | + "headers": { |
| 76 | + "Date": "Mon, 13 Jul 2015 20:02:41 GMT", |
| 77 | + "Last-Modified": "Sun, 26 Oct 2014 22:33:37 GMT", |
| 78 | + "Content-Type": "text/html", |
| 79 | + "Content-Length": "8" |
| 80 | + }, |
| 81 | + "body": [ |
| 82 | + "no need." |
| 83 | + ] |
| 84 | + }, |
| 85 | + "expected": { |
| 86 | + "debug_log": "Executing operator \"Rx\"", |
| 87 | + "http_code": 200 |
| 88 | + }, |
| 89 | + "rules": [ |
| 90 | + "SecRuleEngine On", |
| 91 | + "SecRule ARGS:param1 \"^hello.*world$\" \"id:1,phase:2,deny,log,msg:'multiline-anchor-test'\"" |
| 92 | + ] |
| 93 | + } |
| 94 | +] |
0 commit comments