diff options
Diffstat (limited to 'tests')
| -rw-r--r-- | tests/filter/post_fileupload_filter_2.phpt | 64 |
1 files changed, 64 insertions, 0 deletions
diff --git a/tests/filter/post_fileupload_filter_2.phpt b/tests/filter/post_fileupload_filter_2.phpt new file mode 100644 index 0000000..48c63dc --- /dev/null +++ b/tests/filter/post_fileupload_filter_2.phpt | |||
| @@ -0,0 +1,64 @@ | |||
| 1 | --TEST-- | ||
| 2 | suhosin rfc1867 file upload filter (suhosin.post.max_vars) | ||
| 3 | --INI-- | ||
| 4 | suhosin.log.syslog=0 | ||
| 5 | suhosin.log.sapi=0 | ||
| 6 | suhosin.log.stdout=255 | ||
| 7 | suhosin.log.script=0 | ||
| 8 | suhosin.post.max_vars=5 | ||
| 9 | file_uploads=1 | ||
| 10 | upload_max_filesize=1024 | ||
| 11 | --SKIPIF-- | ||
| 12 | <?php include('skipif.inc'); ?> | ||
| 13 | --COOKIE-- | ||
| 14 | --GET-- | ||
| 15 | --POST_RAW-- | ||
| 16 | Content-Type: multipart/form-data; boundary=---------------------------20896060251896012921717172737 | ||
| 17 | -----------------------------20896060251896012921717172737 | ||
| 18 | Content-Disposition: form-data; name="A" | ||
| 19 | |||
| 20 | A | ||
| 21 | -----------------------------20896060251896012921717172737 | ||
| 22 | Content-Disposition: form-data; name="B" | ||
| 23 | |||
| 24 | B | ||
| 25 | -----------------------------20896060251896012921717172737 | ||
| 26 | Content-Disposition: form-data; name="C" | ||
| 27 | |||
| 28 | C | ||
| 29 | -----------------------------20896060251896012921717172737 | ||
| 30 | Content-Disposition: form-data; name="D" | ||
| 31 | |||
| 32 | D | ||
| 33 | -----------------------------20896060251896012921717172737 | ||
| 34 | Content-Disposition: form-data; name="E" | ||
| 35 | |||
| 36 | E | ||
| 37 | -----------------------------20896060251896012921717172737 | ||
| 38 | Content-Disposition: form-data; name="F" | ||
| 39 | |||
| 40 | F | ||
| 41 | -----------------------------20896060251896012921717172737 | ||
| 42 | Content-Disposition: form-data; name="G" | ||
| 43 | |||
| 44 | G | ||
| 45 | -----------------------------20896060251896012921717172737-- | ||
| 46 | --FILE-- | ||
| 47 | <?php | ||
| 48 | var_dump($_POST); | ||
| 49 | ?> | ||
| 50 | --EXPECTF-- | ||
| 51 | array(5) { | ||
| 52 | ["A"]=> | ||
| 53 | string(1) "A" | ||
| 54 | ["B"]=> | ||
| 55 | string(1) "B" | ||
| 56 | ["C"]=> | ||
| 57 | string(1) "C" | ||
| 58 | ["D"]=> | ||
| 59 | string(1) "D" | ||
| 60 | ["E"]=> | ||
| 61 | string(1) "E" | ||
| 62 | } | ||
| 63 | ALERT - configured POST variable limit exceeded - dropped variable 'F' - all further POST variables are dropped (attacker 'REMOTE_ADDR not set', file '%s') | ||
| 64 | ALERT - dropped 2 request variables - (0 in GET, 2 in POST, 0 in COOKIE) (attacker 'REMOTE_ADDR not set', file '%s') | ||
