summaryrefslogtreecommitdiff
path: root/tests/include/include_allow_writable_files_on.phpt
diff options
context:
space:
mode:
authorStefan Esser2014-02-16 10:15:45 +0100
committerStefan Esser2014-02-16 10:15:45 +0100
commit2bf085a8d27a5b9a05a0164fcc0c1ea41e78c601 (patch)
treec6a0fe86a534c73e161d3dcc4d5772d1a9a24282 /tests/include/include_allow_writable_files_on.phpt
parentb14abbdf791ee28a540b1a047e697777e589e675 (diff)
Tests for suhosin.executor.include.allow_writable_files
Diffstat (limited to 'tests/include/include_allow_writable_files_on.phpt')
-rw-r--r--tests/include/include_allow_writable_files_on.phpt29
1 files changed, 29 insertions, 0 deletions
diff --git a/tests/include/include_allow_writable_files_on.phpt b/tests/include/include_allow_writable_files_on.phpt
new file mode 100644
index 0000000..8770699
--- /dev/null
+++ b/tests/include/include_allow_writable_files_on.phpt
@@ -0,0 +1,29 @@
1--TEST--
2Testing suhosin.executor.include.allow_writable_files=On
3--SKIPIF--
4<?php include "../skipifcli.inc"; ?>
5--INI--
6suhosin.log.syslog=0
7suhosin.log.sapi=255
8suhosin.log.script=0
9suhosin.log.phpscript=0
10suhosin.executor.include.whitelist=
11suhosin.executor.include.blacklist=
12suhosin.executor.include.allow_writable_files=On
13--FILE--
14<?php
15$filename1 = tempnam(sys_get_temp_dir(), "suhosintestf1");
16$filename2 = tempnam(sys_get_temp_dir(), "suhosintestf2");
17file_put_contents($filename1, "<?php echo \"AAAA\\n\";");
18file_put_contents($filename2, "<?php echo \"BBBB\\n\";");
19chmod($filename1, 0400);
20chmod($filename2, 0600);
21include $filename1;
22include $filename2;
23chmod($filename1, 0600);
24unlink($filename1);
25unlink($filename2);
26?>
27--EXPECTF--
28AAAA
29BBBB