summaryrefslogtreecommitdiff
path: root/tests/include/include_allow_writable_files_on.phpt
blob: 87706993bb6d89e86cb3040e8f3d120a10db42df (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
--TEST--
Testing suhosin.executor.include.allow_writable_files=On
--SKIPIF--
<?php include "../skipifcli.inc"; ?>
--INI--
suhosin.log.syslog=0
suhosin.log.sapi=255
suhosin.log.script=0
suhosin.log.phpscript=0
suhosin.executor.include.whitelist=
suhosin.executor.include.blacklist=
suhosin.executor.include.allow_writable_files=On
--FILE--
<?php
$filename1 = tempnam(sys_get_temp_dir(), "suhosintestf1");
$filename2 = tempnam(sys_get_temp_dir(), "suhosintestf2");
file_put_contents($filename1, "<?php echo \"AAAA\\n\";");
file_put_contents($filename2, "<?php echo \"BBBB\\n\";");
chmod($filename1, 0400);
chmod($filename2, 0600);
include $filename1;
include $filename2;
chmod($filename1, 0600);
unlink($filename1);
unlink($filename2);
?>
--EXPECTF--
AAAA
BBBB