diff options
| author | Stefan Esser | 2014-02-15 18:15:04 +0100 |
|---|---|---|
| committer | Stefan Esser | 2014-02-15 18:15:04 +0100 |
| commit | dbbc2911832255c316c6d7145918446e7f1d7f0e (patch) | |
| tree | 5f2a7a2fd2a73f4421351ad29effea34b82f20f5 /tests | |
| parent | 852601dd1663239ba5907382308cb12897afa37c (diff) | |
Test for suhosin.upload.max_uploads
Diffstat (limited to 'tests')
| -rw-r--r-- | tests/filter/suhosin_upload_max_uploads.phpt | 84 |
1 files changed, 84 insertions, 0 deletions
diff --git a/tests/filter/suhosin_upload_max_uploads.phpt b/tests/filter/suhosin_upload_max_uploads.phpt new file mode 100644 index 0000000..2e984bc --- /dev/null +++ b/tests/filter/suhosin_upload_max_uploads.phpt | |||
| @@ -0,0 +1,84 @@ | |||
| 1 | --TEST-- | ||
| 2 | suhosin.upload.max_uploads | ||
| 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 | suhosin.upload.max_uploads=3 | ||
| 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"; filename="A" | ||
| 19 | |||
| 20 | A | ||
| 21 | -----------------------------20896060251896012921717172737 | ||
| 22 | Content-Disposition: form-data; name="B"; filename="B" | ||
| 23 | |||
| 24 | B | ||
| 25 | -----------------------------20896060251896012921717172737 | ||
| 26 | Content-Disposition: form-data; name="C"; filename="C" | ||
| 27 | |||
| 28 | C | ||
| 29 | -----------------------------20896060251896012921717172737 | ||
| 30 | Content-Disposition: form-data; name="D"; filename="D" | ||
| 31 | |||
| 32 | D | ||
| 33 | -----------------------------20896060251896012921717172737 | ||
| 34 | Content-Disposition: form-data; name="E"; filename="E" | ||
| 35 | |||
| 36 | E | ||
| 37 | -----------------------------20896060251896012921717172737-- | ||
| 38 | --FILE-- | ||
| 39 | <?php | ||
| 40 | var_dump($_FILES); | ||
| 41 | ?> | ||
| 42 | --EXPECTF-- | ||
| 43 | array(3) { | ||
| 44 | ["A"]=> | ||
| 45 | array(5) { | ||
| 46 | ["name"]=> | ||
| 47 | string(1) "A" | ||
| 48 | ["type"]=> | ||
| 49 | string(0) "" | ||
| 50 | ["tmp_name"]=> | ||
| 51 | string(%d) "%s" | ||
| 52 | ["error"]=> | ||
| 53 | int(0) | ||
| 54 | ["size"]=> | ||
| 55 | int(1) | ||
| 56 | } | ||
| 57 | ["B"]=> | ||
| 58 | array(5) { | ||
| 59 | ["name"]=> | ||
| 60 | string(1) "B" | ||
| 61 | ["type"]=> | ||
| 62 | string(0) "" | ||
| 63 | ["tmp_name"]=> | ||
| 64 | string(%d) "%s" | ||
| 65 | ["error"]=> | ||
| 66 | int(0) | ||
| 67 | ["size"]=> | ||
| 68 | int(1) | ||
| 69 | } | ||
| 70 | ["C"]=> | ||
| 71 | array(5) { | ||
| 72 | ["name"]=> | ||
| 73 | string(1) "C" | ||
| 74 | ["type"]=> | ||
| 75 | string(0) "" | ||
| 76 | ["tmp_name"]=> | ||
| 77 | string(%d) "%s" | ||
| 78 | ["error"]=> | ||
| 79 | int(0) | ||
| 80 | ["size"]=> | ||
| 81 | int(1) | ||
| 82 | } | ||
| 83 | } | ||
| 84 | ALERT - configured fileupload limit exceeded - file dropped (attacker 'REMOTE_ADDR not set', file '%s') \ No newline at end of file | ||
