Created
October 8, 2020 06:59
-
-
Save airween/fc691ebfd73c25f1ae3f7f458962fd3e to your computer and use it in GitHub Desktop.
Regression test file patch for request-body-parser-multipart.json
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
diff --git a/test/test-cases/regression/request-body-parser-multipart.json b/test/test-cases/regression/request-body-parser-multipart.json | |
index c9fc14dd..0509dfc7 100644 | |
--- a/test/test-cases/regression/request-body-parser-multipart.json | |
+++ b/test/test-cases/regression/request-body-parser-multipart.json | |
@@ -3239,5 +3239,60 @@ | |
"SecRuleEngine On", | |
"SecRule MULTIPART_UNMATCHED_BOUNDARY \"@eq 1\" \"phase:2,deny,id:500095\"" | |
] | |
- } | |
+ }, | |
+ { | |
+ "enabled":1, | |
+ "version_min":300000, | |
+ "title":"multipart parser (contains one valid boundary)", | |
+ "client":{ | |
+ "ip":"200.249.12.31", | |
+ "port":123 | |
+ }, | |
+ "server":{ | |
+ "ip":"200.249.12.31", | |
+ "port":80 | |
+ }, | |
+ "request":{ | |
+ "headers":{ | |
+ "Host":"localhost", | |
+ "User-Agent":"curl/7.38.0", | |
+ "Accept":"*/*", | |
+ "Content-Length":"366", | |
+ "Content-Type":"multipart/form-data; boundary=---------------------------3163850615828140691827348175", | |
+ "Expect":"100-continue" | |
+ }, | |
+ "uri":"/", | |
+ "method":"POST", | |
+ "body":[ | |
+ "-----------------------------3163850615828140691827348175\r", | |
+ "Content-Disposition: form-data; name=\"_token", | |
+ "\r", | |
+ "-----------------------------3163850615828140691827348175\r", | |
+ "Content-Disposition: form-data; name=\"_attachments[]\"; filename=\"multipart_text.txt\"\r", | |
+ "Content-Type: text/plain\r", | |
+ "\r", | |
+ "This is a content.", | |
+ "\r", | |
+ "-----------------------------3163850615828140691827348175--\r" | |
+ ] | |
+ }, | |
+ "response":{ | |
+ "headers":{ | |
+ "Date":"Mon, 13 Jul 2015 20:02:41 GMT", | |
+ "Last-Modified":"Sun, 26 Oct 2014 22:33:37 GMT", | |
+ "Content-Type":"text/html" | |
+ }, | |
+ "body":[ | |
+ "no need." | |
+ ] | |
+ }, | |
+ "expected":{ | |
+ "debug_log": "", | |
+ "http_code": 200 | |
+ }, | |
+ "rules":[ | |
+ "SecRuleEngine On", | |
+ "SecRule MULTIPART_UNMATCHED_BOUNDARY \"!@eq 0\" \"phase:2,deny,id:500095\"" | |
+ ] | |
+ } | |
] |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment