diff options
Diffstat (limited to 'tests/include/include_nul_in_filename.phpt')
| -rw-r--r-- | tests/include/include_nul_in_filename.phpt | 23 |
1 files changed, 23 insertions, 0 deletions
diff --git a/tests/include/include_nul_in_filename.phpt b/tests/include/include_nul_in_filename.phpt new file mode 100644 index 0000000..05c2823 --- /dev/null +++ b/tests/include/include_nul_in_filename.phpt | |||
| @@ -0,0 +1,23 @@ | |||
| 1 | --TEST-- | ||
| 2 | Testing include of filename including ASCIIZ character | ||
| 3 | --DESCRIPTION-- | ||
| 4 | |||
| 5 | This test will only trigger the PHP internal protection. | ||
| 6 | If this test case ever breaks then PHP has failed and hopefully Suhosin has kicked in. | ||
| 7 | |||
| 8 | --SKIPIF-- | ||
| 9 | <?php include "../skipifcli.inc"; ?> | ||
| 10 | --INI-- | ||
| 11 | suhosin.log.syslog=0 | ||
| 12 | suhosin.log.sapi=255 | ||
| 13 | suhosin.log.script=0 | ||
| 14 | suhosin.log.phpscript=0 | ||
| 15 | suhosin.executor.include.whitelist= | ||
| 16 | suhosin.executor.include.blacklist= | ||
| 17 | --FILE-- | ||
| 18 | <?php | ||
| 19 | $filename1 = "AAAA".chr(0)."AAAA"; | ||
| 20 | include $filename1; | ||
| 21 | ?> | ||
| 22 | --EXPECTF-- | ||
| 23 | Warning: include(): Failed opening 'AAAA' for inclusion (include_path='%s') in %s on line 3 \ No newline at end of file | ||
