diff options
| author | Ben Fuhrmannek | 2015-01-27 18:34:37 +0100 |
|---|---|---|
| committer | Ben Fuhrmannek | 2015-01-27 18:34:37 +0100 |
| commit | 4085730874e1d88bb5b675633a171ae20989e45a (patch) | |
| tree | f4e3b7cd262a89abebf9e4fc006b3036b0c3e3d7 /tests/filter | |
| parent | 784331fc2217f9084a57be7cb0e153532453fefd (diff) | |
https for suhosin.filter.action + unittests
Diffstat (limited to 'tests/filter')
| -rw-r--r-- | tests/filter/filter_action_302.phpt | 22 | ||||
| -rw-r--r-- | tests/filter/filter_action_php.phpt | 24 |
2 files changed, 46 insertions, 0 deletions
diff --git a/tests/filter/filter_action_302.phpt b/tests/filter/filter_action_302.phpt new file mode 100644 index 0000000..e7bd49b --- /dev/null +++ b/tests/filter/filter_action_302.phpt | |||
| @@ -0,0 +1,22 @@ | |||
| 1 | --TEST-- | ||
| 2 | suhosin filter action: 302 redirect | ||
| 3 | --INI-- | ||
| 4 | suhosin.log.syslog=0 | ||
| 5 | suhosin.log.sapi=0 | ||
| 6 | suhosin.log.stdout=0 | ||
| 7 | suhosin.log.script=0 | ||
| 8 | suhosin.request.disallow_nul=1 | ||
| 9 | suhosin.filter.action=302,http://example.com/ | ||
| 10 | --SKIPIF-- | ||
| 11 | <?php include('../skipifcli.inc'); ?> | ||
| 12 | --CGI-- | ||
| 13 | --COOKIE-- | ||
| 14 | x=%00 | ||
| 15 | --FILE-- | ||
| 16 | <?php | ||
| 17 | echo 'this is wrong!'; | ||
| 18 | ?> | ||
| 19 | --EXPECTHEADERS-- | ||
| 20 | Status: 302 Moved Temporarily | ||
| 21 | Location: http://example.com/ | ||
| 22 | --EXPECTF-- | ||
diff --git a/tests/filter/filter_action_php.phpt b/tests/filter/filter_action_php.phpt new file mode 100644 index 0000000..0ea50d6 --- /dev/null +++ b/tests/filter/filter_action_php.phpt | |||
| @@ -0,0 +1,24 @@ | |||
| 1 | --TEST-- | ||
| 2 | suhosin filter action: fallback PHP file | ||
| 3 | --FOO-- | ||
| 4 | <?php die("FALLBACK\n"); ?> | ||
| 5 | --INI-- | ||
| 6 | suhosin.log.syslog=0 | ||
| 7 | suhosin.log.sapi=0 | ||
| 8 | suhosin.log.stdout=0 | ||
| 9 | suhosin.log.script=0 | ||
| 10 | suhosin.request.disallow_nul=1 | ||
| 11 | suhosin.filter.action=404,filter_action_php.phpt | ||
| 12 | --SKIPIF-- | ||
| 13 | <?php include('../skipifcli.inc'); ?> | ||
| 14 | --COOKIE-- | ||
| 15 | x=%00 | ||
| 16 | --FILE-- | ||
| 17 | <?php | ||
| 18 | echo 'this is wrong!'; | ||
| 19 | ?> | ||
| 20 | --EXPECTF-- | ||
| 21 | %s | ||
| 22 | %s | ||
| 23 | %s | ||
| 24 | FALLBACK \ No newline at end of file | ||
