1[ 2 { 3 "enabled":1, 4 "version_min":300000, 5 "title":"Tmp file retained for @inspectFile (1/2)", 6 "resource":"lua", 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":"330", 21 "Content-Type":"multipart/form-data; boundary=--------------------------756b6d74fa1a8ee2", 22 "Expect":"100-continue" 23 }, 24 "uri":"/wheee/f%20i%20l%20e%20", 25 "method":"POST", 26 "body":[ 27 "----------------------------756b6d74fa1a8ee2", 28 "Content-Disposition: form-data; name=\"name\"", 29 "", 30 "test", 31 "----------------------------756b6d74fa1a8ee2", 32 "Content-Disposition: form-data; name=\"name2\"", 33 "", 34 "test2", 35 "----------------------------756b6d74fa1a8ee2", 36 "Content-Disposition: form-data; name=\"filedata\"; filename=\"small_text_file1.txt\"", 37 "Content-Type: text/plain", 38 "", 39 "This is a very small test file..", 40 "----------------------------756b6d74fa1a8ee2", 41 "Content-Disposition: form-data; filename=\"small_text_file2.txt\"; name=\"small2.txt\" ", 42 "Content-Type: text/plain", 43 "", 44 "This is another very small test file that contains the search content abcdef..", 45 "----------------------------756b6d74fa1a8ee2--" 46 ] 47 }, 48 "expected":{ 49 "debug_log":"Returning from lua script: abcdef.*Rule returned 1", 50 "http_code":403 51 }, 52 "rules":[ 53 "SecRuleEngine On", 54 "SecRequestBodyAccess On", 55 "SecTmpSaveUploadedFiles On", 56 "SecUploadKeepFiles Off", 57 "SecUploadDir /tmp", 58 "SecTmpDir /tmp", 59 "SecRule FILES_TMPNAMES \"@inspectFile test-cases/data/inspectFile-abcdef.lua\" \"id:1,phase:2,deny,status:403\"" 60 ] 61 }, 62 { 63 "enabled":1, 64 "version_min":300000, 65 "title":"Tmp file retained for @inspectFile (2/2)", 66 "resource":"lua", 67 "client":{ 68 "ip":"200.249.12.31", 69 "port":123 70 }, 71 "server":{ 72 "ip":"200.249.12.31", 73 "port":80 74 }, 75 "request":{ 76 "headers":{ 77 "Host":"localhost", 78 "User-Agent":"curl/7.38.0", 79 "Accept":"*/*", 80 "Content-Length":"330", 81 "Content-Type":"multipart/form-data; boundary=--------------------------756b6d74fa1a8ee2", 82 "Expect":"100-continue" 83 }, 84 "uri":"/wheee/f%20i%20l%20e%20", 85 "method":"POST", 86 "body":[ 87 "----------------------------756b6d74fa1a8ee2", 88 "Content-Disposition: form-data; name=\"name\"", 89 "", 90 "test", 91 "----------------------------756b6d74fa1a8ee2", 92 "Content-Disposition: form-data; name=\"name2\"", 93 "", 94 "test2", 95 "----------------------------756b6d74fa1a8ee2", 96 "Content-Disposition: form-data; name=\"filedata\"; filename=\"small_text_file1.txt\"", 97 "Content-Type: text/plain", 98 "", 99 "This is a very small test file..", 100 "----------------------------756b6d74fa1a8ee2", 101 "Content-Disposition: form-data; filename=\"small_text_file2.txt\"; name=\"small2.txt\" ", 102 "Content-Type: text/plain", 103 "", 104 "This is another very small test file that does not contain the search content.", 105 "----------------------------756b6d74fa1a8ee2--" 106 ] 107 }, 108 "expected":{ 109 "http_code":200 110 }, 111 "rules":[ 112 "SecRuleEngine On", 113 "SecRequestBodyAccess On", 114 "SecTmpSaveUploadedFiles On", 115 "SecUploadKeepFiles Off", 116 "SecUploadDir /tmp", 117 "SecTmpDir /tmp", 118 "SecRule FILES_TMPNAMES \"@inspectFile test-cases/data/inspectFile-abcdef.lua\" \"id:1,phase:2,deny,status:403\"" 119 ] 120 } 121] 122