diff options
| author | Stefan Esser | 2014-06-09 09:29:18 +0200 |
|---|---|---|
| committer | Stefan Esser | 2014-06-09 09:29:18 +0200 |
| commit | 2a4ef7b3c7bd354a30737005840f9d10f9ff858d (patch) | |
| tree | cf4470d99ef56cd39142c20a5d203da34c5c0d90 /tests | |
| parent | 134a88c1da096f787a560c43534f07b74867b9cb (diff) | |
Fix variable logging statistics outputting on every include
Diffstat (limited to 'tests')
| -rw-r--r-- | tests/filter/filter_logging_statistics.phpt | 40 |
1 files changed, 40 insertions, 0 deletions
diff --git a/tests/filter/filter_logging_statistics.phpt b/tests/filter/filter_logging_statistics.phpt new file mode 100644 index 0000000..a448d78 --- /dev/null +++ b/tests/filter/filter_logging_statistics.phpt | |||
| @@ -0,0 +1,40 @@ | |||
| 1 | --TEST-- | ||
| 2 | suhosin variable filter logging statistics | ||
| 3 | --INI-- | ||
| 4 | suhosin.log.syslog=0 | ||
| 5 | suhosin.log.sapi=0 | ||
| 6 | suhosin.log.stdout=255 | ||
| 7 | suhosin.log.script=0 | ||
| 8 | suhosin.get.max_vars=5 | ||
| 9 | error_reporting=E_ALL | ||
| 10 | --SKIPIF-- | ||
| 11 | <?php include('skipif.inc'); ?> | ||
| 12 | --COOKIE-- | ||
| 13 | --GET-- | ||
| 14 | A=A&B=B&C=C&D=D&E=E&F=F&G=G& | ||
| 15 | --POST-- | ||
| 16 | --FILE-- | ||
| 17 | <?php | ||
| 18 | $counter++; | ||
| 19 | if ($counter < 5) { | ||
| 20 | include __FILE__; | ||
| 21 | } else { | ||
| 22 | var_dump($_GET); | ||
| 23 | } | ||
| 24 | ?> | ||
| 25 | --EXPECTF-- | ||
| 26 | Notice: Undefined variable: counter in %s on line 2 | ||
| 27 | array(5) { | ||
| 28 | ["A"]=> | ||
| 29 | string(1) "A" | ||
| 30 | ["B"]=> | ||
| 31 | string(1) "B" | ||
| 32 | ["C"]=> | ||
| 33 | string(1) "C" | ||
| 34 | ["D"]=> | ||
| 35 | string(1) "D" | ||
| 36 | ["E"]=> | ||
| 37 | string(1) "E" | ||
| 38 | } | ||
| 39 | ALERT - configured GET variable limit exceeded - dropped variable 'F' - all further GET variables are dropped (attacker 'REMOTE_ADDR not set', file '%s') | ||
| 40 | ALERT - dropped 2 request variables - (2 in GET, 0 in POST, 0 in COOKIE) (attacker 'REMOTE_ADDR not set', file '%s') | ||
