summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--tests/filter/input_filter_request_max_totalname_length.phpt85
1 files changed, 85 insertions, 0 deletions
diff --git a/tests/filter/input_filter_request_max_totalname_length.phpt b/tests/filter/input_filter_request_max_totalname_length.phpt
new file mode 100644
index 0000000..f028db1
--- /dev/null
+++ b/tests/filter/input_filter_request_max_totalname_length.phpt
@@ -0,0 +1,85 @@
1--TEST--
2suhosin input filter (suhosin.request.max_totalname_length)
3--INI--
4suhosin.log.syslog=0
5suhosin.log.sapi=0
6suhosin.log.stdout=255
7suhosin.log.script=0
8suhosin.request.max_totalname_length=7
9--SKIPIF--
10<?php include('skipif.inc'); ?>
11--COOKIE--
12var=0;var1=1;var2[]=2;var3[xxx]=3;var04=4;var05[]=5;var06[xxx]=6;
13--GET--
14var=0&var1=1&var2[]=2&var3[xxx]=3&var04=4&var05[]=5&var06[xxx]=6&
15--POST--
16var=0&var1=1&var2[]=2&var3[xxx]=3&var04=4&var05[]=5&var06[xxx]=6&
17--FILE--
18<?php
19var_dump($_GET);
20var_dump($_POST);
21var_dump($_COOKIE);
22?>
23--EXPECTF--
24array(5) {
25 ["var"]=>
26 string(1) "0"
27 ["var1"]=>
28 string(1) "1"
29 ["var2"]=>
30 array(1) {
31 [0]=>
32 string(1) "2"
33 }
34 ["var04"]=>
35 string(1) "4"
36 ["var05"]=>
37 array(1) {
38 [0]=>
39 string(1) "5"
40 }
41}
42array(5) {
43 ["var"]=>
44 string(1) "0"
45 ["var1"]=>
46 string(1) "1"
47 ["var2"]=>
48 array(1) {
49 [0]=>
50 string(1) "2"
51 }
52 ["var04"]=>
53 string(1) "4"
54 ["var05"]=>
55 array(1) {
56 [0]=>
57 string(1) "5"
58 }
59}
60array(5) {
61 ["var"]=>
62 string(1) "0"
63 ["var1"]=>
64 string(1) "1"
65 ["var2"]=>
66 array(1) {
67 [0]=>
68 string(1) "2"
69 }
70 ["var04"]=>
71 string(1) "4"
72 ["var05"]=>
73 array(1) {
74 [0]=>
75 string(1) "5"
76 }
77}
78ALERT - configured request variable total name length limit exceeded - dropped variable 'var3[xxx]' (attacker 'REMOTE_ADDR not set', file '%s')
79ALERT - configured request variable total name length limit exceeded - dropped variable 'var06[xxx]' (attacker 'REMOTE_ADDR not set', file '%s')
80ALERT - configured request variable total name length limit exceeded - dropped variable 'var3[xxx]' (attacker 'REMOTE_ADDR not set', file '%s')
81ALERT - configured request variable total name length limit exceeded - dropped variable 'var06[xxx]' (attacker 'REMOTE_ADDR not set', file '%s')
82ALERT - configured request variable total name length limit exceeded - dropped variable 'var3[xxx]' (attacker 'REMOTE_ADDR not set', file '%s')
83ALERT - configured request variable total name length limit exceeded - dropped variable 'var06[xxx]' (attacker 'REMOTE_ADDR not set', file '%s')
84ALERT - dropped 6 request variables - (2 in GET, 2 in POST, 2 in COOKIE) (attacker 'REMOTE_ADDR not set', file '%s')
85