diff options
| author | Ben Fuhrmannek | 2021-12-14 15:25:31 +0100 |
|---|---|---|
| committer | Ben Fuhrmannek | 2021-12-14 15:25:31 +0100 |
| commit | c3fddfecfab29504097932184389a94251991bc7 (patch) | |
| tree | aed5a7cf688c743ca9cb6e26cfbfe1e3b8fd9113 /src/tests/disable_function/disabled_functions_shell_exec_closure2.phpt | |
| parent | a5dcbb8cb802ba18e618ca38ea8e6acbf8b133ff (diff) | |
test cases for testing edge cases, eval and cmd execution
Diffstat (limited to 'src/tests/disable_function/disabled_functions_shell_exec_closure2.phpt')
| -rw-r--r-- | src/tests/disable_function/disabled_functions_shell_exec_closure2.phpt | 14 |
1 files changed, 14 insertions, 0 deletions
diff --git a/src/tests/disable_function/disabled_functions_shell_exec_closure2.phpt b/src/tests/disable_function/disabled_functions_shell_exec_closure2.phpt new file mode 100644 index 0000000..fac6031 --- /dev/null +++ b/src/tests/disable_function/disabled_functions_shell_exec_closure2.phpt | |||
| @@ -0,0 +1,14 @@ | |||
| 1 | --TEST-- | ||
| 2 | Disable functions - shell_exec via 1st class closure | ||
| 3 | --SKIPIF-- | ||
| 4 | <?php if (!extension_loaded("snuffleupagus")) print "skip"; ?> | ||
| 5 | <?php if (PHP_VERSION_ID < 80100) print "skip"; ?> | ||
| 6 | --INI-- | ||
| 7 | sp.configuration_file={PWD}/config/disabled_functions_extra.ini | ||
| 8 | --FILE-- | ||
| 9 | <?php | ||
| 10 | $x = shell_exec(...); | ||
| 11 | echo $x('ls'); | ||
| 12 | ?> | ||
| 13 | --EXPECTF-- | ||
| 14 | Fatal error: [snuffleupagus][0.0.0.0][disabled_function][drop] Aborted execution on call of the function 'shell_exec', %a matched a rule in %a.php on line 3 | ||
