From d4936a46b6693d374d900d45b5c1642a618148bc Mon Sep 17 00:00:00 2001 From: jvoisin Date: Sat, 4 Jul 2020 18:25:24 +0200 Subject: Add two tests related to x-forwarded-for and remote-addr --- .../disabled_functions_cidr_x_fwd_for.phpt | 16 ++++++++++++++++ .../disabled_functions_cidr_x_fwd_for_remote_addr.phpt | 17 +++++++++++++++++ 2 files changed, 33 insertions(+) create mode 100644 src/tests/disable_function/disabled_functions_cidr_x_fwd_for.phpt create mode 100644 src/tests/disable_function/disabled_functions_cidr_x_fwd_for_remote_addr.phpt (limited to 'src/tests/disable_function') diff --git a/src/tests/disable_function/disabled_functions_cidr_x_fwd_for.phpt b/src/tests/disable_function/disabled_functions_cidr_x_fwd_for.phpt new file mode 100644 index 0000000..03112c7 --- /dev/null +++ b/src/tests/disable_function/disabled_functions_cidr_x_fwd_for.phpt @@ -0,0 +1,16 @@ +--TEST-- +Disable functions - CIDR match on an x-forwarded-for +--SKIPIF-- + +--ENV-- +return << +--EXPECTF-- +Fatal error: [snuffleupagus][127.0.0.1][disabled_function] Aborted execution on call of the function 'system' in %a/disabled_functions_cidr_x_fwd_for.php on line 2 diff --git a/src/tests/disable_function/disabled_functions_cidr_x_fwd_for_remote_addr.phpt b/src/tests/disable_function/disabled_functions_cidr_x_fwd_for_remote_addr.phpt new file mode 100644 index 0000000..9e223e8 --- /dev/null +++ b/src/tests/disable_function/disabled_functions_cidr_x_fwd_for_remote_addr.phpt @@ -0,0 +1,17 @@ +--TEST-- +Disable functions - x-forwarded-for and remote-addr +--SKIPIF-- + +--ENV-- +return << +--EXPECTF-- +Fatal error: [snuffleupagus][127.0.0.2][disabled_function] Aborted execution on call of the function 'system' in %a/disabled_functions_cidr_x_fwd_for_remote_addr.php on line 2 -- cgit v1.3