Skip to content

Commit

Permalink
Add a test for #390
Browse files Browse the repository at this point in the history
  • Loading branch information
jvoisin committed May 8, 2021
1 parent db14b85 commit ad623f1
Show file tree
Hide file tree
Showing 2 changed files with 15 additions and 0 deletions.
1 change: 1 addition & 0 deletions src/tests/disable_function/config/disabled_functions.ini
Original file line number Diff line number Diff line change
Expand Up @@ -7,3 +7,4 @@ sp.disable_function.function_r("^var_dump$").drop();
sp.disable_function.function("sprintf").filename("/wrong file name").drop();
sp.disable_function.function("sprintf").filename("/wrong file name").drop();
sp.disable_function.function("eval").drop();
sp.disable_function.function("shell_exec").param("foo").value("bar").drop();
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
--TEST--
Disable functions - shell_exec, with a non-existing command
--SKIPIF--
<?php if (!extension_loaded("snuffleupagus")) print "skip"; ?>
--INI--
sp.configuration_file={PWD}/config/disabled_functions.ini
--FILE--
<?php
$gs = exec( 'foo' );
echo "YES";
?>
--EXPECTF--
%sfoo: not found
YES

0 comments on commit ad623f1

Please sign in to comment.