Annotation of embedaddon/php/tests/basic/bug55500.phpt, revision 1.1.1.1
1.1 misho 1: --TEST--
2: Bug #55500 (Corrupted $_FILES indices lead to security concern)
3: --INI--
4: file_uploads=1
5: error_reporting=E_ALL&~E_NOTICE
6: upload_max_filesize=1024
7: max_file_uploads=10
8: --POST_RAW--
9: Content-Type: multipart/form-data; boundary=---------------------------20896060251896012921717172737
10: -----------------------------20896060251896012921717172737
11: Content-Disposition: form-data; name="file[]"; filename="file1.txt"
12: Content-Type: text/plain-file1
13:
14: 1
15: -----------------------------20896060251896012921717172737
16: Content-Disposition: form-data; name="file[[type]"; filename="file2.txt"
17: Content-Type: text/plain-file2
18:
19: 2
20: -----------------------------20896060251896012921717172737
21: Content-Disposition: form-data; name="file[[name]"; filename="file3.txt"
22: Content-Type: text/plain-file3
23:
24: 3
25: -----------------------------20896060251896012921717172737
26: Content-Disposition: form-data; name="file[name]["; filename="file4.txt"
27: Content-Type: text/plain-file3
28:
29: 4
30: -----------------------------20896060251896012921717172737--
31: --FILE--
32: <?php
33: var_dump($_FILES);
34: var_dump($_POST);
35: ?>
36: --EXPECTF--
37: array(1) {
38: [%u|b%"file"]=>
39: array(5) {
40: [%u|b%"name"]=>
41: array(1) {
42: [0]=>
43: %unicode|string%(9) "file1.txt"
44: }
45: [%u|b%"type"]=>
46: array(1) {
47: [0]=>
48: %unicode|string%(16) "text/plain-file1"
49: }
50: [%u|b%"tmp_name"]=>
51: array(1) {
52: [0]=>
53: %unicode|string%(%d) "%s"
54: }
55: [%u|b%"error"]=>
56: array(1) {
57: [0]=>
58: int(0)
59: }
60: [%u|b%"size"]=>
61: array(1) {
62: [0]=>
63: int(1)
64: }
65: }
66: }
67: array(0) {
68: }
FreeBSD-CVSweb <freebsd-cvsweb@FreeBSD.org>