diff options
| author | Ben Fuhrmannek | 2014-09-22 18:51:57 +0200 |
|---|---|---|
| committer | Ben Fuhrmannek | 2014-09-22 18:51:57 +0200 |
| commit | 3a569c100c5b5c359cda16e0ac311032450df02e (patch) | |
| tree | 9a0bc533421c029daf9f2890a12220ffd5814e56 /tests | |
| parent | 17a1a8e7dbfab2e9a8a7b236b3aa2c7cc6d5c895 (diff) | |
test case for suhosin.cookie.max_vars
Diffstat (limited to 'tests')
| -rw-r--r-- | tests/filter/input_filter_cookie_max_vars.phpt | 27 |
1 files changed, 27 insertions, 0 deletions
diff --git a/tests/filter/input_filter_cookie_max_vars.phpt b/tests/filter/input_filter_cookie_max_vars.phpt new file mode 100644 index 0000000..9047df3 --- /dev/null +++ b/tests/filter/input_filter_cookie_max_vars.phpt | |||
| @@ -0,0 +1,27 @@ | |||
| 1 | --TEST-- | ||
| 2 | suhosin input filter (suhosin.cookie.max_vars) | ||
| 3 | --SKIPIF-- | ||
| 4 | <?php include "../skipif.inc"; ?> | ||
| 5 | --INI-- | ||
| 6 | suhosin.log.syslog=0 | ||
| 7 | suhosin.log.sapi=0 | ||
| 8 | suhosin.log.stdout=255 | ||
| 9 | suhosin.log.script=0 | ||
| 10 | suhosin.cookie.max_vars=3 | ||
| 11 | --COOKIE-- | ||
| 12 | a=1; b=2; c=3; d=4 | ||
| 13 | --FILE-- | ||
| 14 | <?php | ||
| 15 | var_dump($_COOKIE); | ||
| 16 | ?> | ||
| 17 | --EXPECTF-- | ||
| 18 | array(3) { | ||
| 19 | ["a"]=> | ||
| 20 | string(1) "1" | ||
| 21 | ["b"]=> | ||
| 22 | string(1) "2" | ||
| 23 | ["c"]=> | ||
| 24 | string(1) "3" | ||
| 25 | } | ||
| 26 | ALERT - configured COOKIE variable limit exceeded - dropped variable 'd' - all further COOKIE variables are dropped (attacker '%s', file '%s') | ||
| 27 | ALERT - dropped 1 request variables - (0 in GET, 0 in POST, 1 in COOKIE) (attacker 'REMOTE_ADDR not set', file '%s') | ||
