summaryrefslogtreecommitdiff
path: root/src/tests/disabled_functions_nul_byte.phpt
diff options
context:
space:
mode:
Diffstat (limited to 'src/tests/disabled_functions_nul_byte.phpt')
-rw-r--r--src/tests/disabled_functions_nul_byte.phpt15
1 files changed, 15 insertions, 0 deletions
diff --git a/src/tests/disabled_functions_nul_byte.phpt b/src/tests/disabled_functions_nul_byte.phpt
new file mode 100644
index 0000000..95e87de
--- /dev/null
+++ b/src/tests/disabled_functions_nul_byte.phpt
@@ -0,0 +1,15 @@
1--TEST--
2Disable functions with nul byte
3--SKIPIF--
4<?php if (!extension_loaded("snuffleupagus")) die "skip"; ?>
5--INI--
6sp.configuration_file={PWD}/config/config_disabled_functions_nul_byte.ini
7--FILE--
8<?php
9system("\0id");
10system("id");
11
12?>
13--EXPECTF--
14[snuffleupagus][0.0.0.0][disabled_function][drop] The call to the function 'system' in %a/tests/disabled_functions_nul_byte.php:2 has been disabled, because its argument 'command' content (0id) matched a rule.
15[snuffleupagus][0.0.0.0][disabled_function][drop] The call to the function 'system' in %a/tests/disabled_functions_nul_byte.php:3 has been disabled, because its argument 'command' content (id) matched a rule. \ No newline at end of file