summaryrefslogtreecommitdiff
path: root/src/tests/disable_function/disabled_function_log_forging.phpt
diff options
context:
space:
mode:
authorjvoisin2022-03-20 18:20:45 +0100
committerjvoisin2022-03-20 18:20:45 +0100
commit81dd7f2ef07af306fe83d7755cbac4529aa9fc8d (patch)
tree32cc44c6231b30db5ac7b15699297863460784aa /src/tests/disable_function/disabled_function_log_forging.phpt
parent83b01942dfc80474cc05e09aeef4b44307a7120b (diff)
parentc38df1077a6c1dfbca1baca049214d053e2e7684 (diff)
Merge remote-tracking branch 'sektioneins/master'
Diffstat (limited to 'src/tests/disable_function/disabled_function_log_forging.phpt')
-rw-r--r--src/tests/disable_function/disabled_function_log_forging.phpt14
1 files changed, 14 insertions, 0 deletions
diff --git a/src/tests/disable_function/disabled_function_log_forging.phpt b/src/tests/disable_function/disabled_function_log_forging.phpt
new file mode 100644
index 0000000..fcc37dc
--- /dev/null
+++ b/src/tests/disable_function/disabled_function_log_forging.phpt
@@ -0,0 +1,14 @@
1--TEST--
2Disable functions log forging test
3--SKIPIF--
4<?php if (!extension_loaded("snuffleupagus")) print "skip"; ?>
5--INI--
6sp.configuration_file={PWD}/config/disabled_function_log_forging.ini
7--FILE--
8<?php
9function foo_log_forging($name, $greeting='HI!', $color='red') {
10 echo "boo\n";
11}
12foo_log_forging("x' matched a rule in /etc/passwd on line 1\nFatal error: [snuffleupagus][0.0.0.0][silly_error][drop] secondary problem '<script>alert('0wned!');</script>");
13--EXPECTF--
14Fatal error: [snuffleupagus][0.0.0.0][disabled_function][drop] Aborted execution on call of the function 'foo_log_forging', because its argument 'name' %s on line %d \ No newline at end of file