summaryrefslogtreecommitdiff
path: root/src/tests/disable_function/disabled_functions_shell_exec_opcache_preload.phpt
diff options
context:
space:
mode:
authorBen Fuhrmannek2021-12-14 15:25:31 +0100
committerBen Fuhrmannek2021-12-14 15:25:31 +0100
commitc3fddfecfab29504097932184389a94251991bc7 (patch)
treeaed5a7cf688c743ca9cb6e26cfbfe1e3b8fd9113 /src/tests/disable_function/disabled_functions_shell_exec_opcache_preload.phpt
parenta5dcbb8cb802ba18e618ca38ea8e6acbf8b133ff (diff)
test cases for testing edge cases, eval and cmd execution
Diffstat (limited to 'src/tests/disable_function/disabled_functions_shell_exec_opcache_preload.phpt')
-rw-r--r--src/tests/disable_function/disabled_functions_shell_exec_opcache_preload.phpt18
1 files changed, 18 insertions, 0 deletions
diff --git a/src/tests/disable_function/disabled_functions_shell_exec_opcache_preload.phpt b/src/tests/disable_function/disabled_functions_shell_exec_opcache_preload.phpt
new file mode 100644
index 0000000..3e43a14
--- /dev/null
+++ b/src/tests/disable_function/disabled_functions_shell_exec_opcache_preload.phpt
@@ -0,0 +1,18 @@
1--TEST--
2Disable functions - shell_exec via opcache.preload
3--SKIPIF--
4<?php if (!extension_loaded("snuffleupagus")) print "skip"; ?>
5<?php if (PHP_VERSION_ID < 70400) print "skip"; ?>
6--EXTENSIONS--
7opcache
8--INI--
9sp.configuration_file={PWD}/config/disabled_functions_extra.ini
10allow_url_include=1
11opcache.enable=1
12opcache.enable_cli=1
13opcache.preload=data://text/plain,%3C%3Fphp+shell_exec%28%22ls%22%29%3B
14--FILE--
15<?php
16?>
17--EXPECTF--
18Fatal error: [snuffleupagus][0.0.0.0][disabled_function][drop] Aborted execution on call of the function 'shell_exec', %a matched a rule in data%a line 1