From c3fddfecfab29504097932184389a94251991bc7 Mon Sep 17 00:00:00 2001 From: Ben Fuhrmannek Date: Tue, 14 Dec 2021 15:25:31 +0100 Subject: test cases for testing edge cases, eval and cmd execution --- .../disabled_functions_shell_exec_opcache_preload.phpt | 18 ++++++++++++++++++ 1 file changed, 18 insertions(+) create mode 100644 src/tests/disable_function/disabled_functions_shell_exec_opcache_preload.phpt (limited to 'src/tests/disable_function/disabled_functions_shell_exec_opcache_preload.phpt') 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 @@ +--TEST-- +Disable functions - shell_exec via opcache.preload +--SKIPIF-- + + +--EXTENSIONS-- +opcache +--INI-- +sp.configuration_file={PWD}/config/disabled_functions_extra.ini +allow_url_include=1 +opcache.enable=1 +opcache.enable_cli=1 +opcache.preload=data://text/plain,%3C%3Fphp+shell_exec%28%22ls%22%29%3B +--FILE-- + +--EXPECTF-- +Fatal 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 -- cgit v1.3 From 8b1fc7ce30ca6886bb2957d6bd8b59ee6580b5ce Mon Sep 17 00:00:00 2001 From: Ben Fuhrmannek Date: Wed, 5 Jan 2022 19:21:13 +0100 Subject: fix test case for php7 --- .../disable_function/disabled_functions_shell_exec_opcache_preload.phpt | 1 + 1 file changed, 1 insertion(+) (limited to 'src/tests/disable_function/disabled_functions_shell_exec_opcache_preload.phpt') 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 index 3e43a14..14e5d0d 100644 --- a/src/tests/disable_function/disabled_functions_shell_exec_opcache_preload.phpt +++ b/src/tests/disable_function/disabled_functions_shell_exec_opcache_preload.phpt @@ -11,6 +11,7 @@ allow_url_include=1 opcache.enable=1 opcache.enable_cli=1 opcache.preload=data://text/plain,%3C%3Fphp+shell_exec%28%22ls%22%29%3B +opcache.preload_user=nobody --FILE-- -- cgit v1.3 From 046e39bd4a41cc2c509d975dc6cbf9ca6e49dfbc Mon Sep 17 00:00:00 2001 From: Ben Fuhrmannek Date: Tue, 11 Jan 2022 17:54:19 +0100 Subject: handle opcache test case failure --- .../disable_function/disabled_functions_shell_exec_opcache_preload.phpt | 2 ++ 1 file changed, 2 insertions(+) (limited to 'src/tests/disable_function/disabled_functions_shell_exec_opcache_preload.phpt') 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 index 14e5d0d..7e076ae 100644 --- a/src/tests/disable_function/disabled_functions_shell_exec_opcache_preload.phpt +++ b/src/tests/disable_function/disabled_functions_shell_exec_opcache_preload.phpt @@ -2,9 +2,11 @@ Disable functions - shell_exec via opcache.preload --SKIPIF-- + --EXTENSIONS-- opcache +--XFAIL-- --INI-- sp.configuration_file={PWD}/config/disabled_functions_extra.ini allow_url_include=1 -- cgit v1.3