summaryrefslogtreecommitdiff
path: root/src/tests/deny_writable_execution_simulation.phpt
diff options
context:
space:
mode:
authorxXx-caillou-xXx2018-08-28 14:24:29 +0200
committerjvoisin2018-08-28 12:24:29 +0000
commitaa5d6895d0ac8c6ea050a8ea55e2f8a39ddfe365 (patch)
treec640e50ab007bae3a2fd55ca05bc13c73e293c69 /src/tests/deny_writable_execution_simulation.phpt
parenteff2c658d37108020215f838d4c47c176ec3e050 (diff)
Use php's logging functions
This commit replace our usage of `php_log_err` with `zend_error`. This should allow administrators to display errors in the webpage, should they want to; and to properly manipulate the verbosity's level. This should close #217
Diffstat (limited to 'src/tests/deny_writable_execution_simulation.phpt')
-rw-r--r--src/tests/deny_writable_execution_simulation.phpt12
1 files changed, 8 insertions, 4 deletions
diff --git a/src/tests/deny_writable_execution_simulation.phpt b/src/tests/deny_writable_execution_simulation.phpt
index d1ccb7c..7f3546a 100644
--- a/src/tests/deny_writable_execution_simulation.phpt
+++ b/src/tests/deny_writable_execution_simulation.phpt
@@ -32,10 +32,6 @@ chmod("$dir/non_writable_file.txt", 0400);
32include "$dir/writable_file.txt"; 32include "$dir/writable_file.txt";
33include "$dir/non_writable_file.txt"; 33include "$dir/non_writable_file.txt";
34?> 34?>
35--EXPECTF--
36[snuffleupagus][0.0.0.0][readonly_exec][simulation] Attempted execution of a writable file (%a/writable_file.txt).
37Code execution within a writable file.
38Code execution within a non-writable file.
39--CLEAN-- 35--CLEAN--
40<?php 36<?php
41$dir = __DIR__; 37$dir = __DIR__;
@@ -44,3 +40,11 @@ chmod("$dir/writable_file.txt", 0777);
44unlink("$dir/non_writable_file.txt"); 40unlink("$dir/non_writable_file.txt");
45unlink("$dir/writable_file.txt"); 41unlink("$dir/writable_file.txt");
46?> 42?>
43--EXPECTF--
44Warning: [snuffleupagus][readonly_exec] Attempted execution of a writable file (%a/src/tests/deny_writable_execution_simulation.php). in %a/src/tests/deny_writable_execution_simulation.php on line 2
45
46Warning: [snuffleupagus][readonly_exec] Attempted execution of a writable file (%a/src/tests/writable_file.txt). in %a/src/tests/deny_writable_execution_simulation.php on line 12
47
48Warning: [snuffleupagus][readonly_exec] Attempted execution of a writable file (%a/src/tests/writable_file.txt). in %a/src/tests/writable_file.txt on line 1
49Code execution within a writable file.
50Code execution within a non-writable file.