Skip to content

Instantly share code, notes, and snippets.

Show Gist options
  • Save airween/a4221678b1e6e16702e0bb401c7d2b16 to your computer and use it in GitHub Desktop.
Save airween/a4221678b1e6e16702e0bb401c7d2b16 to your computer and use it in GitHub Desktop.
Regression test case for ModSecurity PR #2417
[
{
"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