summaryrefslogtreecommitdiff
path: root/tests/include/include_nul_in_filename.phpt
diff options
context:
space:
mode:
Diffstat (limited to 'tests/include/include_nul_in_filename.phpt')
-rw-r--r--tests/include/include_nul_in_filename.phpt23
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--
2Testing include of filename including ASCIIZ character
3--DESCRIPTION--
4
5This test will only trigger the PHP internal protection.
6If 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--
11suhosin.log.syslog=0
12suhosin.log.sapi=255
13suhosin.log.script=0
14suhosin.log.phpscript=0
15suhosin.executor.include.whitelist=
16suhosin.executor.include.blacklist=
17--FILE--
18<?php
19$filename1 = "AAAA".chr(0)."AAAA";
20include $filename1;
21?>
22--EXPECTF--
23Warning: include(): Failed opening 'AAAA' for inclusion (include_path='%s') in %s on line 3 \ No newline at end of file