summaryrefslogtreecommitdiff
path: root/tests
diff options
context:
space:
mode:
authorStefan Esser2014-02-15 18:15:04 +0100
committerStefan Esser2014-02-15 18:15:04 +0100
commitdbbc2911832255c316c6d7145918446e7f1d7f0e (patch)
tree5f2a7a2fd2a73f4421351ad29effea34b82f20f5 /tests
parent852601dd1663239ba5907382308cb12897afa37c (diff)
Test for suhosin.upload.max_uploads
Diffstat (limited to 'tests')
-rw-r--r--tests/filter/suhosin_upload_max_uploads.phpt84
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--
2suhosin.upload.max_uploads
3--INI--
4suhosin.log.syslog=0
5suhosin.log.sapi=0
6suhosin.log.stdout=255
7suhosin.log.script=0
8suhosin.post.max_vars=5
9file_uploads=1
10suhosin.upload.max_uploads=3
11--SKIPIF--
12<?php include('skipif.inc'); ?>
13--COOKIE--
14--GET--
15--POST_RAW--
16Content-Type: multipart/form-data; boundary=---------------------------20896060251896012921717172737
17-----------------------------20896060251896012921717172737
18Content-Disposition: form-data; name="A"; filename="A"
19
20A
21-----------------------------20896060251896012921717172737
22Content-Disposition: form-data; name="B"; filename="B"
23
24B
25-----------------------------20896060251896012921717172737
26Content-Disposition: form-data; name="C"; filename="C"
27
28C
29-----------------------------20896060251896012921717172737
30Content-Disposition: form-data; name="D"; filename="D"
31
32D
33-----------------------------20896060251896012921717172737
34Content-Disposition: form-data; name="E"; filename="E"
35
36E
37-----------------------------20896060251896012921717172737--
38--FILE--
39<?php
40var_dump($_FILES);
41?>
42--EXPECTF--
43array(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}
84ALERT - configured fileupload limit exceeded - file dropped (attacker 'REMOTE_ADDR not set', file '%s') \ No newline at end of file