|
342 | 342 | "SecRuleEngine On", |
343 | 343 | "SecRule REQBODY_ERROR \"@contains 0\" \"id:1,phase:3,pass,t:trim\"" |
344 | 344 | ] |
| 345 | + }, |
| 346 | + { |
| 347 | + "enabled":1, |
| 348 | + "version_min":300000, |
| 349 | + "title":"Testing Variables :: MULTIPART_STRICT_ERROR - IQ ", |
| 350 | + "client":{ |
| 351 | + "ip":"200.249.12.31", |
| 352 | + "port":123 |
| 353 | + }, |
| 354 | + "server":{ |
| 355 | + "ip":"200.249.12.31", |
| 356 | + "port":80 |
| 357 | + }, |
| 358 | + "request":{ |
| 359 | + "headers":{ |
| 360 | + "Host":"localhost", |
| 361 | + "User-Agent":"curl/7.38.0", |
| 362 | + "Accept":"*/*", |
| 363 | + "Content-Length":"330", |
| 364 | + "Content-Type":"multipart/form-data; boundary=--------------------------756b6d74fa1a8ee2", |
| 365 | + "Expect":"100-continue" |
| 366 | + }, |
| 367 | + "uri":"/", |
| 368 | + "method":"POST", |
| 369 | + "body":[ |
| 370 | + "----------------------------756b6d74fa1a8ee2", |
| 371 | + "Content-Disposition: form-data; name=\"name\"", |
| 372 | + "", |
| 373 | + "test", |
| 374 | + "----------------------------756b6d74fa1a8ee2", |
| 375 | + "Content-Disposition: form-data; name=file'data; filename=\"small_text_file.txt\"", |
| 376 | + "Content-Type: text/plain", |
| 377 | + "", |
| 378 | + "This is a very small test file..", |
| 379 | + "----------------------------756b6d74fa1a8ee2", |
| 380 | + "Content-Disposition: form-data; name=\"filedata\"; filename=\"small_text_file.txt\"", |
| 381 | + "Content-Type: text/plain", |
| 382 | + "", |
| 383 | + "This is another very small test file..", |
| 384 | + "----------------------------756b6d74fa1a8ee2--" |
| 385 | + ] |
| 386 | + }, |
| 387 | + "response":{ |
| 388 | + "headers":{ |
| 389 | + "Date":"Mon, 13 Jul 2015 20:02:41 GMT", |
| 390 | + "Last-Modified":"Sun, 26 Oct 2014 22:33:37 GMT", |
| 391 | + "Content-Type":"text/html" |
| 392 | + }, |
| 393 | + "body":[ |
| 394 | + "no need." |
| 395 | + ] |
| 396 | + }, |
| 397 | + "expected":{ |
| 398 | + "http_code": 403, |
| 399 | + "debug_log":"Warning: invalid quoting used" |
| 400 | + }, |
| 401 | + "rules":[ |
| 402 | + "SecRuleEngine On", |
| 403 | + "SecRule MULTIPART_STRICT_ERROR \"!@eq 0\" \"id:1,phase:2,deny,status:403\"" |
| 404 | + ] |
| 405 | + }, |
| 406 | + { |
| 407 | + "enabled":1, |
| 408 | + "version_min":300000, |
| 409 | + "title":"Testing Variables :: MULTIPART_STRICT_ERROR - IQ ", |
| 410 | + "client":{ |
| 411 | + "ip":"200.249.12.31", |
| 412 | + "port":123 |
| 413 | + }, |
| 414 | + "server":{ |
| 415 | + "ip":"200.249.12.31", |
| 416 | + "port":80 |
| 417 | + }, |
| 418 | + "request":{ |
| 419 | + "headers":{ |
| 420 | + "Host":"localhost", |
| 421 | + "User-Agent":"curl/7.38.0", |
| 422 | + "Accept":"*/*", |
| 423 | + "Content-Length":"330", |
| 424 | + "Content-Type":"multipart/form-data; boundary=--------------------------756b6d74fa1a8ee2", |
| 425 | + "Expect":"100-continue" |
| 426 | + }, |
| 427 | + "uri":"/", |
| 428 | + "method":"POST", |
| 429 | + "body":[ |
| 430 | + "----------------------------756b6d74fa1a8ee2", |
| 431 | + "Content-Disposition: form-data; name=\"name\"", |
| 432 | + "", |
| 433 | + "test", |
| 434 | + "----------------------------756b6d74fa1a8ee2", |
| 435 | + "Content-Disposition: form-data; name=\"file'data\"; filename=\"small_text_file.txt\"", |
| 436 | + "Content-Type: text/plain", |
| 437 | + "", |
| 438 | + "This is a very small test file..", |
| 439 | + "----------------------------756b6d74fa1a8ee2", |
| 440 | + "Content-Disposition: form-data; name=\"filedata\"; filename=\"small_text_file.txt\"", |
| 441 | + "Content-Type: text/plain", |
| 442 | + "", |
| 443 | + "This is another very small test file..", |
| 444 | + "----------------------------756b6d74fa1a8ee2--" |
| 445 | + ] |
| 446 | + }, |
| 447 | + "response":{ |
| 448 | + "headers":{ |
| 449 | + "Date":"Mon, 13 Jul 2015 20:02:41 GMT", |
| 450 | + "Last-Modified":"Sun, 26 Oct 2014 22:33:37 GMT", |
| 451 | + "Content-Type":"text/html" |
| 452 | + }, |
| 453 | + "body":[ |
| 454 | + "no need." |
| 455 | + ] |
| 456 | + }, |
| 457 | + "expected":{ |
| 458 | + "http_code": 200 |
| 459 | + }, |
| 460 | + "rules":[ |
| 461 | + "SecRuleEngine On", |
| 462 | + "SecRule MULTIPART_INVALID_QUOTING \"!@eq 0\" \"id:1,phase:2,deny,status:403\"", |
| 463 | + "SecRule MULTIPART_STRICT_ERROR \"!@eq 0\" \"id:2,phase:2,pass\"" |
| 464 | + ] |
345 | 465 | } |
346 | 466 | ] |
347 | 467 |
|
0 commit comments