From 4f496c22c953c798c5b6d2a0cf22f9ee8201a071 Mon Sep 17 00:00:00 2001 From: jvoisin Date: Fri, 19 Jun 2020 16:53:45 +0200 Subject: Fix the gitlab-ci Ubuntu runner --- src/tests/deny_writable/deny_writable_execution_simulation.phpt | 3 ++- src/tests/dump_request/dump_request_nonwriteable_folder.phpt | 1 + 2 files changed, 3 insertions(+), 1 deletion(-) (limited to 'src') diff --git a/src/tests/deny_writable/deny_writable_execution_simulation.phpt b/src/tests/deny_writable/deny_writable_execution_simulation.phpt index b03bc8f..db46718 100644 --- a/src/tests/deny_writable/deny_writable_execution_simulation.phpt +++ b/src/tests/deny_writable/deny_writable_execution_simulation.phpt @@ -2,7 +2,8 @@ Readonly execution attempt (simulation mode) --SKIPIF-- Sat, 20 Jun 2020 12:30:00 +0200 + + snuffleupagus (0.5.0) UNRELEASED; urgency=medium [ kkadosh ] diff --git a/doc/source/changelog.rst b/doc/source/changelog.rst index 55b5c7e..a72b737 100644 --- a/doc/source/changelog.rst +++ b/doc/source/changelog.rst @@ -1,6 +1,23 @@ Changelog ========= +0.5.1 - `Order of the Elephant `__ 2020/06/20 +-------------------------------------------------------------------------------------------------------------- + +New features +^^^^^^^^^^^^ +* Add support for syslog + + +Improvements +^^^^^^^^^^^^ +* Improve OSX support +* Improve marginally of php8+ compatibility +* Improve php7.4 compatibility +* Improve the default ruleset +* Improve the documentation +* Improve the gitlab CI + 0.5.0 - `Elephant Flats `__ 2019/06/12 -------------------------------------------------------------------------------------------------------------- diff --git a/src/php_snuffleupagus.h b/src/php_snuffleupagus.h index 5a02e93..b42c300 100644 --- a/src/php_snuffleupagus.h +++ b/src/php_snuffleupagus.h @@ -1,7 +1,7 @@ #ifndef PHP_SNUFFLEUPAGUS_H #define PHP_SNUFFLEUPAGUS_H -#define PHP_SNUFFLEUPAGUS_VERSION "0.5.0" +#define PHP_SNUFFLEUPAGUS_VERSION "0.5.1" #define PHP_SNUFFLEUPAGUS_EXTNAME "snuffleupagus" #define PHP_SNUFFLEUPAGUS_AUTHOR "NBS System" #define PHP_SNUFFLEUPAGUS_URL "https://github.com/jvoisin/snuffleupagus" -- cgit v1.3 From 6c7ad0c1dfcf324828be4153b86a808b35995820 Mon Sep 17 00:00:00 2001 From: jvoisin Date: Sat, 4 Jul 2020 17:37:35 +0200 Subject: Fix a syslog-related issue Previously, the syslog logging would always go to LOG_ERR no matter the severity. --- src/sp_utils.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'src') diff --git a/src/sp_utils.c b/src/sp_utils.c index 0f87f17..40cf44e 100644 --- a/src/sp_utils.c +++ b/src/sp_utils.c @@ -23,7 +23,7 @@ void sp_log_msg(char const* feature, int type, const char* fmt, ...) { case SP_SYSLOG: openlog(PHP_SNUFFLEUPAGUS_EXTNAME, LOG_PID, LOG_AUTH); const char* error_filename = zend_get_executed_filename(); - int syslog_level = SP_LOG_DROP ? LOG_ERR : LOG_INFO; + int syslog_level = (type == SP_LOG_DROP) ? LOG_ERR : LOG_INFO; int error_lineno = zend_get_executed_lineno(TSRMLS_C); syslog(syslog_level, "[snuffleupagus][%s][%s] %s in %s on line %d", client_ip, feature, msg, error_filename, error_lineno); -- cgit v1.3 From 08f21d8b878b6c1490e6d6bb3d44aa640a88e9ca Mon Sep 17 00:00:00 2001 From: jvoisin Date: Sat, 4 Jul 2020 17:56:03 +0200 Subject: Factorize how snuffleupagus gets client's ip addr --- src/sp_disabled_functions.c | 2 +- src/sp_utils.c | 20 ++++++++++++++++---- src/sp_utils.h | 1 + 3 files changed, 18 insertions(+), 5 deletions(-) (limited to 'src') diff --git a/src/sp_disabled_functions.c b/src/sp_disabled_functions.c index 4807955..a6fc194 100644 --- a/src/sp_disabled_functions.c +++ b/src/sp_disabled_functions.c @@ -327,7 +327,7 @@ static void should_disable(zend_execute_data* execute_data, } if (config_node->cidr) { - char* client_ip = getenv("REMOTE_ADDR"); + const char* client_ip = get_ipaddr(); if (client_ip && false == cidr_match(client_ip, config_node->cidr)) { goto next; } diff --git a/src/sp_utils.c b/src/sp_utils.c index 40cf44e..1bd37fe 100644 --- a/src/sp_utils.c +++ b/src/sp_utils.c @@ -7,6 +7,21 @@ bool sp_zend_string_equals(const zend_string* s1, const zend_string* s2) { !memcmp(ZSTR_VAL(s1), ZSTR_VAL(s2), ZSTR_LEN(s1)); } +static const char* default_ipaddr = "0.0.0.0"; +const char* get_ipaddr() { + const char* client_ip = getenv("REMOTE_ADDR"); + if (client_ip) { + return client_ip; + } + + const char* fwd_ip = getenv("HTTP_X_FORWARDED_FOR"); + if (fwd_ip) { + return fwd_ip; + } + + return default_ipaddr; +} + void sp_log_msg(char const* feature, int type, const char* fmt, ...) { char* msg; va_list args; @@ -15,10 +30,7 @@ void sp_log_msg(char const* feature, int type, const char* fmt, ...) { vspprintf(&msg, 0, fmt, args); va_end(args); - const char *client_ip = getenv("REMOTE_ADDR"); - if (!client_ip) { - client_ip = "0.0.0.0"; - } + const char* client_ip = get_ipaddr(); switch (SNUFFLEUPAGUS_G(config).log_media) { case SP_SYSLOG: openlog(PHP_SNUFFLEUPAGUS_EXTNAME, LOG_PID, LOG_AUTH); diff --git a/src/sp_utils.h b/src/sp_utils.h index 200e82c..6fc59e5 100644 --- a/src/sp_utils.h +++ b/src/sp_utils.h @@ -44,6 +44,7 @@ #define GET_SUFFIX(x) (x == 1) ? "st" : ((x == 2) ? "nd" : "th") +const char* get_ipaddr(); void sp_log_msg(char const *feature, int type, const char *fmt, ...); int compute_hash(const char *const filename, char *file_hash); const zend_string *sp_zval_to_zend_string(const zval *); -- cgit v1.3 From 55087da4701ddfbf4728b3670d8e46c07b4df881 Mon Sep 17 00:00:00 2001 From: jvoisin Date: Sat, 4 Jul 2020 17:58:13 +0200 Subject: Run clang-format on the codebase --- src/sp_disabled_functions.c | 2 +- src/sp_network_utils.c | 3 ++- src/sp_sloppy.c | 4 ++-- src/sp_unserialize.c | 1 - src/sp_utils.c | 4 ++-- 5 files changed, 7 insertions(+), 7 deletions(-) (limited to 'src') diff --git a/src/sp_disabled_functions.c b/src/sp_disabled_functions.c index a6fc194..c46ee58 100644 --- a/src/sp_disabled_functions.c +++ b/src/sp_disabled_functions.c @@ -357,7 +357,7 @@ static void should_disable(zend_execute_data* execute_data, #else execute_data->func->op_array.arg_info->is_variadic #endif - ){ + ) { sp_log_warn( "disable_function", "Snuffleupagus doesn't support variadic functions yet, sorry. " diff --git a/src/sp_network_utils.c b/src/sp_network_utils.c index 1811d98..dc92969 100644 --- a/src/sp_network_utils.c +++ b/src/sp_network_utils.c @@ -17,7 +17,8 @@ static inline bool cidr4_match(const struct in_addr addr, static inline bool cidr6_match(const struct in6_addr address, const struct in6_addr network, uint8_t bits) { -#if defined(__FreeBSD__) || defined(__NetBSD__) || defined(__OpenBSD__) || defined(__APPLE__) +#if defined(__FreeBSD__) || defined(__NetBSD__) || defined(__OpenBSD__) || \ + defined(__APPLE__) const uint32_t *a = address.__u6_addr.__u6_addr32; const uint32_t *n = network.__u6_addr.__u6_addr32; #else diff --git a/src/sp_sloppy.c b/src/sp_sloppy.c index 88052bb..b4212ca 100644 --- a/src/sp_sloppy.c +++ b/src/sp_sloppy.c @@ -3,8 +3,8 @@ ZEND_API zend_op_array* (*orig_zend_compile_file)(zend_file_handle* file_handle, int type) = NULL; #if PHP_VERSION_ID >= 80000 -ZEND_API zend_op_array* (*orig_zend_compile_string)(zval* source_string, - const char* filename) = NULL; +ZEND_API zend_op_array* (*orig_zend_compile_string)( + zval* source_string, const char* filename) = NULL; #else ZEND_API zend_op_array* (*orig_zend_compile_string)(zval* source_string, char* filename) = NULL; diff --git a/src/sp_unserialize.c b/src/sp_unserialize.c index f265ce6..29706c9 100644 --- a/src/sp_unserialize.c +++ b/src/sp_unserialize.c @@ -1,6 +1,5 @@ #include "php_snuffleupagus.h" - PHP_FUNCTION(sp_serialize) { zif_handler orig_handler; diff --git a/src/sp_utils.c b/src/sp_utils.c index 1bd37fe..2665c28 100644 --- a/src/sp_utils.c +++ b/src/sp_utils.c @@ -37,8 +37,8 @@ void sp_log_msg(char const* feature, int type, const char* fmt, ...) { const char* error_filename = zend_get_executed_filename(); int syslog_level = (type == SP_LOG_DROP) ? LOG_ERR : LOG_INFO; int error_lineno = zend_get_executed_lineno(TSRMLS_C); - syslog(syslog_level, "[snuffleupagus][%s][%s] %s in %s on line %d", client_ip, feature, msg, - error_filename, error_lineno); + syslog(syslog_level, "[snuffleupagus][%s][%s] %s in %s on line %d", + client_ip, feature, msg, error_filename, error_lineno); closelog(); if (type == SP_LOG_DROP) { zend_bailout(); -- cgit v1.3 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') 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 From 4e896399011737e5836f5091ada66a4191902591 Mon Sep 17 00:00:00 2001 From: jvoisin Date: Sat, 4 Jul 2020 21:36:10 +0200 Subject: Reorder some declaration So that the syslog part is tight as possible --- src/sp_utils.c | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) (limited to 'src') diff --git a/src/sp_utils.c b/src/sp_utils.c index 2665c28..e752d24 100644 --- a/src/sp_utils.c +++ b/src/sp_utils.c @@ -32,11 +32,11 @@ void sp_log_msg(char const* feature, int type, const char* fmt, ...) { const char* client_ip = get_ipaddr(); switch (SNUFFLEUPAGUS_G(config).log_media) { - case SP_SYSLOG: - openlog(PHP_SNUFFLEUPAGUS_EXTNAME, LOG_PID, LOG_AUTH); + case SP_SYSLOG: { const char* error_filename = zend_get_executed_filename(); int syslog_level = (type == SP_LOG_DROP) ? LOG_ERR : LOG_INFO; int error_lineno = zend_get_executed_lineno(TSRMLS_C); + openlog(PHP_SNUFFLEUPAGUS_EXTNAME, LOG_PID, LOG_AUTH); syslog(syslog_level, "[snuffleupagus][%s][%s] %s in %s on line %d", client_ip, feature, msg, error_filename, error_lineno); closelog(); @@ -44,6 +44,7 @@ void sp_log_msg(char const* feature, int type, const char* fmt, ...) { zend_bailout(); } break; + } case SP_ZEND: default: zend_error(type, "[snuffleupagus][%s][%s] %s", client_ip, feature, msg); -- cgit v1.3 From b849f33ba6dbfe040927b920846742d517a67bce Mon Sep 17 00:00:00 2001 From: jvoisin Date: Sat, 4 Jul 2020 22:01:53 +0200 Subject: Fix a small typo --- src/sp_utils.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'src') diff --git a/src/sp_utils.c b/src/sp_utils.c index e752d24..ed5123e 100644 --- a/src/sp_utils.c +++ b/src/sp_utils.c @@ -419,7 +419,7 @@ bool check_is_in_eval_whitelist(const zend_string* const function_name) { } /* yes, we could use a HashTable instead, but since the list is pretty - * small, it doesn't maka a difference in practise. */ + * small, it doesn't make a difference in practise. */ while (it && it->data) { if (sp_zend_string_equals(function_name, (const zend_string*)(it->data))) { /* We've got a match, the function is whiteslited. */ -- cgit v1.3 From ae96df0cae20ccb1225a0dc305b4779427506608 Mon Sep 17 00:00:00 2001 From: jvoisin Date: Wed, 8 Jul 2020 19:08:58 +0200 Subject: Add a couple of `restrict` --- src/sp_utils.c | 15 +++++++++------ src/sp_utils.h | 11 ++++++----- 2 files changed, 15 insertions(+), 11 deletions(-) (limited to 'src') diff --git a/src/sp_utils.c b/src/sp_utils.c index ed5123e..8c64b55 100644 --- a/src/sp_utils.c +++ b/src/sp_utils.c @@ -22,7 +22,8 @@ const char* get_ipaddr() { return default_ipaddr; } -void sp_log_msg(char const* feature, int type, const char* fmt, ...) { +void sp_log_msg(char const* restrict feature, int type, + const char* restrict fmt, ...) { char* msg; va_list args; @@ -52,7 +53,8 @@ void sp_log_msg(char const* feature, int type, const char* fmt, ...) { } } -int compute_hash(const char* const filename, char* file_hash) { +int compute_hash(const char* const restrict filename, + char* restrict file_hash) { unsigned char buf[1024]; unsigned char digest[SHA256_SIZE]; PHP_SHA256_CTX context; @@ -78,8 +80,9 @@ int compute_hash(const char* const filename, char* file_hash) { return SUCCESS; } -static int construct_filename(char* filename, const zend_string* folder, - const zend_string* textual) { +static int construct_filename(char* filename, + const zend_string* restrict folder, + const zend_string* restrict textual) { PHP_SHA256_CTX context; unsigned char digest[SHA256_SIZE] = {0}; char strhash[65] = {0}; @@ -103,8 +106,8 @@ static int construct_filename(char* filename, const zend_string* folder, return 0; } -int sp_log_request(const zend_string* folder, const zend_string* text_repr, - char* from) { +int sp_log_request(const zend_string* restrict folder, + const zend_string* restrict text_repr, char* from) { FILE* file; const char* current_filename = zend_get_executed_filename(TSRMLS_C); const int current_line = zend_get_executed_lineno(TSRMLS_C); diff --git a/src/sp_utils.h b/src/sp_utils.h index 6fc59e5..8d1d44a 100644 --- a/src/sp_utils.h +++ b/src/sp_utils.h @@ -44,9 +44,10 @@ #define GET_SUFFIX(x) (x == 1) ? "st" : ((x == 2) ? "nd" : "th") -const char* get_ipaddr(); -void sp_log_msg(char const *feature, int type, const char *fmt, ...); -int compute_hash(const char *const filename, char *file_hash); +const char *get_ipaddr(); +void sp_log_msg(char const *restrict feature, int type, + const char *restrict fmt, ...); +int compute_hash(const char *const restrict filename, char *restrict file_hash); const zend_string *sp_zval_to_zend_string(const zval *); bool sp_match_value(const zend_string *, const zend_string *, const sp_pcre *); bool sp_match_array_key(const zval *, const zend_string *, const sp_pcre *); @@ -58,8 +59,8 @@ void sp_log_disable_ret(const char *restrict, const zend_string *restrict, int hook_function(const char *, HashTable *, zif_handler); int hook_regexp(const sp_pcre *, HashTable *, zif_handler); bool check_is_in_eval_whitelist(const zend_string *const function_name); -int sp_log_request(const zend_string *folder, const zend_string *text_repr, - char *from); +int sp_log_request(const zend_string *restrict folder, + const zend_string *restrict text_repr, char *from); bool sp_zend_string_equals(const zend_string *s1, const zend_string *s2); #endif /* SP_UTILS_H */ -- cgit v1.3 From 05c98eb39f07bd951b6047e154db6479828e2a11 Mon Sep 17 00:00:00 2001 From: jvoisin Date: Sun, 12 Jul 2020 19:19:41 +0200 Subject: Use $_SERVER['REMOTE_ADDR'] in last resort to get the client's ip addr --- src/sp_utils.c | 18 ++++++++++++++++++ 1 file changed, 18 insertions(+) (limited to 'src') diff --git a/src/sp_utils.c b/src/sp_utils.c index 8c64b55..e5c2942 100644 --- a/src/sp_utils.c +++ b/src/sp_utils.c @@ -19,6 +19,24 @@ const char* get_ipaddr() { return fwd_ip; } + /* Some hosters (like heroku, see + * https://github.com/jvoisin/snuffleupagus/issues/336) are clearing the + * environment variables, so we don't have access to them, hence why we're + * resorting to $_SERVER['REMOTE_ADDR']. + */ + if (!Z_ISUNDEF(PG(http_globals)[TRACK_VARS_SERVER])) { + const zval* const globals_client_ip = + zend_hash_str_find(Z_ARRVAL(PG(http_globals)[TRACK_VARS_SERVER]), + "REMOTE_ADDR", sizeof("REMOTE_ADDR") - 1); + if (globals_client_ip) { + if (Z_TYPE_P(globals_client_ip) == IS_STRING) { + if (Z_STRLEN_P(globals_client_ip) != 0) { + return estrdup(Z_STRVAL_P(globals_client_ip)); + } + } + } + } + return default_ipaddr; } -- cgit v1.3 From 038ebdc27151210bc8586e361b2f2e70b76d931c Mon Sep 17 00:00:00 2001 From: jvoisin Date: Sun, 12 Jul 2020 21:21:26 +0200 Subject: More constification --- src/sp_utils.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'src') diff --git a/src/sp_utils.c b/src/sp_utils.c index e5c2942..c4354b6 100644 --- a/src/sp_utils.c +++ b/src/sp_utils.c @@ -131,7 +131,7 @@ int sp_log_request(const zend_string* restrict folder, const int current_line = zend_get_executed_lineno(TSRMLS_C); char filename[PATH_MAX] = {0}; const struct { - const char* str; + char const* const str; const int key; } zones[] = {{"GET", TRACK_VARS_GET}, {"POST", TRACK_VARS_POST}, {"COOKIE", TRACK_VARS_COOKIE}, {"SERVER", TRACK_VARS_SERVER}, -- cgit v1.3 From 043d9897b4d6879f9a91dbd0ccdb476649731f7c Mon Sep 17 00:00:00 2001 From: jvoisin Date: Sun, 12 Jul 2020 22:35:48 +0200 Subject: One more const --- src/sp_disabled_functions.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'src') diff --git a/src/sp_disabled_functions.c b/src/sp_disabled_functions.c index c46ee58..f35f5ca 100644 --- a/src/sp_disabled_functions.c +++ b/src/sp_disabled_functions.c @@ -87,7 +87,8 @@ static bool is_local_var_matching( return true; } } else { - const zend_string* var_value_str = sp_zval_to_zend_string(var_value); + zend_string const* const var_value_str = + sp_zval_to_zend_string(var_value); bool match = sp_match_value(var_value_str, config_node->value, config_node->r_value); -- cgit v1.3 From b90e0ecc6b0717786ae72236c37157f1b5983521 Mon Sep 17 00:00:00 2001 From: Giovanni Date: Tue, 21 Jul 2020 11:58:22 +0200 Subject: Fix #338 - added log type if type is simulation, drop or log. (#339) Co-authored-by: Giovanni Dante Grazioli --- src/sp_utils.c | 23 ++++++++++++++++++---- src/sp_utils.h | 4 ++-- src/tests/broken_configuration/broken_conf.phpt | 6 +++--- src/tests/broken_configuration/broken_conf2.phpt | 6 +++--- .../broken_conf_allow_broken_disabled.phpt | 6 +++--- .../broken_conf_allow_broken_enabled.phpt | 4 ++-- .../broken_conf_config_regexp.phpt | 10 +++++----- ...broken_conf_config_regexp_no_closing_paren.phpt | 10 +++++----- ...f_cookie_encryption_without_encryption_key.phpt | 8 ++++---- ...ken_conf_cookie_encryption_without_env_var.phpt | 8 ++++---- .../broken_conf_cookie_name_and_regexp.phpt | 8 ++++---- .../broken_conf_enable_disable.phpt | 6 +++--- .../broken_configuration/broken_conf_eval.phpt | 6 +++--- .../broken_conf_expecting_bool.phpt | 6 +++--- .../broken_conf_invalid_cidr.phpt | 6 +++--- .../broken_conf_invalid_cidr6.phpt | 6 +++--- .../broken_conf_invalid_cidr6_no_slash.phpt | 6 +++--- .../broken_conf_invalid_cidr_value.phpt | 10 +++++----- .../broken_conf_invalid_filename.phpt | 6 +++--- .../broken_conf_invalid_log_media.phpt | 6 +++--- .../broken_conf_invalid_type.phpt | 6 +++--- .../broken_conf_key_value.phpt | 6 +++--- .../broken_conf_line_empty_string.phpt | 6 +++--- .../broken_conf_line_no_closing.phpt | 6 +++--- .../broken_conf_local_var_1.phpt | 10 +++++----- .../broken_conf_local_var_10.phpt | 10 +++++----- .../broken_conf_local_var_11.phpt | 10 +++++----- .../broken_conf_local_var_12.phpt | 6 +++--- .../broken_conf_local_var_13.phpt | 10 +++++----- .../broken_conf_local_var_14.phpt | 10 +++++----- .../broken_conf_local_var_15.phpt | 10 +++++----- .../broken_conf_local_var_16.phpt | 10 +++++----- .../broken_conf_local_var_2.phpt | 10 +++++----- .../broken_conf_local_var_3.phpt | 10 +++++----- .../broken_conf_local_var_4.phpt | 10 +++++----- .../broken_conf_local_var_5.phpt | 10 +++++----- .../broken_conf_local_var_6.phpt | 10 +++++----- .../broken_conf_local_var_7.phpt | 10 +++++----- .../broken_conf_local_var_8.phpt | 10 +++++----- .../broken_conf_local_var_9.phpt | 10 +++++----- .../broken_conf_lots_of_quotes.phpt | 6 +++--- .../broken_conf_missing_script.phpt | 6 +++--- .../broken_conf_mutually_exclusive.phpt | 4 ++-- .../broken_conf_mutually_exclusive10.phpt | 6 +++--- .../broken_conf_mutually_exclusive11.phpt | 6 +++--- .../broken_conf_mutually_exclusive12.phpt | 6 +++--- .../broken_conf_mutually_exclusive2.phpt | 4 ++-- .../broken_conf_mutually_exclusive3.phpt | 4 ++-- .../broken_conf_mutually_exclusive4.phpt | 6 +++--- .../broken_conf_mutually_exclusive5.phpt | 4 ++-- .../broken_conf_mutually_exclusive6.phpt | 6 +++--- .../broken_conf_mutually_exclusive7.phpt | 6 +++--- .../broken_conf_mutually_exclusive8.phpt | 6 +++--- .../broken_conf_mutually_exclusive9.phpt | 6 +++--- .../broken_conf_no_cookie_action.phpt | 6 +++--- .../broken_conf_no_cookie_name.phpt | 8 ++++---- .../broken_conf_no_file_specified.phpt | 2 +- .../broken_conf_nonexisting_script.phpt | 6 +++--- .../broken_configuration/broken_conf_quotes.phpt | 10 +++++----- .../broken_conf_readonly_exec.phpt | 6 +++--- .../broken_configuration/broken_conf_samesite.phpt | 6 +++--- .../broken_conf_session_encryption.phpt | 6 +++--- ..._session_encryption_without_encryption_key.phpt | 6 +++--- ...en_conf_session_encryption_without_env_var.phpt | 6 +++--- .../broken_conf_shown_in_phpinfo.phpt | 10 +++++----- .../broken_conf_truncated.phpt | 6 +++--- .../broken_conf_unserialize.phpt | 6 +++--- .../broken_conf_upload_validation.phpt | 6 +++--- .../broken_conf_weird_keyword.phpt | 6 +++--- .../broken_conf_wrapper_whitelist.phpt | 6 +++--- .../broken_conf_wrong_quotes.phpt | 6 +++--- .../broken_conf_wrong_type.phpt | 6 +++--- .../broken_invalid_client_ip4.phpt | 2 +- src/tests/broken_configuration/broken_regexp.phpt | 10 +++++----- .../broken_unmatching_brackets.phpt | 10 +++++----- .../encrypt_regexp_cookies_bad_regexp.phpt | 6 +++--- .../encrypt_cookies_empty_env.phpt | 4 ++-- .../encrypt_cookies_invalid_decryption.phpt | 2 +- .../encrypt_cookies_invalid_decryption2.phpt | 2 +- ...pt_cookies_invalid_decryption_short_cookie.phpt | 2 +- ...rypt_cookies_invalid_decryption_simulation.phpt | 2 +- .../encrypt_regexp_cookies_empty_env.phpt | 2 +- .../encrypt_regexp_cookies_invalid_decryption.phpt | 2 +- ...encrypt_regexp_cookies_invalid_decryption2.phpt | 2 +- .../encrypt_cookies_no_env.phpt | 4 ++-- .../encrypt_cookies_no_key.phpt | 4 ++-- .../encrypt_regexp_cookies_no_env.phpt | 4 ++-- .../encrypt_regexp_cookies_no_key.phpt | 4 ++-- .../deny_writable/deny_writable_execution.phpt | 2 +- .../deny_writable_execution_simulation.phpt | 6 +++--- .../disable_function/disabled_function_echo.phpt | 2 +- .../disable_function/disabled_function_echo_2.phpt | 2 +- .../disabled_function_echo_local_var.phpt | 2 +- ...isabled_function_ensure_client_valid_certs.phpt | 2 +- ...nsure_client_valid_certs_curl_multi_setopt.phpt | 2 +- ...nsure_client_valid_certs_curl_setopt_array.phpt | 2 +- ...isabled_function_ensure_server_valid_certs.phpt | 2 +- ...nsure_server_valid_certs_curl_multi_setopt.phpt | 2 +- ...nsure_server_valid_certs_curl_setopt_array.phpt | 2 +- .../disabled_function_local_var.phpt | 2 +- .../disabled_function_local_var_10.phpt | 2 +- .../disabled_function_local_var_2.phpt | 2 +- .../disabled_function_local_var_3.phpt | 2 +- .../disabled_function_local_var_4.phpt | 2 +- .../disabled_function_local_var_5.phpt | 2 +- .../disabled_function_local_var_6.phpt | 2 +- .../disabled_function_local_var_7.phpt | 2 +- .../disabled_function_local_var_8.phpt | 2 +- .../disabled_function_local_var_9.phpt | 2 +- .../disabled_function_local_var_const.phpt | 2 +- .../disabled_function_local_var_obj.phpt | 2 +- .../disable_function/disabled_function_param.phpt | 2 +- .../disable_function/disabled_function_print.phpt | 2 +- .../disabled_function_super_global_var.phpt | 2 +- src/tests/disable_function/disabled_functions.phpt | 2 +- .../disabled_functions_callback_called_file_r.phpt | 2 +- .../disabled_functions_called_file_r.phpt | 2 +- .../disable_function/disabled_functions_chain.phpt | 2 +- .../disabled_functions_chain_call_user_func.phpt | 2 +- ...isabled_functions_chain_call_user_func_ret.phpt | 2 +- .../disable_function/disabled_functions_cidr.phpt | 2 +- .../disabled_functions_cidr_6.phpt | 2 +- .../disabled_functions_cidr_x_fwd_for.phpt | 2 +- ...abled_functions_cidr_x_fwd_for_remote_addr.phpt | 2 +- .../disable_function/disabled_functions_die.phpt | 2 +- .../disable_function/disabled_functions_eval.phpt | 2 +- .../disabled_functions_eval_filename.phpt | 2 +- .../disabled_functions_eval_simulation.phpt | 2 +- .../disabled_functions_eval_user.phpt | 2 +- .../disable_function/disabled_functions_exit.phpt | 2 +- .../disabled_functions_filename_r.phpt | 2 +- .../disabled_functions_include_once.phpt | 2 +- .../disabled_functions_include_simulation.phpt | 2 +- .../disabled_functions_local_var_array.phpt | 2 +- .../disabled_functions_local_var_array_key.phpt | 2 +- .../disable_function/disabled_functions_mb.phpt | 2 +- .../disabled_functions_method.phpt | 2 +- .../disabled_functions_name_r.phpt | 2 +- .../disabled_functions_name_regexp_type.phpt | 2 +- .../disabled_functions_name_type.phpt | 2 +- .../disabled_functions_namespace.phpt | 2 +- .../disabled_functions_nul_byte.phpt | 2 +- .../disable_function/disabled_functions_param.phpt | 2 +- .../disabled_functions_param_alias.phpt | 2 +- .../disabled_functions_param_allow.phpt | 2 +- .../disabled_functions_param_array.phpt | 2 +- .../disabled_functions_param_array_deref.phpt | 2 +- .../disabled_functions_param_array_no_value.phpt | 2 +- .../disabled_functions_param_array_r.phpt | 2 +- .../disabled_functions_param_array_r_keys.phpt | 2 +- ...abled_functions_param_array_several_levels.phpt | 2 +- ...d_functions_param_array_several_levels_int.phpt | 2 +- ..._functions_param_array_several_levels_keys.phpt | 2 +- ...ctions_param_array_several_levels_keys_int.phpt | 2 +- .../disabled_functions_param_broken_line.phpt | 6 +++--- .../disabled_functions_param_int.phpt | 2 +- .../disabled_functions_param_invalid_pos.phpt | 6 +++--- .../disabled_functions_param_line.phpt | 2 +- .../disabled_functions_param_pos.phpt | 4 ++-- .../disabled_functions_param_pos2.phpt | 2 +- .../disabled_functions_param_r.phpt | 2 +- .../disabled_functions_pos_type.phpt | 6 +++--- .../disabled_functions_regexp_multiple.phpt | 4 ++-- ...abled_functions_register_shutdown_function.phpt | 2 +- .../disabled_functions_register_tick_function.phpt | 2 +- .../disabled_functions_require.phpt | 2 +- .../disabled_functions_require_once.phpt | 2 +- .../disabled_functions_require_simulation.phpt | 2 +- .../disable_function/disabled_functions_ret.phpt | 2 +- .../disable_function/disabled_functions_ret2.phpt | 2 +- .../disable_function/disabled_functions_ret3.phpt | 2 +- .../disabled_functions_ret_right_hash.phpt | 2 +- .../disabled_functions_ret_simulation.phpt | 6 +++--- .../disabled_functions_ret_type.phpt | 2 +- .../disabled_functions_ret_type_array.phpt | 2 +- .../disabled_functions_ret_type_double.phpt | 2 +- .../disabled_functions_ret_type_long.phpt | 2 +- .../disabled_functions_ret_type_null.phpt | 2 +- .../disabled_functions_ret_type_object.phpt | 2 +- .../disabled_functions_ret_type_resource.phpt | 2 +- .../disabled_functions_ret_type_str.phpt | 2 +- .../disabled_functions_ret_type_true.phpt | 2 +- .../disabled_functions_ret_user.phpt | 2 +- .../disabled_functions_ret_user_used.phpt | 2 +- .../disabled_functions_ret_val.phpt | 2 +- .../disabled_functions_ret_val_dump.phpt | 2 +- .../disabled_functions_ret_val_rx.phpt | 2 +- .../disabled_functions_runtime.phpt | 2 +- .../disable_function/disabled_functions_upper.phpt | 2 +- .../disabled_functions_variadic.phpt | 4 ++-- .../disabled_functions_zero_cidr.phpt | 2 +- .../disabled_native_functions_indirect.phpt | 2 +- .../disable_function/disabled_user_functions.phpt | 2 +- .../disabled_user_functions_indirect.phpt | 2 +- .../disable_function/noncore_function_hooking.phpt | 2 +- src/tests/dump_request/dump_eval_blacklist.phpt | 2 +- src/tests/dump_request/dump_eval_whitelist.phpt | 2 +- src/tests/dump_request/dump_request.phpt | 2 +- .../dump_request/dump_request_invalid_folder.phpt | 4 ++-- .../dump_request_nonwriteable_folder.phpt | 4 ++-- src/tests/dump_request/dump_request_too_big.phpt | 2 +- src/tests/dump_request/dump_segfault1.phpt | 2 +- src/tests/eval_blacklist/eval_backlist.phpt | 2 +- .../eval_backlist_call_user_func.phpt | 2 +- .../eval_blacklist/eval_backlist_chained.phpt | 2 +- src/tests/eval_blacklist/eval_backlist_list.phpt | 2 +- .../eval_blacklist/eval_backlist_simulation.phpt | 2 +- .../eval_blacklist/eval_backlist_whitelist.phpt | 2 +- .../eval_backlist_whitelist_builtin.phpt | 2 +- src/tests/eval_blacklist/eval_whitelist.phpt | 2 +- .../eval_blacklist/eval_whitelist_builtin.phpt | 2 +- .../eval_whitelist_include_then_user.phpt | 2 +- .../eval_blacklist/eval_whitelist_simulation.phpt | 2 +- .../eval_whitelist_user_then_builtin.phpt | 2 +- .../eval_blacklist/nested_eval_blacklist.phpt | 2 +- .../eval_blacklist/nested_eval_blacklist2.phpt | 2 +- src/tests/glob_config.phpt | 4 ++-- src/tests/inexistent_conf_file.phpt | 6 +++--- src/tests/inexistent_conf_file_list.phpt | 6 +++--- src/tests/loading.phpt | 2 +- src/tests/multi_config.phpt | 4 ++-- .../crypt_session_corrupted_session.phpt | 2 +- .../session_encryption/crypt_session_invalid.phpt | 2 +- src/tests/unserialize/dump_unserialize.phpt | 2 +- src/tests/unserialize/unserialize_fail.phpt | 2 +- src/tests/unserialize/unserialize_sim.phpt | 2 +- src/tests/upload_validation/upload_validation.phpt | 4 ++-- .../upload_validation_invalid.phpt | 4 ++-- .../upload_validation/upload_validation_ko.phpt | 2 +- .../upload_validation_ko_simulation.phpt | 2 +- .../upload_validation_no_exec.phpt | 4 ++-- .../upload_validation/upload_validation_real.phpt | 2 +- 232 files changed, 467 insertions(+), 452 deletions(-) (limited to 'src') diff --git a/src/sp_utils.c b/src/sp_utils.c index c4354b6..b9078b4 100644 --- a/src/sp_utils.c +++ b/src/sp_utils.c @@ -50,14 +50,29 @@ void sp_log_msg(char const* restrict feature, int type, va_end(args); const char* client_ip = get_ipaddr(); + const char* logtype = NULL; + switch(type) { + case SP_LOG_SIMULATION: + logtype = "simulation"; + type = E_WARNING; + break; + case SP_LOG_DROP: + logtype = "drop"; + type = E_ERROR; + break; + default: + logtype = "log"; + break; + } + switch (SNUFFLEUPAGUS_G(config).log_media) { case SP_SYSLOG: { const char* error_filename = zend_get_executed_filename(); - int syslog_level = (type == SP_LOG_DROP) ? LOG_ERR : LOG_INFO; + int syslog_level = (type == E_ERROR) ? LOG_ERR : LOG_INFO; int error_lineno = zend_get_executed_lineno(TSRMLS_C); openlog(PHP_SNUFFLEUPAGUS_EXTNAME, LOG_PID, LOG_AUTH); - syslog(syslog_level, "[snuffleupagus][%s][%s] %s in %s on line %d", - client_ip, feature, msg, error_filename, error_lineno); + syslog(syslog_level, "[snuffleupagus][%s][%s][%s] %s in %s on line %d", + client_ip, feature, logtype, msg, error_filename, error_lineno); closelog(); if (type == SP_LOG_DROP) { zend_bailout(); @@ -66,7 +81,7 @@ void sp_log_msg(char const* restrict feature, int type, } case SP_ZEND: default: - zend_error(type, "[snuffleupagus][%s][%s] %s", client_ip, feature, msg); + zend_error(type, "[snuffleupagus][%s][%s][%s] %s", client_ip, feature, logtype, msg); break; } } diff --git a/src/sp_utils.h b/src/sp_utils.h index 8d1d44a..91a5a20 100644 --- a/src/sp_utils.h +++ b/src/sp_utils.h @@ -28,8 +28,8 @@ #define HOOK_FUNCTION_BY_REGEXP(regexp, hook_table, new_function) \ hook_regexp(regexp, SNUFFLEUPAGUS_G(hook_table), new_function) -#define SP_LOG_SIMULATION E_WARNING -#define SP_LOG_DROP E_ERROR +#define SP_LOG_SIMULATION 0x100000 +#define SP_LOG_DROP 0x200000 #define SP_LOG_DEBUG E_NOTICE #define SP_LOG_ERROR E_ERROR #define SP_LOG_WARN E_WARNING diff --git a/src/tests/broken_configuration/broken_conf.phpt b/src/tests/broken_configuration/broken_conf.phpt index ab79394..967b03e 100644 --- a/src/tests/broken_configuration/broken_conf.phpt +++ b/src/tests/broken_configuration/broken_conf.phpt @@ -6,9 +6,9 @@ Broken configuration sp.configuration_file={PWD}/config/broken_conf.ini --FILE-- --EXPECT-- -PHP Fatal error: [snuffleupagus][0.0.0.0][config] Invalid configuration prefix for 'this is a broken line' on line 1 in Unknown on line 0 +PHP Fatal error: [snuffleupagus][0.0.0.0][config][log] Invalid configuration prefix for 'this is a broken line' on line 1 in Unknown on line 0 -Fatal error: [snuffleupagus][0.0.0.0][config] Invalid configuration prefix for 'this is a broken line' on line 1 in Unknown on line 0 +Fatal error: [snuffleupagus][0.0.0.0][config][log] Invalid configuration prefix for 'this is a broken line' on line 1 in Unknown on line 0 -Fatal error: [snuffleupagus][0.0.0.0][config] Invalid configuration file in Unknown on line 0 +Fatal error: [snuffleupagus][0.0.0.0][config][log] Invalid configuration file in Unknown on line 0 Could not startup. \ No newline at end of file diff --git a/src/tests/broken_configuration/broken_conf2.phpt b/src/tests/broken_configuration/broken_conf2.phpt index 919cd7b..11cc229 100644 --- a/src/tests/broken_configuration/broken_conf2.phpt +++ b/src/tests/broken_configuration/broken_conf2.phpt @@ -6,9 +6,9 @@ Broken configuration sp.configuration_file={PWD}/config/broken_conf2.ini --FILE-- --EXPECT-- -PHP Fatal error: [snuffleupagus][0.0.0.0][config] Invalid configuration section 'sp.wrong' on line 1 in Unknown on line 0 +PHP Fatal error: [snuffleupagus][0.0.0.0][config][log] Invalid configuration section 'sp.wrong' on line 1 in Unknown on line 0 -Fatal error: [snuffleupagus][0.0.0.0][config] Invalid configuration section 'sp.wrong' on line 1 in Unknown on line 0 +Fatal error: [snuffleupagus][0.0.0.0][config][log] Invalid configuration section 'sp.wrong' on line 1 in Unknown on line 0 -Fatal error: [snuffleupagus][0.0.0.0][config] Invalid configuration file in Unknown on line 0 +Fatal error: [snuffleupagus][0.0.0.0][config][log] Invalid configuration file in Unknown on line 0 Could not startup. \ No newline at end of file diff --git a/src/tests/broken_configuration/broken_conf_allow_broken_disabled.phpt b/src/tests/broken_configuration/broken_conf_allow_broken_disabled.phpt index 9cc45bf..8bd1517 100644 --- a/src/tests/broken_configuration/broken_conf_allow_broken_disabled.phpt +++ b/src/tests/broken_configuration/broken_conf_allow_broken_disabled.phpt @@ -10,9 +10,9 @@ sp.allow_broken_configuration=Off echo 1337; ?> --EXPECT-- -PHP Fatal error: [snuffleupagus][0.0.0.0][config] Invalid configuration prefix for 'this is a broken line' on line 1 in Unknown on line 0 +PHP Fatal error: [snuffleupagus][0.0.0.0][config][log] Invalid configuration prefix for 'this is a broken line' on line 1 in Unknown on line 0 -Fatal error: [snuffleupagus][0.0.0.0][config] Invalid configuration prefix for 'this is a broken line' on line 1 in Unknown on line 0 +Fatal error: [snuffleupagus][0.0.0.0][config][log] Invalid configuration prefix for 'this is a broken line' on line 1 in Unknown on line 0 -Fatal error: [snuffleupagus][0.0.0.0][config] Invalid configuration file in Unknown on line 0 +Fatal error: [snuffleupagus][0.0.0.0][config][log] Invalid configuration file in Unknown on line 0 Could not startup. diff --git a/src/tests/broken_configuration/broken_conf_allow_broken_enabled.phpt b/src/tests/broken_configuration/broken_conf_allow_broken_enabled.phpt index 614032a..0112515 100644 --- a/src/tests/broken_configuration/broken_conf_allow_broken_enabled.phpt +++ b/src/tests/broken_configuration/broken_conf_allow_broken_enabled.phpt @@ -10,7 +10,7 @@ sp.allow_broken_configuration=On echo 1337; ?> --EXPECT-- -PHP Fatal error: [snuffleupagus][0.0.0.0][config] Invalid configuration prefix for 'this is a broken line' on line 1 in Unknown on line 0 +PHP Fatal error: [snuffleupagus][0.0.0.0][config][log] Invalid configuration prefix for 'this is a broken line' on line 1 in Unknown on line 0 -Fatal error: [snuffleupagus][0.0.0.0][config] Invalid configuration prefix for 'this is a broken line' on line 1 in Unknown on line 0 +Fatal error: [snuffleupagus][0.0.0.0][config][log] Invalid configuration prefix for 'this is a broken line' on line 1 in Unknown on line 0 1337 diff --git a/src/tests/broken_configuration/broken_conf_config_regexp.phpt b/src/tests/broken_configuration/broken_conf_config_regexp.phpt index d056e74..34d6d50 100644 --- a/src/tests/broken_configuration/broken_conf_config_regexp.phpt +++ b/src/tests/broken_configuration/broken_conf_config_regexp.phpt @@ -6,12 +6,12 @@ Broken configuration sp.configuration_file={PWD}/config/broken_config_regexp.ini --FILE-- --EXPECTF-- -PHP Fatal error: [snuffleupagus][0.0.0.0][config] Failed to compile '*.': %s on line 1. in Unknown on line 0 -PHP Fatal error: [snuffleupagus][0.0.0.0][config] '.filename_r()' is expecting a valid regexp, and not '"*."' on line 1 in Unknown on line 0 +PHP Fatal error: [snuffleupagus][0.0.0.0][config][log] Failed to compile '*.': %s on line 1. in Unknown on line 0 +PHP Fatal error: [snuffleupagus][0.0.0.0][config][log] '.filename_r()' is expecting a valid regexp, and not '"*."' on line 1 in Unknown on line 0 -Fatal error: [snuffleupagus][0.0.0.0][config] Failed to compile '*.': %s on line 1. in Unknown on line 0 +Fatal error: [snuffleupagus][0.0.0.0][config][log] Failed to compile '*.': %s on line 1. in Unknown on line 0 -Fatal error: [snuffleupagus][0.0.0.0][config] '.filename_r()' is expecting a valid regexp, and not '"*."' on line 1 in Unknown on line 0 +Fatal error: [snuffleupagus][0.0.0.0][config][log] '.filename_r()' is expecting a valid regexp, and not '"*."' on line 1 in Unknown on line 0 -Fatal error: [snuffleupagus][0.0.0.0][config] Invalid configuration file in Unknown on line 0 +Fatal error: [snuffleupagus][0.0.0.0][config][log] Invalid configuration file in Unknown on line 0 Could not startup. diff --git a/src/tests/broken_configuration/broken_conf_config_regexp_no_closing_paren.phpt b/src/tests/broken_configuration/broken_conf_config_regexp_no_closing_paren.phpt index 1792cdd..81d9831 100644 --- a/src/tests/broken_configuration/broken_conf_config_regexp_no_closing_paren.phpt +++ b/src/tests/broken_configuration/broken_conf_config_regexp_no_closing_paren.phpt @@ -6,12 +6,12 @@ Broken configuration - regexp without a closing parenthesis sp.configuration_file={PWD}/config/broken_config_regexp_no_closing_paren.ini --FILE-- --EXPECT-- -PHP Fatal error: [snuffleupagus][0.0.0.0][error] There is an issue with the parsing of '"*."': it doesn't look like a valid string on line 1 in Unknown on line 0 -PHP Fatal error: [snuffleupagus][0.0.0.0][config] '.filename_r()' is expecting a valid regexp, and not '"*."' on line 1 in Unknown on line 0 +PHP Fatal error: [snuffleupagus][0.0.0.0][error][log] There is an issue with the parsing of '"*."': it doesn't look like a valid string on line 1 in Unknown on line 0 +PHP Fatal error: [snuffleupagus][0.0.0.0][config][log] '.filename_r()' is expecting a valid regexp, and not '"*."' on line 1 in Unknown on line 0 -Fatal error: [snuffleupagus][0.0.0.0][error] There is an issue with the parsing of '"*."': it doesn't look like a valid string on line 1 in Unknown on line 0 +Fatal error: [snuffleupagus][0.0.0.0][error][log] There is an issue with the parsing of '"*."': it doesn't look like a valid string on line 1 in Unknown on line 0 -Fatal error: [snuffleupagus][0.0.0.0][config] '.filename_r()' is expecting a valid regexp, and not '"*."' on line 1 in Unknown on line 0 +Fatal error: [snuffleupagus][0.0.0.0][config][log] '.filename_r()' is expecting a valid regexp, and not '"*."' on line 1 in Unknown on line 0 -Fatal error: [snuffleupagus][0.0.0.0][config] Invalid configuration file in Unknown on line 0 +Fatal error: [snuffleupagus][0.0.0.0][config][log] Invalid configuration file in Unknown on line 0 Could not startup. \ No newline at end of file diff --git a/src/tests/broken_configuration/broken_conf_cookie_encryption_without_encryption_key.phpt b/src/tests/broken_configuration/broken_conf_cookie_encryption_without_encryption_key.phpt index f3dc06f..d86b72e 100644 --- a/src/tests/broken_configuration/broken_conf_cookie_encryption_without_encryption_key.phpt +++ b/src/tests/broken_configuration/broken_conf_cookie_encryption_without_encryption_key.phpt @@ -1,14 +1,14 @@ --TEST-- -Borken configuration - encrypted cookie without encryption key +Broken configuration - encrypted cookie without encryption key --SKIPIF-- --INI-- sp.configuration_file={PWD}/config/broken_conf_cookie_encryption_without_encryption_key.ini --FILE-- --EXPECT-- -PHP Fatal error: [snuffleupagus][0.0.0.0][config] You're trying to use the cookie encryption featureon line 2 without having set the `.encryption_key` option in`sp.global`: please set it first in Unknown on line 0 +PHP Fatal error: [snuffleupagus][0.0.0.0][config][log] You're trying to use the cookie encryption featureon line 2 without having set the `.encryption_key` option in`sp.global`: please set it first in Unknown on line 0 -Fatal error: [snuffleupagus][0.0.0.0][config] You're trying to use the cookie encryption featureon line 2 without having set the `.encryption_key` option in`sp.global`: please set it first in Unknown on line 0 +Fatal error: [snuffleupagus][0.0.0.0][config][log] You're trying to use the cookie encryption featureon line 2 without having set the `.encryption_key` option in`sp.global`: please set it first in Unknown on line 0 -Fatal error: [snuffleupagus][0.0.0.0][config] Invalid configuration file in Unknown on line 0 +Fatal error: [snuffleupagus][0.0.0.0][config][log] Invalid configuration file in Unknown on line 0 Could not startup. diff --git a/src/tests/broken_configuration/broken_conf_cookie_encryption_without_env_var.phpt b/src/tests/broken_configuration/broken_conf_cookie_encryption_without_env_var.phpt index 882b4f7..01e3141 100644 --- a/src/tests/broken_configuration/broken_conf_cookie_encryption_without_env_var.phpt +++ b/src/tests/broken_configuration/broken_conf_cookie_encryption_without_env_var.phpt @@ -1,14 +1,14 @@ --TEST-- -Borken configuration - encrypted cookie with without cookie env var +Broken configuration - encrypted cookie with without cookie env var --SKIPIF-- --INI-- sp.configuration_file={PWD}/config/broken_conf_cookie_encryption_without_env_var.ini --FILE-- --EXPECT-- -PHP Fatal error: [snuffleupagus][0.0.0.0][config] You're trying to use the cookie encryption featureon line 2 without having set the `.cookie_env_var` option in`sp.global`: please set it first in Unknown on line 0 +PHP Fatal error: [snuffleupagus][0.0.0.0][config][log] You're trying to use the cookie encryption featureon line 2 without having set the `.cookie_env_var` option in`sp.global`: please set it first in Unknown on line 0 -Fatal error: [snuffleupagus][0.0.0.0][config] You're trying to use the cookie encryption featureon line 2 without having set the `.cookie_env_var` option in`sp.global`: please set it first in Unknown on line 0 +Fatal error: [snuffleupagus][0.0.0.0][config][log] You're trying to use the cookie encryption featureon line 2 without having set the `.cookie_env_var` option in`sp.global`: please set it first in Unknown on line 0 -Fatal error: [snuffleupagus][0.0.0.0][config] Invalid configuration file in Unknown on line 0 +Fatal error: [snuffleupagus][0.0.0.0][config][log] Invalid configuration file in Unknown on line 0 Could not startup. diff --git a/src/tests/broken_configuration/broken_conf_cookie_name_and_regexp.phpt b/src/tests/broken_configuration/broken_conf_cookie_name_and_regexp.phpt index 50bc569..9375381 100644 --- a/src/tests/broken_configuration/broken_conf_cookie_name_and_regexp.phpt +++ b/src/tests/broken_configuration/broken_conf_cookie_name_and_regexp.phpt @@ -1,14 +1,14 @@ --TEST-- -Borken configuration - encrypted cookie with name and regexp +Broken configuration - encrypted cookie with name and regexp --SKIPIF-- --INI-- sp.configuration_file={PWD}/config/broken_conf_cookie_name_and_regexp.ini --FILE-- --EXPECT-- -PHP Fatal error: [snuffleupagus][0.0.0.0][config] name and name_r are mutually exclusive on line 2 in Unknown on line 0 +PHP Fatal error: [snuffleupagus][0.0.0.0][config][log] name and name_r are mutually exclusive on line 2 in Unknown on line 0 -Fatal error: [snuffleupagus][0.0.0.0][config] name and name_r are mutually exclusive on line 2 in Unknown on line 0 +Fatal error: [snuffleupagus][0.0.0.0][config][log] name and name_r are mutually exclusive on line 2 in Unknown on line 0 -Fatal error: [snuffleupagus][0.0.0.0][config] Invalid configuration file in Unknown on line 0 +Fatal error: [snuffleupagus][0.0.0.0][config][log] Invalid configuration file in Unknown on line 0 Could not startup. \ No newline at end of file diff --git a/src/tests/broken_configuration/broken_conf_enable_disable.phpt b/src/tests/broken_configuration/broken_conf_enable_disable.phpt index 48ec954..8efe819 100644 --- a/src/tests/broken_configuration/broken_conf_enable_disable.phpt +++ b/src/tests/broken_configuration/broken_conf_enable_disable.phpt @@ -6,9 +6,9 @@ Global strict mode sp.configuration_file={PWD}/config/borken_conf_enable_disable.ini --FILE-- --EXPECTF-- -PHP Fatal error: [snuffleupagus][0.0.0.0][config] A rule can't be enabled and disabled on line 1 in Unknown on line 0 +PHP Fatal error: [snuffleupagus][0.0.0.0][config][log] A rule can't be enabled and disabled on line 1 in Unknown on line 0 -Fatal error: [snuffleupagus][0.0.0.0][config] A rule can't be enabled and disabled on line 1 in Unknown on line 0 +Fatal error: [snuffleupagus][0.0.0.0][config][log] A rule can't be enabled and disabled on line 1 in Unknown on line 0 -Fatal error: [snuffleupagus][0.0.0.0][config] Invalid configuration file in Unknown on line 0 +Fatal error: [snuffleupagus][0.0.0.0][config][log] Invalid configuration file in Unknown on line 0 Could not startup. \ No newline at end of file diff --git a/src/tests/broken_configuration/broken_conf_eval.phpt b/src/tests/broken_configuration/broken_conf_eval.phpt index e1e05bc..23a4bb9 100644 --- a/src/tests/broken_configuration/broken_conf_eval.phpt +++ b/src/tests/broken_configuration/broken_conf_eval.phpt @@ -6,9 +6,9 @@ Broken configuration for eval sp.configuration_file={PWD}/config/broken_conf_eval.ini --FILE-- --EXPECT-- -PHP Fatal error: [snuffleupagus][0.0.0.0][error] There is an issue with the parsing of '"cos,sin': it doesn't look like a valid string on line 1 in Unknown on line 0 +PHP Fatal error: [snuffleupagus][0.0.0.0][error][log] There is an issue with the parsing of '"cos,sin': it doesn't look like a valid string on line 1 in Unknown on line 0 -Fatal error: [snuffleupagus][0.0.0.0][error] There is an issue with the parsing of '"cos,sin': it doesn't look like a valid string on line 1 in Unknown on line 0 +Fatal error: [snuffleupagus][0.0.0.0][error][log] There is an issue with the parsing of '"cos,sin': it doesn't look like a valid string on line 1 in Unknown on line 0 -Fatal error: [snuffleupagus][0.0.0.0][config] Invalid configuration file in Unknown on line 0 +Fatal error: [snuffleupagus][0.0.0.0][config][log] Invalid configuration file in Unknown on line 0 Could not startup. \ No newline at end of file diff --git a/src/tests/broken_configuration/broken_conf_expecting_bool.phpt b/src/tests/broken_configuration/broken_conf_expecting_bool.phpt index 38a648d..4ccac74 100644 --- a/src/tests/broken_configuration/broken_conf_expecting_bool.phpt +++ b/src/tests/broken_configuration/broken_conf_expecting_bool.phpt @@ -6,9 +6,9 @@ Bad boolean value in configuration sp.configuration_file={PWD}/config/broken_conf_expecting_bool.ini --FILE-- --EXPECT-- -PHP Fatal error: [snuffleupagus][0.0.0.0][config] Trailing chars '337);' at the end of '.enable(1337);' on line 5 in Unknown on line 0 +PHP Fatal error: [snuffleupagus][0.0.0.0][config][log] Trailing chars '337);' at the end of '.enable(1337);' on line 5 in Unknown on line 0 -Fatal error: [snuffleupagus][0.0.0.0][config] Trailing chars '337);' at the end of '.enable(1337);' on line 5 in Unknown on line 0 +Fatal error: [snuffleupagus][0.0.0.0][config][log] Trailing chars '337);' at the end of '.enable(1337);' on line 5 in Unknown on line 0 -Fatal error: [snuffleupagus][0.0.0.0][config] Invalid configuration file in Unknown on line 0 +Fatal error: [snuffleupagus][0.0.0.0][config][log] Invalid configuration file in Unknown on line 0 Could not startup. \ No newline at end of file diff --git a/src/tests/broken_configuration/broken_conf_invalid_cidr.phpt b/src/tests/broken_configuration/broken_conf_invalid_cidr.phpt index e23b880..781ccd5 100644 --- a/src/tests/broken_configuration/broken_conf_invalid_cidr.phpt +++ b/src/tests/broken_configuration/broken_conf_invalid_cidr.phpt @@ -6,9 +6,9 @@ Broken configuration sp.configuration_file={PWD}/config/broken_conf_invalid_cidr.ini --FILE-- --EXPECT-- -PHP Fatal error: [snuffleupagus][0.0.0.0][config] '42' isn't a valid ipv4 mask. in Unknown on line 0 +PHP Fatal error: [snuffleupagus][0.0.0.0][config][log] '42' isn't a valid ipv4 mask. in Unknown on line 0 -Fatal error: [snuffleupagus][0.0.0.0][config] '42' isn't a valid ipv4 mask. in Unknown on line 0 +Fatal error: [snuffleupagus][0.0.0.0][config][log] '42' isn't a valid ipv4 mask. in Unknown on line 0 -Fatal error: [snuffleupagus][0.0.0.0][config] Invalid configuration file in Unknown on line 0 +Fatal error: [snuffleupagus][0.0.0.0][config][log] Invalid configuration file in Unknown on line 0 Could not startup. \ No newline at end of file diff --git a/src/tests/broken_configuration/broken_conf_invalid_cidr6.phpt b/src/tests/broken_configuration/broken_conf_invalid_cidr6.phpt index b8721b1..60c4f15 100644 --- a/src/tests/broken_configuration/broken_conf_invalid_cidr6.phpt +++ b/src/tests/broken_configuration/broken_conf_invalid_cidr6.phpt @@ -6,9 +6,9 @@ Broken configuration sp.configuration_file={PWD}/config/broken_conf_invalid_cidr6.ini --FILE-- --EXPECT-- -PHP Fatal error: [snuffleupagus][0.0.0.0][config] 'ZZZ' isn't a valid network mask. in Unknown on line 0 +PHP Fatal error: [snuffleupagus][0.0.0.0][config][log] 'ZZZ' isn't a valid network mask. in Unknown on line 0 -Fatal error: [snuffleupagus][0.0.0.0][config] 'ZZZ' isn't a valid network mask. in Unknown on line 0 +Fatal error: [snuffleupagus][0.0.0.0][config][log] 'ZZZ' isn't a valid network mask. in Unknown on line 0 -Fatal error: [snuffleupagus][0.0.0.0][config] Invalid configuration file in Unknown on line 0 +Fatal error: [snuffleupagus][0.0.0.0][config][log] Invalid configuration file in Unknown on line 0 Could not startup. \ No newline at end of file diff --git a/src/tests/broken_configuration/broken_conf_invalid_cidr6_no_slash.phpt b/src/tests/broken_configuration/broken_conf_invalid_cidr6_no_slash.phpt index cbc609e..acb88f9 100644 --- a/src/tests/broken_configuration/broken_conf_invalid_cidr6_no_slash.phpt +++ b/src/tests/broken_configuration/broken_conf_invalid_cidr6_no_slash.phpt @@ -6,9 +6,9 @@ Broken configuration, invalid cidr for ipv6 because there is no `/` in it sp.configuration_file={PWD}/config/broken_conf_invalid_cidr6_no_slash.ini --FILE-- --EXPECT-- -PHP Fatal error: [snuffleupagus][0.0.0.0][config] '2001:0db8:0000:0000:0000:ff00:0042:8329' isn't a valid network mask, it seems that you forgot a '/'. in Unknown on line 0 +PHP Fatal error: [snuffleupagus][0.0.0.0][config][log] '2001:0db8:0000:0000:0000:ff00:0042:8329' isn't a valid network mask, it seems that you forgot a '/'. in Unknown on line 0 -Fatal error: [snuffleupagus][0.0.0.0][config] '2001:0db8:0000:0000:0000:ff00:0042:8329' isn't a valid network mask, it seems that you forgot a '/'. in Unknown on line 0 +Fatal error: [snuffleupagus][0.0.0.0][config][log] '2001:0db8:0000:0000:0000:ff00:0042:8329' isn't a valid network mask, it seems that you forgot a '/'. in Unknown on line 0 -Fatal error: [snuffleupagus][0.0.0.0][config] Invalid configuration file in Unknown on line 0 +Fatal error: [snuffleupagus][0.0.0.0][config][log] Invalid configuration file in Unknown on line 0 Could not startup. \ No newline at end of file diff --git a/src/tests/broken_configuration/broken_conf_invalid_cidr_value.phpt b/src/tests/broken_configuration/broken_conf_invalid_cidr_value.phpt index 3372409..ac3fb47 100644 --- a/src/tests/broken_configuration/broken_conf_invalid_cidr_value.phpt +++ b/src/tests/broken_configuration/broken_conf_invalid_cidr_value.phpt @@ -7,12 +7,12 @@ Broken configuration, invalid cidr value sp.configuration_file={PWD}/config/broken_conf_invalid_cidr_value.ini --FILE-- --EXPECT-- -PHP Fatal error: [snuffleupagus][0.0.0.0][error] A valid string as parameter is expected on line 1 in Unknown on line 0 -PHP Fatal error: [snuffleupagus][0.0.0.0][config] " doesn't contain a valid cidr on line 1 in Unknown on line 0 +PHP Fatal error: [snuffleupagus][0.0.0.0][error][log] A valid string as parameter is expected on line 1 in Unknown on line 0 +PHP Fatal error: [snuffleupagus][0.0.0.0][config][log] " doesn't contain a valid cidr on line 1 in Unknown on line 0 -Fatal error: [snuffleupagus][0.0.0.0][error] A valid string as parameter is expected on line 1 in Unknown on line 0 +Fatal error: [snuffleupagus][0.0.0.0][error][log] A valid string as parameter is expected on line 1 in Unknown on line 0 -Fatal error: [snuffleupagus][0.0.0.0][config] " doesn't contain a valid cidr on line 1 in Unknown on line 0 +Fatal error: [snuffleupagus][0.0.0.0][config][log] " doesn't contain a valid cidr on line 1 in Unknown on line 0 -Fatal error: [snuffleupagus][0.0.0.0][config] Invalid configuration file in Unknown on line 0 +Fatal error: [snuffleupagus][0.0.0.0][config][log] Invalid configuration file in Unknown on line 0 Could not startup. \ No newline at end of file diff --git a/src/tests/broken_configuration/broken_conf_invalid_filename.phpt b/src/tests/broken_configuration/broken_conf_invalid_filename.phpt index 1bc6564..aed30c8 100644 --- a/src/tests/broken_configuration/broken_conf_invalid_filename.phpt +++ b/src/tests/broken_configuration/broken_conf_invalid_filename.phpt @@ -6,9 +6,9 @@ Broken configuration filename without absolute path sp.configuration_file={PWD}/config/broken_conf_invalid_filename.ini --FILE-- --EXPECTF-- -PHP Fatal error: [snuffleupagus][0.0.0.0][config] Invalid configuration line: 'sp.disabled_functions.function("sprintf").filename("wrong file name").drop();':'.filename' must be an absolute path or a phar archive on line 1 in Unknown on line 0 +PHP Fatal error: [snuffleupagus][0.0.0.0][config][log] Invalid configuration line: 'sp.disabled_functions.function("sprintf").filename("wrong file name").drop();':'.filename' must be an absolute path or a phar archive on line 1 in Unknown on line 0 -Fatal error: [snuffleupagus][0.0.0.0][config] Invalid configuration line: 'sp.disabled_functions.function("sprintf").filename("wrong file name").drop();':'.filename' must be an absolute path or a phar archive on line 1 in Unknown on line 0 +Fatal error: [snuffleupagus][0.0.0.0][config][log] Invalid configuration line: 'sp.disabled_functions.function("sprintf").filename("wrong file name").drop();':'.filename' must be an absolute path or a phar archive on line 1 in Unknown on line 0 -Fatal error: [snuffleupagus][0.0.0.0][config] Invalid configuration file in Unknown on line 0 +Fatal error: [snuffleupagus][0.0.0.0][config][log] Invalid configuration file in Unknown on line 0 Could not startup. \ No newline at end of file diff --git a/src/tests/broken_configuration/broken_conf_invalid_log_media.phpt b/src/tests/broken_configuration/broken_conf_invalid_log_media.phpt index a162ea8..9c516bc 100644 --- a/src/tests/broken_configuration/broken_conf_invalid_log_media.phpt +++ b/src/tests/broken_configuration/broken_conf_invalid_log_media.phpt @@ -6,9 +6,9 @@ Broken configuration filename with improper log media sp.configuration_file={PWD}/config/broken_conf_invalid_log_media.ini --FILE-- --EXPECTF-- -PHP Fatal error: [snuffleupagus][0.0.0.0][config] .log_media() only supports 'syslog' or 'php', on line 1 in Unknown on line 0 +PHP Fatal error: [snuffleupagus][0.0.0.0][config][log] .log_media() only supports 'syslog' or 'php', on line 1 in Unknown on line 0 -Fatal error: [snuffleupagus][0.0.0.0][config] .log_media() only supports 'syslog' or 'php', on line 1 in Unknown on line 0 +Fatal error: [snuffleupagus][0.0.0.0][config][log] .log_media() only supports 'syslog' or 'php', on line 1 in Unknown on line 0 -Fatal error: [snuffleupagus][0.0.0.0][config] Invalid configuration file in Unknown on line 0 +Fatal error: [snuffleupagus][0.0.0.0][config][log] Invalid configuration file in Unknown on line 0 Could not startup. diff --git a/src/tests/broken_configuration/broken_conf_invalid_type.phpt b/src/tests/broken_configuration/broken_conf_invalid_type.phpt index cc4a381..f5b0ce5 100644 --- a/src/tests/broken_configuration/broken_conf_invalid_type.phpt +++ b/src/tests/broken_configuration/broken_conf_invalid_type.phpt @@ -6,9 +6,9 @@ Broken conf with wrong type sp.configuration_file={PWD}/config/broken_conf_invalid_type.ini --FILE-- --EXPECTF-- -PHP Fatal error: [snuffleupagus][0.0.0.0][error] There is an issue with the parsing of '"totally_wrong"_type")': it doesn't look like a valid string on line 1 in Unknown on line 0 +PHP Fatal error: [snuffleupagus][0.0.0.0][error][log] There is an issue with the parsing of '"totally_wrong"_type")': it doesn't look like a valid string on line 1 in Unknown on line 0 -Fatal error: [snuffleupagus][0.0.0.0][error] There is an issue with the parsing of '"totally_wrong"_type")': it doesn't look like a valid string on line 1 in Unknown on line 0 +Fatal error: [snuffleupagus][0.0.0.0][error][log] There is an issue with the parsing of '"totally_wrong"_type")': it doesn't look like a valid string on line 1 in Unknown on line 0 -Fatal error: [snuffleupagus][0.0.0.0][config] Invalid configuration file in Unknown on line 0 +Fatal error: [snuffleupagus][0.0.0.0][config][log] Invalid configuration file in Unknown on line 0 Could not startup. \ No newline at end of file diff --git a/src/tests/broken_configuration/broken_conf_key_value.phpt b/src/tests/broken_configuration/broken_conf_key_value.phpt index 14a3d91..3a0837a 100644 --- a/src/tests/broken_configuration/broken_conf_key_value.phpt +++ b/src/tests/broken_configuration/broken_conf_key_value.phpt @@ -6,9 +6,9 @@ Broken configuration sp.configuration_file={PWD}/config/broken_conf_key_value.ini --FILE-- --EXPECT-- -PHP Fatal error: [snuffleupagus][0.0.0.0][config] Invalid configuration line: 'sp.disabled_functions.function("system").var("").value("").key("").drop();':`key` and `value` are mutually exclusive on line 1 in Unknown on line 0 +PHP Fatal error: [snuffleupagus][0.0.0.0][config][log] Invalid configuration line: 'sp.disabled_functions.function("system").var("").value("").key("").drop();':`key` and `value` are mutually exclusive on line 1 in Unknown on line 0 -Fatal error: [snuffleupagus][0.0.0.0][config] Invalid configuration line: 'sp.disabled_functions.function("system").var("").value("").key("").drop();':`key` and `value` are mutually exclusive on line 1 in Unknown on line 0 +Fatal error: [snuffleupagus][0.0.0.0][config][log] Invalid configuration line: 'sp.disabled_functions.function("system").var("").value("").key("").drop();':`key` and `value` are mutually exclusive on line 1 in Unknown on line 0 -Fatal error: [snuffleupagus][0.0.0.0][config] Invalid configuration file in Unknown on line 0 +Fatal error: [snuffleupagus][0.0.0.0][config][log] Invalid configuration file in Unknown on line 0 Could not startup. \ No newline at end of file diff --git a/src/tests/broken_configuration/broken_conf_line_empty_string.phpt b/src/tests/broken_configuration/broken_conf_line_empty_string.phpt index 15c11fd..17ceeb9 100644 --- a/src/tests/broken_configuration/broken_conf_line_empty_string.phpt +++ b/src/tests/broken_configuration/broken_conf_line_empty_string.phpt @@ -6,9 +6,9 @@ Configuration line with an empty string sp.configuration_file={PWD}/config/broken_conf_line_empty_string.ini --FILE-- --EXPECT-- -PHP Fatal error: [snuffleupagus][0.0.0.0][error] A valid string as parameter is expected on line 1 in Unknown on line 0 +PHP Fatal error: [snuffleupagus][0.0.0.0][error][log] A valid string as parameter is expected on line 1 in Unknown on line 0 -Fatal error: [snuffleupagus][0.0.0.0][error] A valid string as parameter is expected on line 1 in Unknown on line 0 +Fatal error: [snuffleupagus][0.0.0.0][error][log] A valid string as parameter is expected on line 1 in Unknown on line 0 -Fatal error: [snuffleupagus][0.0.0.0][config] Invalid configuration file in Unknown on line 0 +Fatal error: [snuffleupagus][0.0.0.0][config][log] Invalid configuration file in Unknown on line 0 Could not startup. \ No newline at end of file diff --git a/src/tests/broken_configuration/broken_conf_line_no_closing.phpt b/src/tests/broken_configuration/broken_conf_line_no_closing.phpt index c8ba73b..d5a369b 100644 --- a/src/tests/broken_configuration/broken_conf_line_no_closing.phpt +++ b/src/tests/broken_configuration/broken_conf_line_no_closing.phpt @@ -6,9 +6,9 @@ Configuration line without closing parenthese sp.configuration_file={PWD}/config/broken_conf_line_no_closing.ini --FILE-- --EXPECT-- -PHP Fatal error: [snuffleupagus][0.0.0.0][error] There is an issue with the parsing of '"123"': it doesn't look like a valid string on line 1 in Unknown on line 0 +PHP Fatal error: [snuffleupagus][0.0.0.0][error][log] There is an issue with the parsing of '"123"': it doesn't look like a valid string on line 1 in Unknown on line 0 -Fatal error: [snuffleupagus][0.0.0.0][error] There is an issue with the parsing of '"123"': it doesn't look like a valid string on line 1 in Unknown on line 0 +Fatal error: [snuffleupagus][0.0.0.0][error][log] There is an issue with the parsing of '"123"': it doesn't look like a valid string on line 1 in Unknown on line 0 -Fatal error: [snuffleupagus][0.0.0.0][config] Invalid configuration file in Unknown on line 0 +Fatal error: [snuffleupagus][0.0.0.0][config][log] Invalid configuration file in Unknown on line 0 Could not startup. \ No newline at end of file diff --git a/src/tests/broken_configuration/broken_conf_local_var_1.phpt b/src/tests/broken_configuration/broken_conf_local_var_1.phpt index 573246c..df401c4 100644 --- a/src/tests/broken_configuration/broken_conf_local_var_1.phpt +++ b/src/tests/broken_configuration/broken_conf_local_var_1.phpt @@ -6,12 +6,12 @@ Broken configuration sp.configuration_file={PWD}/config/broken_conf_local_var_1.ini --FILE-- --EXPECT-- -PHP Fatal error: [snuffleupagus][0.0.0.0][config] Invalid `]` position. in Unknown on line 0 -PHP Fatal error: [snuffleupagus][0.0.0.0][config] Invalid value ']' for `var` on line 1 in Unknown on line 0 +PHP Fatal error: [snuffleupagus][0.0.0.0][config][log] Invalid `]` position. in Unknown on line 0 +PHP Fatal error: [snuffleupagus][0.0.0.0][config][log] Invalid value ']' for `var` on line 1 in Unknown on line 0 -Fatal error: [snuffleupagus][0.0.0.0][config] Invalid `]` position. in Unknown on line 0 +Fatal error: [snuffleupagus][0.0.0.0][config][log] Invalid `]` position. in Unknown on line 0 -Fatal error: [snuffleupagus][0.0.0.0][config] Invalid value ']' for `var` on line 1 in Unknown on line 0 +Fatal error: [snuffleupagus][0.0.0.0][config][log] Invalid value ']' for `var` on line 1 in Unknown on line 0 -Fatal error: [snuffleupagus][0.0.0.0][config] Invalid configuration file in Unknown on line 0 +Fatal error: [snuffleupagus][0.0.0.0][config][log] Invalid configuration file in Unknown on line 0 Could not startup. \ No newline at end of file diff --git a/src/tests/broken_configuration/broken_conf_local_var_10.phpt b/src/tests/broken_configuration/broken_conf_local_var_10.phpt index 2cf19f9..72a96b2 100644 --- a/src/tests/broken_configuration/broken_conf_local_var_10.phpt +++ b/src/tests/broken_configuration/broken_conf_local_var_10.phpt @@ -6,12 +6,12 @@ Broken configuration sp.configuration_file={PWD}/config/broken_conf_local_var_10.ini --FILE-- --EXPECT-- -PHP Fatal error: [snuffleupagus][0.0.0.0][config] Invalid `]` position. in Unknown on line 0 -PHP Fatal error: [snuffleupagus][0.0.0.0][config] Invalid value 'asd[asd]asd' for `var` on line 1 in Unknown on line 0 +PHP Fatal error: [snuffleupagus][0.0.0.0][config][log] Invalid `]` position. in Unknown on line 0 +PHP Fatal error: [snuffleupagus][0.0.0.0][config][log] Invalid value 'asd[asd]asd' for `var` on line 1 in Unknown on line 0 -Fatal error: [snuffleupagus][0.0.0.0][config] Invalid `]` position. in Unknown on line 0 +Fatal error: [snuffleupagus][0.0.0.0][config][log] Invalid `]` position. in Unknown on line 0 -Fatal error: [snuffleupagus][0.0.0.0][config] Invalid value 'asd[asd]asd' for `var` on line 1 in Unknown on line 0 +Fatal error: [snuffleupagus][0.0.0.0][config][log] Invalid value 'asd[asd]asd' for `var` on line 1 in Unknown on line 0 -Fatal error: [snuffleupagus][0.0.0.0][config] Invalid configuration file in Unknown on line 0 +Fatal error: [snuffleupagus][0.0.0.0][config][log] Invalid configuration file in Unknown on line 0 Could not startup. \ No newline at end of file diff --git a/src/tests/broken_configuration/broken_conf_local_var_11.phpt b/src/tests/broken_configuration/broken_conf_local_var_11.phpt index bd018e4..e67d11a 100644 --- a/src/tests/broken_configuration/broken_conf_local_var_11.phpt +++ b/src/tests/broken_configuration/broken_conf_local_var_11.phpt @@ -6,12 +6,12 @@ Broken configuration sp.configuration_file={PWD}/config/broken_conf_local_var_11.ini --FILE-- --EXPECT-- -PHP Fatal error: [snuffleupagus][0.0.0.0][config] Invalid `::` position. in Unknown on line 0 -PHP Fatal error: [snuffleupagus][0.0.0.0][config] Invalid value 'asd::' for `param` on line 1 in Unknown on line 0 +PHP Fatal error: [snuffleupagus][0.0.0.0][config][log] Invalid `::` position. in Unknown on line 0 +PHP Fatal error: [snuffleupagus][0.0.0.0][config][log] Invalid value 'asd::' for `param` on line 1 in Unknown on line 0 -Fatal error: [snuffleupagus][0.0.0.0][config] Invalid `::` position. in Unknown on line 0 +Fatal error: [snuffleupagus][0.0.0.0][config][log] Invalid `::` position. in Unknown on line 0 -Fatal error: [snuffleupagus][0.0.0.0][config] Invalid value 'asd::' for `param` on line 1 in Unknown on line 0 +Fatal error: [snuffleupagus][0.0.0.0][config][log] Invalid value 'asd::' for `param` on line 1 in Unknown on line 0 -Fatal error: [snuffleupagus][0.0.0.0][config] Invalid configuration file in Unknown on line 0 +Fatal error: [snuffleupagus][0.0.0.0][config][log] Invalid configuration file in Unknown on line 0 Could not startup. \ No newline at end of file diff --git a/src/tests/broken_configuration/broken_conf_local_var_12.phpt b/src/tests/broken_configuration/broken_conf_local_var_12.phpt index 2c86d57..56f2863 100644 --- a/src/tests/broken_configuration/broken_conf_local_var_12.phpt +++ b/src/tests/broken_configuration/broken_conf_local_var_12.phpt @@ -6,9 +6,9 @@ Broken configuration sp.configuration_file={PWD}/config/broken_conf_local_var_12.ini --FILE-- --EXPECT-- -PHP Fatal error: [snuffleupagus][0.0.0.0][config] Empty value in `var` on line 1 in Unknown on line 0 +PHP Fatal error: [snuffleupagus][0.0.0.0][config][log] Empty value in `var` on line 1 in Unknown on line 0 -Fatal error: [snuffleupagus][0.0.0.0][config] Empty value in `var` on line 1 in Unknown on line 0 +Fatal error: [snuffleupagus][0.0.0.0][config][log] Empty value in `var` on line 1 in Unknown on line 0 -Fatal error: [snuffleupagus][0.0.0.0][config] Invalid configuration file in Unknown on line 0 +Fatal error: [snuffleupagus][0.0.0.0][config][log] Invalid configuration file in Unknown on line 0 Could not startup. \ No newline at end of file diff --git a/src/tests/broken_configuration/broken_conf_local_var_13.phpt b/src/tests/broken_configuration/broken_conf_local_var_13.phpt index a42507d..8e62627 100644 --- a/src/tests/broken_configuration/broken_conf_local_var_13.phpt +++ b/src/tests/broken_configuration/broken_conf_local_var_13.phpt @@ -6,12 +6,12 @@ Broken configuration sp.configuration_file={PWD}/config/broken_conf_local_var_13.ini --FILE-- --EXPECT-- -PHP Fatal error: [snuffleupagus][0.0.0.0][config] Invalid `->` position. in Unknown on line 0 -PHP Fatal error: [snuffleupagus][0.0.0.0][config] Invalid value 'asd->asd' for `var` on line 1 in Unknown on line 0 +PHP Fatal error: [snuffleupagus][0.0.0.0][config][log] Invalid `->` position. in Unknown on line 0 +PHP Fatal error: [snuffleupagus][0.0.0.0][config][log] Invalid value 'asd->asd' for `var` on line 1 in Unknown on line 0 -Fatal error: [snuffleupagus][0.0.0.0][config] Invalid `->` position. in Unknown on line 0 +Fatal error: [snuffleupagus][0.0.0.0][config][log] Invalid `->` position. in Unknown on line 0 -Fatal error: [snuffleupagus][0.0.0.0][config] Invalid value 'asd->asd' for `var` on line 1 in Unknown on line 0 +Fatal error: [snuffleupagus][0.0.0.0][config][log] Invalid value 'asd->asd' for `var` on line 1 in Unknown on line 0 -Fatal error: [snuffleupagus][0.0.0.0][config] Invalid configuration file in Unknown on line 0 +Fatal error: [snuffleupagus][0.0.0.0][config][log] Invalid configuration file in Unknown on line 0 Could not startup. \ No newline at end of file diff --git a/src/tests/broken_configuration/broken_conf_local_var_14.phpt b/src/tests/broken_configuration/broken_conf_local_var_14.phpt index 01c9228..24e2825 100644 --- a/src/tests/broken_configuration/broken_conf_local_var_14.phpt +++ b/src/tests/broken_configuration/broken_conf_local_var_14.phpt @@ -6,12 +6,12 @@ Broken configuration sp.configuration_file={PWD}/config/broken_conf_local_var_14.ini --FILE-- --EXPECT-- -PHP Fatal error: [snuffleupagus][0.0.0.0][config] Invalid var name: $i+valid var name . in Unknown on line 0 -PHP Fatal error: [snuffleupagus][0.0.0.0][config] Invalid value '$i+valid var name ' for `var` on line 1 in Unknown on line 0 +PHP Fatal error: [snuffleupagus][0.0.0.0][config][log] Invalid var name: $i+valid var name . in Unknown on line 0 +PHP Fatal error: [snuffleupagus][0.0.0.0][config][log] Invalid value '$i+valid var name ' for `var` on line 1 in Unknown on line 0 -Fatal error: [snuffleupagus][0.0.0.0][config] Invalid var name: $i+valid var name . in Unknown on line 0 +Fatal error: [snuffleupagus][0.0.0.0][config][log] Invalid var name: $i+valid var name . in Unknown on line 0 -Fatal error: [snuffleupagus][0.0.0.0][config] Invalid value '$i+valid var name ' for `var` on line 1 in Unknown on line 0 +Fatal error: [snuffleupagus][0.0.0.0][config][log] Invalid value '$i+valid var name ' for `var` on line 1 in Unknown on line 0 -Fatal error: [snuffleupagus][0.0.0.0][config] Invalid configuration file in Unknown on line 0 +Fatal error: [snuffleupagus][0.0.0.0][config][log] Invalid configuration file in Unknown on line 0 Could not startup. \ No newline at end of file diff --git a/src/tests/broken_configuration/broken_conf_local_var_15.phpt b/src/tests/broken_configuration/broken_conf_local_var_15.phpt index 8fca43a..5a4a0b5 100644 --- a/src/tests/broken_configuration/broken_conf_local_var_15.phpt +++ b/src/tests/broken_configuration/broken_conf_local_var_15.phpt @@ -6,12 +6,12 @@ Broken configuration sp.configuration_file={PWD}/config/broken_conf_local_var_15.ini --FILE-- --EXPECT-- -PHP Fatal error: [snuffleupagus][0.0.0.0][config] Invalid var name: $i$$!@#. in Unknown on line 0 -PHP Fatal error: [snuffleupagus][0.0.0.0][config] Invalid value '$i$$!@#->qwe' for `var` on line 1 in Unknown on line 0 +PHP Fatal error: [snuffleupagus][0.0.0.0][config][log] Invalid var name: $i$$!@#. in Unknown on line 0 +PHP Fatal error: [snuffleupagus][0.0.0.0][config][log] Invalid value '$i$$!@#->qwe' for `var` on line 1 in Unknown on line 0 -Fatal error: [snuffleupagus][0.0.0.0][config] Invalid var name: $i$$!@#. in Unknown on line 0 +Fatal error: [snuffleupagus][0.0.0.0][config][log] Invalid var name: $i$$!@#. in Unknown on line 0 -Fatal error: [snuffleupagus][0.0.0.0][config] Invalid value '$i$$!@#->qwe' for `var` on line 1 in Unknown on line 0 +Fatal error: [snuffleupagus][0.0.0.0][config][log] Invalid value '$i$$!@#->qwe' for `var` on line 1 in Unknown on line 0 -Fatal error: [snuffleupagus][0.0.0.0][config] Invalid configuration file in Unknown on line 0 +Fatal error: [snuffleupagus][0.0.0.0][config][log] Invalid configuration file in Unknown on line 0 Could not startup. \ No newline at end of file diff --git a/src/tests/broken_configuration/broken_conf_local_var_16.phpt b/src/tests/broken_configuration/broken_conf_local_var_16.phpt index 38f2030..0556ab5 100644 --- a/src/tests/broken_configuration/broken_conf_local_var_16.phpt +++ b/src/tests/broken_configuration/broken_conf_local_var_16.phpt @@ -6,12 +6,12 @@ Broken configuration sp.configuration_file={PWD}/config/broken_conf_local_var_16.ini --FILE-- --EXPECT-- -PHP Fatal error: [snuffleupagus][0.0.0.0][config] Missing a closing quote. in Unknown on line 0 -PHP Fatal error: [snuffleupagus][0.0.0.0][config] Invalid value '"' for `var` on line 1 in Unknown on line 0 +PHP Fatal error: [snuffleupagus][0.0.0.0][config][log] Missing a closing quote. in Unknown on line 0 +PHP Fatal error: [snuffleupagus][0.0.0.0][config][log] Invalid value '"' for `var` on line 1 in Unknown on line 0 -Fatal error: [snuffleupagus][0.0.0.0][config] Missing a closing quote. in Unknown on line 0 +Fatal error: [snuffleupagus][0.0.0.0][config][log] Missing a closing quote. in Unknown on line 0 -Fatal error: [snuffleupagus][0.0.0.0][config] Invalid value '"' for `var` on line 1 in Unknown on line 0 +Fatal error: [snuffleupagus][0.0.0.0][config][log] Invalid value '"' for `var` on line 1 in Unknown on line 0 -Fatal error: [snuffleupagus][0.0.0.0][config] Invalid configuration file in Unknown on line 0 +Fatal error: [snuffleupagus][0.0.0.0][config][log] Invalid configuration file in Unknown on line 0 Could not startup. \ No newline at end of file diff --git a/src/tests/broken_configuration/broken_conf_local_var_2.phpt b/src/tests/broken_configuration/broken_conf_local_var_2.phpt index 64bdaf3..34c8ebf 100644 --- a/src/tests/broken_configuration/broken_conf_local_var_2.phpt +++ b/src/tests/broken_configuration/broken_conf_local_var_2.phpt @@ -6,12 +6,12 @@ Broken configuration sp.configuration_file={PWD}/config/broken_conf_local_var_2.ini --FILE-- --EXPECT-- -PHP Fatal error: [snuffleupagus][0.0.0.0][config] Invalid `"` position. in Unknown on line 0 -PHP Fatal error: [snuffleupagus][0.0.0.0][config] Invalid value '""asd' for `var` on line 1 in Unknown on line 0 +PHP Fatal error: [snuffleupagus][0.0.0.0][config][log] Invalid `"` position. in Unknown on line 0 +PHP Fatal error: [snuffleupagus][0.0.0.0][config][log] Invalid value '""asd' for `var` on line 1 in Unknown on line 0 -Fatal error: [snuffleupagus][0.0.0.0][config] Invalid `"` position. in Unknown on line 0 +Fatal error: [snuffleupagus][0.0.0.0][config][log] Invalid `"` position. in Unknown on line 0 -Fatal error: [snuffleupagus][0.0.0.0][config] Invalid value '""asd' for `var` on line 1 in Unknown on line 0 +Fatal error: [snuffleupagus][0.0.0.0][config][log] Invalid value '""asd' for `var` on line 1 in Unknown on line 0 -Fatal error: [snuffleupagus][0.0.0.0][config] Invalid configuration file in Unknown on line 0 +Fatal error: [snuffleupagus][0.0.0.0][config][log] Invalid configuration file in Unknown on line 0 Could not startup. \ No newline at end of file diff --git a/src/tests/broken_configuration/broken_conf_local_var_3.phpt b/src/tests/broken_configuration/broken_conf_local_var_3.phpt index e041ad5..8deac1a 100644 --- a/src/tests/broken_configuration/broken_conf_local_var_3.phpt +++ b/src/tests/broken_configuration/broken_conf_local_var_3.phpt @@ -6,12 +6,12 @@ Broken configuration sp.configuration_file={PWD}/config/broken_conf_local_var_3.ini --FILE-- --EXPECT-- -PHP Fatal error: [snuffleupagus][0.0.0.0][config] Invalid `->` position. in Unknown on line 0 -PHP Fatal error: [snuffleupagus][0.0.0.0][config] Invalid value '$qwe->::' for `var` on line 1 in Unknown on line 0 +PHP Fatal error: [snuffleupagus][0.0.0.0][config][log] Invalid `->` position. in Unknown on line 0 +PHP Fatal error: [snuffleupagus][0.0.0.0][config][log] Invalid value '$qwe->::' for `var` on line 1 in Unknown on line 0 -Fatal error: [snuffleupagus][0.0.0.0][config] Invalid `->` position. in Unknown on line 0 +Fatal error: [snuffleupagus][0.0.0.0][config][log] Invalid `->` position. in Unknown on line 0 -Fatal error: [snuffleupagus][0.0.0.0][config] Invalid value '$qwe->::' for `var` on line 1 in Unknown on line 0 +Fatal error: [snuffleupagus][0.0.0.0][config][log] Invalid value '$qwe->::' for `var` on line 1 in Unknown on line 0 -Fatal error: [snuffleupagus][0.0.0.0][config] Invalid configuration file in Unknown on line 0 +Fatal error: [snuffleupagus][0.0.0.0][config][log] Invalid configuration file in Unknown on line 0 Could not startup. \ No newline at end of file diff --git a/src/tests/broken_configuration/broken_conf_local_var_4.phpt b/src/tests/broken_configuration/broken_conf_local_var_4.phpt index 1c3f673..ca38b2c 100644 --- a/src/tests/broken_configuration/broken_conf_local_var_4.phpt +++ b/src/tests/broken_configuration/broken_conf_local_var_4.phpt @@ -6,12 +6,12 @@ Broken configuration sp.configuration_file={PWD}/config/broken_conf_local_var_4.ini --FILE-- --EXPECT-- -PHP Fatal error: [snuffleupagus][0.0.0.0][config] Invalid `"` position. in Unknown on line 0 -PHP Fatal error: [snuffleupagus][0.0.0.0][config] Invalid value '"asd"asd[]' for `var` on line 1 in Unknown on line 0 +PHP Fatal error: [snuffleupagus][0.0.0.0][config][log] Invalid `"` position. in Unknown on line 0 +PHP Fatal error: [snuffleupagus][0.0.0.0][config][log] Invalid value '"asd"asd[]' for `var` on line 1 in Unknown on line 0 -Fatal error: [snuffleupagus][0.0.0.0][config] Invalid `"` position. in Unknown on line 0 +Fatal error: [snuffleupagus][0.0.0.0][config][log] Invalid `"` position. in Unknown on line 0 -Fatal error: [snuffleupagus][0.0.0.0][config] Invalid value '"asd"asd[]' for `var` on line 1 in Unknown on line 0 +Fatal error: [snuffleupagus][0.0.0.0][config][log] Invalid value '"asd"asd[]' for `var` on line 1 in Unknown on line 0 -Fatal error: [snuffleupagus][0.0.0.0][config] Invalid configuration file in Unknown on line 0 +Fatal error: [snuffleupagus][0.0.0.0][config][log] Invalid configuration file in Unknown on line 0 Could not startup. \ No newline at end of file diff --git a/src/tests/broken_configuration/broken_conf_local_var_5.phpt b/src/tests/broken_configuration/broken_conf_local_var_5.phpt index 113ab39..32f7c33 100644 --- a/src/tests/broken_configuration/broken_conf_local_var_5.phpt +++ b/src/tests/broken_configuration/broken_conf_local_var_5.phpt @@ -6,12 +6,12 @@ Broken configuration sp.configuration_file={PWD}/config/broken_conf_local_var_5.ini --FILE-- --EXPECT-- -PHP Fatal error: [snuffleupagus][0.0.0.0][config] Invalid `'` position. in Unknown on line 0 -PHP Fatal error: [snuffleupagus][0.0.0.0][config] Invalid value ''asd'asd[]' for `var` on line 1 in Unknown on line 0 +PHP Fatal error: [snuffleupagus][0.0.0.0][config][log] Invalid `'` position. in Unknown on line 0 +PHP Fatal error: [snuffleupagus][0.0.0.0][config][log] Invalid value ''asd'asd[]' for `var` on line 1 in Unknown on line 0 -Fatal error: [snuffleupagus][0.0.0.0][config] Invalid `'` position. in Unknown on line 0 +Fatal error: [snuffleupagus][0.0.0.0][config][log] Invalid `'` position. in Unknown on line 0 -Fatal error: [snuffleupagus][0.0.0.0][config] Invalid value ''asd'asd[]' for `var` on line 1 in Unknown on line 0 +Fatal error: [snuffleupagus][0.0.0.0][config][log] Invalid value ''asd'asd[]' for `var` on line 1 in Unknown on line 0 -Fatal error: [snuffleupagus][0.0.0.0][config] Invalid configuration file in Unknown on line 0 +Fatal error: [snuffleupagus][0.0.0.0][config][log] Invalid configuration file in Unknown on line 0 Could not startup. \ No newline at end of file diff --git a/src/tests/broken_configuration/broken_conf_local_var_6.phpt b/src/tests/broken_configuration/broken_conf_local_var_6.phpt index 3d06667..5bfd11d 100644 --- a/src/tests/broken_configuration/broken_conf_local_var_6.phpt +++ b/src/tests/broken_configuration/broken_conf_local_var_6.phpt @@ -6,12 +6,12 @@ Broken configuration sp.configuration_file={PWD}/config/broken_conf_local_var_6.ini --FILE-- --EXPECT-- -PHP Fatal error: [snuffleupagus][0.0.0.0][config] Invalid `'` position. in Unknown on line 0 -PHP Fatal error: [snuffleupagus][0.0.0.0][config] Invalid value '''asd' for `var` on line 1 in Unknown on line 0 +PHP Fatal error: [snuffleupagus][0.0.0.0][config][log] Invalid `'` position. in Unknown on line 0 +PHP Fatal error: [snuffleupagus][0.0.0.0][config][log] Invalid value '''asd' for `var` on line 1 in Unknown on line 0 -Fatal error: [snuffleupagus][0.0.0.0][config] Invalid `'` position. in Unknown on line 0 +Fatal error: [snuffleupagus][0.0.0.0][config][log] Invalid `'` position. in Unknown on line 0 -Fatal error: [snuffleupagus][0.0.0.0][config] Invalid value '''asd' for `var` on line 1 in Unknown on line 0 +Fatal error: [snuffleupagus][0.0.0.0][config][log] Invalid value '''asd' for `var` on line 1 in Unknown on line 0 -Fatal error: [snuffleupagus][0.0.0.0][config] Invalid configuration file in Unknown on line 0 +Fatal error: [snuffleupagus][0.0.0.0][config][log] Invalid configuration file in Unknown on line 0 Could not startup. \ No newline at end of file diff --git a/src/tests/broken_configuration/broken_conf_local_var_7.phpt b/src/tests/broken_configuration/broken_conf_local_var_7.phpt index 11c3da9..aaa5161 100644 --- a/src/tests/broken_configuration/broken_conf_local_var_7.phpt +++ b/src/tests/broken_configuration/broken_conf_local_var_7.phpt @@ -6,12 +6,12 @@ Broken configuration sp.configuration_file={PWD}/config/broken_conf_local_var_7.ini --FILE-- --EXPECT-- -PHP Fatal error: [snuffleupagus][0.0.0.0][config] Invalid `->` position. in Unknown on line 0 -PHP Fatal error: [snuffleupagus][0.0.0.0][config] Invalid value 'asd-->' for `var` on line 1 in Unknown on line 0 +PHP Fatal error: [snuffleupagus][0.0.0.0][config][log] Invalid `->` position. in Unknown on line 0 +PHP Fatal error: [snuffleupagus][0.0.0.0][config][log] Invalid value 'asd-->' for `var` on line 1 in Unknown on line 0 -Fatal error: [snuffleupagus][0.0.0.0][config] Invalid `->` position. in Unknown on line 0 +Fatal error: [snuffleupagus][0.0.0.0][config][log] Invalid `->` position. in Unknown on line 0 -Fatal error: [snuffleupagus][0.0.0.0][config] Invalid value 'asd-->' for `var` on line 1 in Unknown on line 0 +Fatal error: [snuffleupagus][0.0.0.0][config][log] Invalid value 'asd-->' for `var` on line 1 in Unknown on line 0 -Fatal error: [snuffleupagus][0.0.0.0][config] Invalid configuration file in Unknown on line 0 +Fatal error: [snuffleupagus][0.0.0.0][config][log] Invalid configuration file in Unknown on line 0 Could not startup. \ No newline at end of file diff --git a/src/tests/broken_configuration/broken_conf_local_var_8.phpt b/src/tests/broken_configuration/broken_conf_local_var_8.phpt index 2154284..f088523 100644 --- a/src/tests/broken_configuration/broken_conf_local_var_8.phpt +++ b/src/tests/broken_configuration/broken_conf_local_var_8.phpt @@ -6,12 +6,12 @@ Broken configuration sp.configuration_file={PWD}/config/broken_conf_local_var_8.ini --FILE-- --EXPECT-- -PHP Fatal error: [snuffleupagus][0.0.0.0][config] Invalid `]` position. in Unknown on line 0 -PHP Fatal error: [snuffleupagus][0.0.0.0][config] Invalid value 'asd[asd]"asd"' for `var` on line 1 in Unknown on line 0 +PHP Fatal error: [snuffleupagus][0.0.0.0][config][log] Invalid `]` position. in Unknown on line 0 +PHP Fatal error: [snuffleupagus][0.0.0.0][config][log] Invalid value 'asd[asd]"asd"' for `var` on line 1 in Unknown on line 0 -Fatal error: [snuffleupagus][0.0.0.0][config] Invalid `]` position. in Unknown on line 0 +Fatal error: [snuffleupagus][0.0.0.0][config][log] Invalid `]` position. in Unknown on line 0 -Fatal error: [snuffleupagus][0.0.0.0][config] Invalid value 'asd[asd]"asd"' for `var` on line 1 in Unknown on line 0 +Fatal error: [snuffleupagus][0.0.0.0][config][log] Invalid value 'asd[asd]"asd"' for `var` on line 1 in Unknown on line 0 -Fatal error: [snuffleupagus][0.0.0.0][config] Invalid configuration file in Unknown on line 0 +Fatal error: [snuffleupagus][0.0.0.0][config][log] Invalid configuration file in Unknown on line 0 Could not startup. \ No newline at end of file diff --git a/src/tests/broken_configuration/broken_conf_local_var_9.phpt b/src/tests/broken_configuration/broken_conf_local_var_9.phpt index ab6ae78..c8fb793 100644 --- a/src/tests/broken_configuration/broken_conf_local_var_9.phpt +++ b/src/tests/broken_configuration/broken_conf_local_var_9.phpt @@ -6,12 +6,12 @@ Broken configuration sp.configuration_file={PWD}/config/broken_conf_local_var_9.ini --FILE-- --EXPECT-- -PHP Fatal error: [snuffleupagus][0.0.0.0][config] Invalid `]` position. in Unknown on line 0 -PHP Fatal error: [snuffleupagus][0.0.0.0][config] Invalid value 'asd[asd]'asd'' for `var` on line 1 in Unknown on line 0 +PHP Fatal error: [snuffleupagus][0.0.0.0][config][log] Invalid `]` position. in Unknown on line 0 +PHP Fatal error: [snuffleupagus][0.0.0.0][config][log] Invalid value 'asd[asd]'asd'' for `var` on line 1 in Unknown on line 0 -Fatal error: [snuffleupagus][0.0.0.0][config] Invalid `]` position. in Unknown on line 0 +Fatal error: [snuffleupagus][0.0.0.0][config][log] Invalid `]` position. in Unknown on line 0 -Fatal error: [snuffleupagus][0.0.0.0][config] Invalid value 'asd[asd]'asd'' for `var` on line 1 in Unknown on line 0 +Fatal error: [snuffleupagus][0.0.0.0][config][log] Invalid value 'asd[asd]'asd'' for `var` on line 1 in Unknown on line 0 -Fatal error: [snuffleupagus][0.0.0.0][config] Invalid configuration file in Unknown on line 0 +Fatal error: [snuffleupagus][0.0.0.0][config][log] Invalid configuration file in Unknown on line 0 Could not startup. \ No newline at end of file diff --git a/src/tests/broken_configuration/broken_conf_lots_of_quotes.phpt b/src/tests/broken_configuration/broken_conf_lots_of_quotes.phpt index e69da0b..1a6f61c 100644 --- a/src/tests/broken_configuration/broken_conf_lots_of_quotes.phpt +++ b/src/tests/broken_configuration/broken_conf_lots_of_quotes.phpt @@ -6,9 +6,9 @@ Configuration line with too many quotes sp.configuration_file={PWD}/config/broken_conf_lots_of_quotes.ini --FILE-- --EXPECT-- -PHP Fatal error: [snuffleupagus][0.0.0.0][error] There is an issue with the parsing of '"this\"is a weird\"\"\"cookie\"name"");': it doesn't look like a valid string on line 1 in Unknown on line 0 +PHP Fatal error: [snuffleupagus][0.0.0.0][error][log] There is an issue with the parsing of '"this\"is a weird\"\"\"cookie\"name"");': it doesn't look like a valid string on line 1 in Unknown on line 0 -Fatal error: [snuffleupagus][0.0.0.0][error] There is an issue with the parsing of '"this\"is a weird\"\"\"cookie\"name"");': it doesn't look like a valid string on line 1 in Unknown on line 0 +Fatal error: [snuffleupagus][0.0.0.0][error][log] There is an issue with the parsing of '"this\"is a weird\"\"\"cookie\"name"");': it doesn't look like a valid string on line 1 in Unknown on line 0 -Fatal error: [snuffleupagus][0.0.0.0][config] Invalid configuration file in Unknown on line 0 +Fatal error: [snuffleupagus][0.0.0.0][config][log] Invalid configuration file in Unknown on line 0 Could not startup. \ No newline at end of file diff --git a/src/tests/broken_configuration/broken_conf_missing_script.phpt b/src/tests/broken_configuration/broken_conf_missing_script.phpt index 97d3743..8bbbff1 100644 --- a/src/tests/broken_configuration/broken_conf_missing_script.phpt +++ b/src/tests/broken_configuration/broken_conf_missing_script.phpt @@ -8,9 +8,9 @@ sp.configuration_file={PWD}/config/broken_conf_missing_script.ini echo 1; ?> --EXPECTF-- -PHP Fatal error: [snuffleupagus][0.0.0.0][config] The `script` directive is mandatory in '.enable();' on line 1 in Unknown on line 0 +PHP Fatal error: [snuffleupagus][0.0.0.0][config][log] The `script` directive is mandatory in '.enable();' on line 1 in Unknown on line 0 -Fatal error: [snuffleupagus][0.0.0.0][config] The `script` directive is mandatory in '.enable();' on line 1 in Unknown on line 0 +Fatal error: [snuffleupagus][0.0.0.0][config][log] The `script` directive is mandatory in '.enable();' on line 1 in Unknown on line 0 -Fatal error: [snuffleupagus][0.0.0.0][config] Invalid configuration file in Unknown on line 0 +Fatal error: [snuffleupagus][0.0.0.0][config][log] Invalid configuration file in Unknown on line 0 Could not startup. diff --git a/src/tests/broken_configuration/broken_conf_mutually_exclusive.phpt b/src/tests/broken_configuration/broken_conf_mutually_exclusive.phpt index d76798b..ccbcc6e 100644 --- a/src/tests/broken_configuration/broken_conf_mutually_exclusive.phpt +++ b/src/tests/broken_configuration/broken_conf_mutually_exclusive.phpt @@ -6,6 +6,6 @@ Broken configuration sp.configuration_file={PWD}/config/broken_conf_mutually_exclusive.ini --FILE-- --EXPECT-- -PHP Fatal error: [snuffleupagus][0.0.0.0][config] Invalid configuration line: 'sp.disabled_functions.function("system").param("id").value("42").value_r("^id$").drop();': '.value' and '.regexp' are mutually exclusive on line 1 in Unknown on line 0 +PHP Fatal error: [snuffleupagus][0.0.0.0][config][log] Invalid configuration line: 'sp.disabled_functions.function("system").param("id").value("42").value_r("^id$").drop();': '.value' and '.regexp' are mutually exclusive on line 1 in Unknown on line 0 -Fatal error: [snuffleupagus][0.0.0.0][config] Invalid configuration line: 'sp.disabled_functions.function("system").param("id").value("42").value_r("^id$").drop();': '.value' and '.regexp' are mutually exclusive on line 1 in Unknown on line 0 \ No newline at end of file +Fatal error: [snuffleupagus][0.0.0.0][config][log] Invalid configuration line: 'sp.disabled_functions.function("system").param("id").value("42").value_r("^id$").drop();': '.value' and '.regexp' are mutually exclusive on line 1 in Unknown on line 0 \ No newline at end of file diff --git a/src/tests/broken_configuration/broken_conf_mutually_exclusive10.phpt b/src/tests/broken_configuration/broken_conf_mutually_exclusive10.phpt index 9ac8881..dc1ad5c 100644 --- a/src/tests/broken_configuration/broken_conf_mutually_exclusive10.phpt +++ b/src/tests/broken_configuration/broken_conf_mutually_exclusive10.phpt @@ -6,9 +6,9 @@ Broken configuration - enabled/disabled readonly sp.configuration_file={PWD}/config/broken_conf_mutually_exclusive10.ini --FILE-- --EXPECT-- -PHP Fatal error: [snuffleupagus][0.0.0.0][config] A rule can't be enabled and disabled on line 1 in Unknown on line 0 +PHP Fatal error: [snuffleupagus][0.0.0.0][config][log] A rule can't be enabled and disabled on line 1 in Unknown on line 0 -Fatal error: [snuffleupagus][0.0.0.0][config] A rule can't be enabled and disabled on line 1 in Unknown on line 0 +Fatal error: [snuffleupagus][0.0.0.0][config][log] A rule can't be enabled and disabled on line 1 in Unknown on line 0 -Fatal error: [snuffleupagus][0.0.0.0][config] Invalid configuration file in Unknown on line 0 +Fatal error: [snuffleupagus][0.0.0.0][config][log] Invalid configuration file in Unknown on line 0 Could not startup. \ No newline at end of file diff --git a/src/tests/broken_configuration/broken_conf_mutually_exclusive11.phpt b/src/tests/broken_configuration/broken_conf_mutually_exclusive11.phpt index 69b2e31..41c627b 100644 --- a/src/tests/broken_configuration/broken_conf_mutually_exclusive11.phpt +++ b/src/tests/broken_configuration/broken_conf_mutually_exclusive11.phpt @@ -6,9 +6,9 @@ Broken configuration - ret and var are mutually exclusives sp.configuration_file={PWD}/config/broken_conf_mutually_exclusive11.ini --FILE-- --EXPECT-- -PHP Fatal error: [snuffleupagus][0.0.0.0][config] Invalid configuration line: 'sp.disabled_functions.function("strcmp").drop().ret("hip").var("hop");':`ret` and `var` are mutually exclusive on line 1 in Unknown on line 0 +PHP Fatal error: [snuffleupagus][0.0.0.0][config][log] Invalid configuration line: 'sp.disabled_functions.function("strcmp").drop().ret("hip").var("hop");':`ret` and `var` are mutually exclusive on line 1 in Unknown on line 0 -Fatal error: [snuffleupagus][0.0.0.0][config] Invalid configuration line: 'sp.disabled_functions.function("strcmp").drop().ret("hip").var("hop");':`ret` and `var` are mutually exclusive on line 1 in Unknown on line 0 +Fatal error: [snuffleupagus][0.0.0.0][config][log] Invalid configuration line: 'sp.disabled_functions.function("strcmp").drop().ret("hip").var("hop");':`ret` and `var` are mutually exclusive on line 1 in Unknown on line 0 -Fatal error: [snuffleupagus][0.0.0.0][config] Invalid configuration file in Unknown on line 0 +Fatal error: [snuffleupagus][0.0.0.0][config][log] Invalid configuration file in Unknown on line 0 Could not startup. diff --git a/src/tests/broken_configuration/broken_conf_mutually_exclusive12.phpt b/src/tests/broken_configuration/broken_conf_mutually_exclusive12.phpt index dac0f16..e7d345c 100644 --- a/src/tests/broken_configuration/broken_conf_mutually_exclusive12.phpt +++ b/src/tests/broken_configuration/broken_conf_mutually_exclusive12.phpt @@ -6,9 +6,9 @@ Broken configuration - ret and value are mutually exclusive sp.configuration_file={PWD}/config/broken_conf_mutually_exclusive12.ini --FILE-- --EXPECT-- -PHP Fatal error: [snuffleupagus][0.0.0.0][config] Invalid configuration line: 'sp.disabled_functions.function("strcmp").drop().ret("hip").value("hop");':`ret` and `value` are mutually exclusive on line 1 in Unknown on line 0 +PHP Fatal error: [snuffleupagus][0.0.0.0][config][log] Invalid configuration line: 'sp.disabled_functions.function("strcmp").drop().ret("hip").value("hop");':`ret` and `value` are mutually exclusive on line 1 in Unknown on line 0 -Fatal error: [snuffleupagus][0.0.0.0][config] Invalid configuration line: 'sp.disabled_functions.function("strcmp").drop().ret("hip").value("hop");':`ret` and `value` are mutually exclusive on line 1 in Unknown on line 0 +Fatal error: [snuffleupagus][0.0.0.0][config][log] Invalid configuration line: 'sp.disabled_functions.function("strcmp").drop().ret("hip").value("hop");':`ret` and `value` are mutually exclusive on line 1 in Unknown on line 0 -Fatal error: [snuffleupagus][0.0.0.0][config] Invalid configuration file in Unknown on line 0 +Fatal error: [snuffleupagus][0.0.0.0][config][log] Invalid configuration file in Unknown on line 0 Could not startup. diff --git a/src/tests/broken_configuration/broken_conf_mutually_exclusive2.phpt b/src/tests/broken_configuration/broken_conf_mutually_exclusive2.phpt index 6e71f83..9e8e8ab 100644 --- a/src/tests/broken_configuration/broken_conf_mutually_exclusive2.phpt +++ b/src/tests/broken_configuration/broken_conf_mutually_exclusive2.phpt @@ -6,6 +6,6 @@ Broken configuration sp.configuration_file={PWD}/config/broken_conf_mutually_exclusive2.ini --FILE-- --EXPECT-- -PHP Fatal error: [snuffleupagus][0.0.0.0][config] Invalid configuration line: 'sp.disabled_functions.function("system").function_r("system").param("id").value("42").drop();': '.r_function' and '.function' are mutually exclusive on line 1 in Unknown on line 0 +PHP Fatal error: [snuffleupagus][0.0.0.0][config][log] Invalid configuration line: 'sp.disabled_functions.function("system").function_r("system").param("id").value("42").drop();': '.r_function' and '.function' are mutually exclusive on line 1 in Unknown on line 0 -Fatal error: [snuffleupagus][0.0.0.0][config] Invalid configuration line: 'sp.disabled_functions.function("system").function_r("system").param("id").value("42").drop();': '.r_function' and '.function' are mutually exclusive on line 1 in Unknown on line 0 \ No newline at end of file +Fatal error: [snuffleupagus][0.0.0.0][config][log] Invalid configuration line: 'sp.disabled_functions.function("system").function_r("system").param("id").value("42").drop();': '.r_function' and '.function' are mutually exclusive on line 1 in Unknown on line 0 \ No newline at end of file diff --git a/src/tests/broken_configuration/broken_conf_mutually_exclusive3.phpt b/src/tests/broken_configuration/broken_conf_mutually_exclusive3.phpt index 46c589b..a4189f9 100644 --- a/src/tests/broken_configuration/broken_conf_mutually_exclusive3.phpt +++ b/src/tests/broken_configuration/broken_conf_mutually_exclusive3.phpt @@ -6,6 +6,6 @@ Broken configuration sp.configuration_file={PWD}/config/broken_conf_mutually_exclusive3.ini --FILE-- --EXPECT-- -PHP Fatal error: [snuffleupagus][0.0.0.0][config] Invalid configuration line: 'sp.disabled_functions.function("system").param("id").value("42").filename_r("^id$").filename("pouet.txt").drop();': '.r_filename' and '.filename' are mutually exclusive on line 1 in Unknown on line 0 +PHP Fatal error: [snuffleupagus][0.0.0.0][config][log] Invalid configuration line: 'sp.disabled_functions.function("system").param("id").value("42").filename_r("^id$").filename("pouet.txt").drop();': '.r_filename' and '.filename' are mutually exclusive on line 1 in Unknown on line 0 -Fatal error: [snuffleupagus][0.0.0.0][config] Invalid configuration line: 'sp.disabled_functions.function("system").param("id").value("42").filename_r("^id$").filename("pouet.txt").drop();': '.r_filename' and '.filename' are mutually exclusive on line 1 in Unknown on line 0 \ No newline at end of file +Fatal error: [snuffleupagus][0.0.0.0][config][log] Invalid configuration line: 'sp.disabled_functions.function("system").param("id").value("42").filename_r("^id$").filename("pouet.txt").drop();': '.r_filename' and '.filename' are mutually exclusive on line 1 in Unknown on line 0 \ No newline at end of file diff --git a/src/tests/broken_configuration/broken_conf_mutually_exclusive4.phpt b/src/tests/broken_configuration/broken_conf_mutually_exclusive4.phpt index 84c814b..70eaea0 100644 --- a/src/tests/broken_configuration/broken_conf_mutually_exclusive4.phpt +++ b/src/tests/broken_configuration/broken_conf_mutually_exclusive4.phpt @@ -6,9 +6,9 @@ Broken configuration sp.configuration_file={PWD}/config/broken_conf_mutually_exclusive4.ini --FILE-- --EXPECT-- -PHP Fatal error: [snuffleupagus][0.0.0.0][config] Invalid configuration line: 'sp.disabled_functions.function("system").param("id").value("42").param_r("^id$").drop();':'.r_param', '.param' and '.pos' are mutually exclusive on line 1 in Unknown on line 0 +PHP Fatal error: [snuffleupagus][0.0.0.0][config][log] Invalid configuration line: 'sp.disabled_functions.function("system").param("id").value("42").param_r("^id$").drop();':'.r_param', '.param' and '.pos' are mutually exclusive on line 1 in Unknown on line 0 -Fatal error: [snuffleupagus][0.0.0.0][config] Invalid configuration line: 'sp.disabled_functions.function("system").param("id").value("42").param_r("^id$").drop();':'.r_param', '.param' and '.pos' are mutually exclusive on line 1 in Unknown on line 0 +Fatal error: [snuffleupagus][0.0.0.0][config][log] Invalid configuration line: 'sp.disabled_functions.function("system").param("id").value("42").param_r("^id$").drop();':'.r_param', '.param' and '.pos' are mutually exclusive on line 1 in Unknown on line 0 -Fatal error: [snuffleupagus][0.0.0.0][config] Invalid configuration file in Unknown on line 0 +Fatal error: [snuffleupagus][0.0.0.0][config][log] Invalid configuration file in Unknown on line 0 Could not startup. \ No newline at end of file diff --git a/src/tests/broken_configuration/broken_conf_mutually_exclusive5.phpt b/src/tests/broken_configuration/broken_conf_mutually_exclusive5.phpt index e8c1f75..cfbddfb 100644 --- a/src/tests/broken_configuration/broken_conf_mutually_exclusive5.phpt +++ b/src/tests/broken_configuration/broken_conf_mutually_exclusive5.phpt @@ -6,6 +6,6 @@ Broken configuration sp.configuration_file={PWD}/config/broken_conf_mutually_exclusive5.ini --FILE-- --EXPECT-- -PHP Fatal error: [snuffleupagus][0.0.0.0][config] Invalid configuration line: 'sp.disabled_functions.function("system").ret("0").drop().ret_r("^0$");': '.r_ret' and '.ret' are mutually exclusive on line 1 in Unknown on line 0 +PHP Fatal error: [snuffleupagus][0.0.0.0][config][log] Invalid configuration line: 'sp.disabled_functions.function("system").ret("0").drop().ret_r("^0$");': '.r_ret' and '.ret' are mutually exclusive on line 1 in Unknown on line 0 -Fatal error: [snuffleupagus][0.0.0.0][config] Invalid configuration line: 'sp.disabled_functions.function("system").ret("0").drop().ret_r("^0$");': '.r_ret' and '.ret' are mutually exclusive on line 1 in Unknown on line 0 \ No newline at end of file +Fatal error: [snuffleupagus][0.0.0.0][config][log] Invalid configuration line: 'sp.disabled_functions.function("system").ret("0").drop().ret_r("^0$");': '.r_ret' and '.ret' are mutually exclusive on line 1 in Unknown on line 0 \ No newline at end of file diff --git a/src/tests/broken_configuration/broken_conf_mutually_exclusive6.phpt b/src/tests/broken_configuration/broken_conf_mutually_exclusive6.phpt index bbbb179..c0415ac 100644 --- a/src/tests/broken_configuration/broken_conf_mutually_exclusive6.phpt +++ b/src/tests/broken_configuration/broken_conf_mutually_exclusive6.phpt @@ -6,9 +6,9 @@ Broken configuration sp.configuration_file={PWD}/config/broken_conf_mutually_exclusive6.ini --FILE-- --EXPECT-- -PHP Fatal error: [snuffleupagus][0.0.0.0][config] Invalid configuration line: 'sp.disabled_functions.function("system").param("id").value("42").ret_r("^0$").drop();':`ret` and `param` are mutually exclusive on line 1 in Unknown on line 0 +PHP Fatal error: [snuffleupagus][0.0.0.0][config][log] Invalid configuration line: 'sp.disabled_functions.function("system").param("id").value("42").ret_r("^0$").drop();':`ret` and `param` are mutually exclusive on line 1 in Unknown on line 0 -Fatal error: [snuffleupagus][0.0.0.0][config] Invalid configuration line: 'sp.disabled_functions.function("system").param("id").value("42").ret_r("^0$").drop();':`ret` and `param` are mutually exclusive on line 1 in Unknown on line 0 +Fatal error: [snuffleupagus][0.0.0.0][config][log] Invalid configuration line: 'sp.disabled_functions.function("system").param("id").value("42").ret_r("^0$").drop();':`ret` and `param` are mutually exclusive on line 1 in Unknown on line 0 -Fatal error: [snuffleupagus][0.0.0.0][config] Invalid configuration file in Unknown on line 0 +Fatal error: [snuffleupagus][0.0.0.0][config][log] Invalid configuration file in Unknown on line 0 Could not startup. \ No newline at end of file diff --git a/src/tests/broken_configuration/broken_conf_mutually_exclusive7.phpt b/src/tests/broken_configuration/broken_conf_mutually_exclusive7.phpt index ecd39a0..41e754e 100644 --- a/src/tests/broken_configuration/broken_conf_mutually_exclusive7.phpt +++ b/src/tests/broken_configuration/broken_conf_mutually_exclusive7.phpt @@ -6,9 +6,9 @@ Broken configuration sp.configuration_file={PWD}/config/broken_conf_mutually_exclusive7.ini --FILE-- --EXPECT-- -PHP Fatal error: [snuffleupagus][0.0.0.0][config] Invalid configuration line: 'sp.disabled_functions.function("system").ret("0").drop().allow();': The rule must either be a `drop` or `allow` one on line 1 in Unknown on line 0 +PHP Fatal error: [snuffleupagus][0.0.0.0][config][log] Invalid configuration line: 'sp.disabled_functions.function("system").ret("0").drop().allow();': The rule must either be a `drop` or `allow` one on line 1 in Unknown on line 0 -Fatal error: [snuffleupagus][0.0.0.0][config] Invalid configuration line: 'sp.disabled_functions.function("system").ret("0").drop().allow();': The rule must either be a `drop` or `allow` one on line 1 in Unknown on line 0 +Fatal error: [snuffleupagus][0.0.0.0][config][log] Invalid configuration line: 'sp.disabled_functions.function("system").ret("0").drop().allow();': The rule must either be a `drop` or `allow` one on line 1 in Unknown on line 0 -Fatal error: [snuffleupagus][0.0.0.0][config] Invalid configuration file in Unknown on line 0 +Fatal error: [snuffleupagus][0.0.0.0][config][log] Invalid configuration file in Unknown on line 0 Could not startup. \ No newline at end of file diff --git a/src/tests/broken_configuration/broken_conf_mutually_exclusive8.phpt b/src/tests/broken_configuration/broken_conf_mutually_exclusive8.phpt index f9e4692..e650d43 100644 --- a/src/tests/broken_configuration/broken_conf_mutually_exclusive8.phpt +++ b/src/tests/broken_configuration/broken_conf_mutually_exclusive8.phpt @@ -6,9 +6,9 @@ Broken configuration sp.configuration_file={PWD}/config/broken_conf_mutually_exclusive8.ini --FILE-- --EXPECT-- -PHP Fatal error: [snuffleupagus][0.0.0.0][config] Invalid configuration line: 'sp.disabled_functions.ret("0").drop();': must take a function name on line 1 in Unknown on line 0 +PHP Fatal error: [snuffleupagus][0.0.0.0][config][log] Invalid configuration line: 'sp.disabled_functions.ret("0").drop();': must take a function name on line 1 in Unknown on line 0 -Fatal error: [snuffleupagus][0.0.0.0][config] Invalid configuration line: 'sp.disabled_functions.ret("0").drop();': must take a function name on line 1 in Unknown on line 0 +Fatal error: [snuffleupagus][0.0.0.0][config][log] Invalid configuration line: 'sp.disabled_functions.ret("0").drop();': must take a function name on line 1 in Unknown on line 0 -Fatal error: [snuffleupagus][0.0.0.0][config] Invalid configuration file in Unknown on line 0 +Fatal error: [snuffleupagus][0.0.0.0][config][log] Invalid configuration file in Unknown on line 0 Could not startup. \ No newline at end of file diff --git a/src/tests/broken_configuration/broken_conf_mutually_exclusive9.phpt b/src/tests/broken_configuration/broken_conf_mutually_exclusive9.phpt index 0b574eb..46dfc28 100644 --- a/src/tests/broken_configuration/broken_conf_mutually_exclusive9.phpt +++ b/src/tests/broken_configuration/broken_conf_mutually_exclusive9.phpt @@ -6,9 +6,9 @@ Broken configuration - enabled/disabled unserialize sp.configuration_file={PWD}/config/broken_conf_mutually_exclusive9.ini --FILE-- --EXPECT-- -PHP Fatal error: [snuffleupagus][0.0.0.0][config] A rule can't be enabled and disabled on line 1 in Unknown on line 0 +PHP Fatal error: [snuffleupagus][0.0.0.0][config][log] A rule can't be enabled and disabled on line 1 in Unknown on line 0 -Fatal error: [snuffleupagus][0.0.0.0][config] A rule can't be enabled and disabled on line 1 in Unknown on line 0 +Fatal error: [snuffleupagus][0.0.0.0][config][log] A rule can't be enabled and disabled on line 1 in Unknown on line 0 -Fatal error: [snuffleupagus][0.0.0.0][config] Invalid configuration file in Unknown on line 0 +Fatal error: [snuffleupagus][0.0.0.0][config][log] Invalid configuration file in Unknown on line 0 Could not startup. \ No newline at end of file diff --git a/src/tests/broken_configuration/broken_conf_no_cookie_action.phpt b/src/tests/broken_configuration/broken_conf_no_cookie_action.phpt index d2ee961..da21967 100644 --- a/src/tests/broken_configuration/broken_conf_no_cookie_action.phpt +++ b/src/tests/broken_configuration/broken_conf_no_cookie_action.phpt @@ -6,9 +6,9 @@ Bad config, invalid action. sp.configuration_file={PWD}/config/broken_conf_cookie_action.ini --FILE-- --EXPECT-- -PHP Fatal error: [snuffleupagus][0.0.0.0][config] You must specify a at least one action to a cookie on line 1 in Unknown on line 0 +PHP Fatal error: [snuffleupagus][0.0.0.0][config][log] You must specify a at least one action to a cookie on line 1 in Unknown on line 0 -Fatal error: [snuffleupagus][0.0.0.0][config] You must specify a at least one action to a cookie on line 1 in Unknown on line 0 +Fatal error: [snuffleupagus][0.0.0.0][config][log] You must specify a at least one action to a cookie on line 1 in Unknown on line 0 -Fatal error: [snuffleupagus][0.0.0.0][config] Invalid configuration file in Unknown on line 0 +Fatal error: [snuffleupagus][0.0.0.0][config][log] Invalid configuration file in Unknown on line 0 Could not startup. \ No newline at end of file diff --git a/src/tests/broken_configuration/broken_conf_no_cookie_name.phpt b/src/tests/broken_configuration/broken_conf_no_cookie_name.phpt index ec82655..6eed345 100644 --- a/src/tests/broken_configuration/broken_conf_no_cookie_name.phpt +++ b/src/tests/broken_configuration/broken_conf_no_cookie_name.phpt @@ -1,14 +1,14 @@ --TEST-- -Borken configuration - encrypted cookie with no name +Broken configuration - encrypted cookie with no name --SKIPIF-- --INI-- sp.configuration_file={PWD}/config/config_encrypted_cookies_noname.ini --FILE-- --EXPECT-- -PHP Fatal error: [snuffleupagus][0.0.0.0][config] You must specify a cookie name/regexp on line 2 in Unknown on line 0 +PHP Fatal error: [snuffleupagus][0.0.0.0][config][log] You must specify a cookie name/regexp on line 2 in Unknown on line 0 -Fatal error: [snuffleupagus][0.0.0.0][config] You must specify a cookie name/regexp on line 2 in Unknown on line 0 +Fatal error: [snuffleupagus][0.0.0.0][config][log] You must specify a cookie name/regexp on line 2 in Unknown on line 0 -Fatal error: [snuffleupagus][0.0.0.0][config] Invalid configuration file in Unknown on line 0 +Fatal error: [snuffleupagus][0.0.0.0][config][log] Invalid configuration file in Unknown on line 0 Could not startup. \ No newline at end of file diff --git a/src/tests/broken_configuration/broken_conf_no_file_specified.phpt b/src/tests/broken_configuration/broken_conf_no_file_specified.phpt index 98ec80c..8b360d4 100644 --- a/src/tests/broken_configuration/broken_conf_no_file_specified.phpt +++ b/src/tests/broken_configuration/broken_conf_no_file_specified.phpt @@ -6,5 +6,5 @@ Broken configuration - No configuration file specified --FILE-- --EXPECT-- -Fatal error: [snuffleupagus][0.0.0.0][config] Invalid configuration file in Unknown on line 0 +Fatal error: [snuffleupagus][0.0.0.0][config][log] Invalid configuration file in Unknown on line 0 Could not startup. diff --git a/src/tests/broken_configuration/broken_conf_nonexisting_script.phpt b/src/tests/broken_configuration/broken_conf_nonexisting_script.phpt index b518295..64d8171 100644 --- a/src/tests/broken_configuration/broken_conf_nonexisting_script.phpt +++ b/src/tests/broken_configuration/broken_conf_nonexisting_script.phpt @@ -8,9 +8,9 @@ sp.configuration_file={PWD}/config/broken_conf_nonexisting_script.ini echo 1; ?> --EXPECTF-- -PHP Fatal error: [snuffleupagus][0.0.0.0][config] The `script` (./non_existing_script.sh) doesn't exist on line 1 in Unknown on line 0 +PHP Fatal error: [snuffleupagus][0.0.0.0][config][log] The `script` (./non_existing_script.sh) doesn't exist on line 1 in Unknown on line 0 -Fatal error: [snuffleupagus][0.0.0.0][config] The `script` (./non_existing_script.sh) doesn't exist on line 1 in Unknown on line 0 +Fatal error: [snuffleupagus][0.0.0.0][config][log] The `script` (./non_existing_script.sh) doesn't exist on line 1 in Unknown on line 0 -Fatal error: [snuffleupagus][0.0.0.0][config] Invalid configuration file in Unknown on line 0 +Fatal error: [snuffleupagus][0.0.0.0][config][log] Invalid configuration file in Unknown on line 0 Could not startup. diff --git a/src/tests/broken_configuration/broken_conf_quotes.phpt b/src/tests/broken_configuration/broken_conf_quotes.phpt index 86fac81..9a8de98 100644 --- a/src/tests/broken_configuration/broken_conf_quotes.phpt +++ b/src/tests/broken_configuration/broken_conf_quotes.phpt @@ -6,12 +6,12 @@ Broken configuration - missing quote sp.configuration_file={PWD}/config/broken_conf_quotes.ini --FILE-- --EXPECT-- -PHP Fatal error: [snuffleupagus][0.0.0.0][config] You forgot to close a bracket. in Unknown on line 0 -PHP Fatal error: [snuffleupagus][0.0.0.0][config] Invalid value '_SERVER[PHP_SELF' for `var` on line 1 in Unknown on line 0 +PHP Fatal error: [snuffleupagus][0.0.0.0][config][log] You forgot to close a bracket. in Unknown on line 0 +PHP Fatal error: [snuffleupagus][0.0.0.0][config][log] Invalid value '_SERVER[PHP_SELF' for `var` on line 1 in Unknown on line 0 -Fatal error: [snuffleupagus][0.0.0.0][config] You forgot to close a bracket. in Unknown on line 0 +Fatal error: [snuffleupagus][0.0.0.0][config][log] You forgot to close a bracket. in Unknown on line 0 -Fatal error: [snuffleupagus][0.0.0.0][config] Invalid value '_SERVER[PHP_SELF' for `var` on line 1 in Unknown on line 0 +Fatal error: [snuffleupagus][0.0.0.0][config][log] Invalid value '_SERVER[PHP_SELF' for `var` on line 1 in Unknown on line 0 -Fatal error: [snuffleupagus][0.0.0.0][config] Invalid configuration file in Unknown on line 0 +Fatal error: [snuffleupagus][0.0.0.0][config][log] Invalid configuration file in Unknown on line 0 Could not startup. \ No newline at end of file diff --git a/src/tests/broken_configuration/broken_conf_readonly_exec.phpt b/src/tests/broken_configuration/broken_conf_readonly_exec.phpt index ca92aab..1df0923 100644 --- a/src/tests/broken_configuration/broken_conf_readonly_exec.phpt +++ b/src/tests/broken_configuration/broken_conf_readonly_exec.phpt @@ -8,9 +8,9 @@ sp.configuration_file={PWD}/config/broken_conf_readonly_exec.ini echo 1; ?> --EXPECTF-- -PHP Fatal error: [snuffleupagus][0.0.0.0][config] Trailing chars '234);' at the end of '.enable(1234);' on line 1 in Unknown on line 0 +PHP Fatal error: [snuffleupagus][0.0.0.0][config][log] Trailing chars '234);' at the end of '.enable(1234);' on line 1 in Unknown on line 0 -Fatal error: [snuffleupagus][0.0.0.0][config] Trailing chars '234);' at the end of '.enable(1234);' on line 1 in Unknown on line 0 +Fatal error: [snuffleupagus][0.0.0.0][config][log] Trailing chars '234);' at the end of '.enable(1234);' on line 1 in Unknown on line 0 -Fatal error: [snuffleupagus][0.0.0.0][config] Invalid configuration file in Unknown on line 0 +Fatal error: [snuffleupagus][0.0.0.0][config][log] Invalid configuration file in Unknown on line 0 Could not startup. diff --git a/src/tests/broken_configuration/broken_conf_samesite.phpt b/src/tests/broken_configuration/broken_conf_samesite.phpt index f325891..fd82903 100644 --- a/src/tests/broken_configuration/broken_conf_samesite.phpt +++ b/src/tests/broken_configuration/broken_conf_samesite.phpt @@ -6,9 +6,9 @@ Bad config, invalid samesite type. sp.configuration_file={PWD}/config/broken_conf_cookie_samesite.ini --FILE-- --EXPECT-- -PHP Fatal error: [snuffleupagus][0.0.0.0][config] nop is an invalid value to samesite (expected Lax or Strict) on line 1 in Unknown on line 0 +PHP Fatal error: [snuffleupagus][0.0.0.0][config][log] nop is an invalid value to samesite (expected Lax or Strict) on line 1 in Unknown on line 0 -Fatal error: [snuffleupagus][0.0.0.0][config] nop is an invalid value to samesite (expected Lax or Strict) on line 1 in Unknown on line 0 +Fatal error: [snuffleupagus][0.0.0.0][config][log] nop is an invalid value to samesite (expected Lax or Strict) on line 1 in Unknown on line 0 -Fatal error: [snuffleupagus][0.0.0.0][config] Invalid configuration file in Unknown on line 0 +Fatal error: [snuffleupagus][0.0.0.0][config][log] Invalid configuration file in Unknown on line 0 Could not startup. \ No newline at end of file diff --git a/src/tests/broken_configuration/broken_conf_session_encryption.phpt b/src/tests/broken_configuration/broken_conf_session_encryption.phpt index a010bd1..2604f37 100644 --- a/src/tests/broken_configuration/broken_conf_session_encryption.phpt +++ b/src/tests/broken_configuration/broken_conf_session_encryption.phpt @@ -6,9 +6,9 @@ Broken config, session encryption sp.configuration_file={PWD}/config/broken_conf_session_encryption.ini --FILE-- --EXPECT-- -PHP Fatal error: [snuffleupagus][0.0.0.0][config] Trailing chars 'nvalid value :/);' at the end of '.encrypt(invalid value :/);' on line 1 in Unknown on line 0 +PHP Fatal error: [snuffleupagus][0.0.0.0][config][log] Trailing chars 'nvalid value :/);' at the end of '.encrypt(invalid value :/);' on line 1 in Unknown on line 0 -Fatal error: [snuffleupagus][0.0.0.0][config] Trailing chars 'nvalid value :/);' at the end of '.encrypt(invalid value :/);' on line 1 in Unknown on line 0 +Fatal error: [snuffleupagus][0.0.0.0][config][log] Trailing chars 'nvalid value :/);' at the end of '.encrypt(invalid value :/);' on line 1 in Unknown on line 0 -Fatal error: [snuffleupagus][0.0.0.0][config] Invalid configuration file in Unknown on line 0 +Fatal error: [snuffleupagus][0.0.0.0][config][log] Invalid configuration file in Unknown on line 0 Could not startup. diff --git a/src/tests/broken_configuration/broken_conf_session_encryption_without_encryption_key.phpt b/src/tests/broken_configuration/broken_conf_session_encryption_without_encryption_key.phpt index f958595..520ce79 100644 --- a/src/tests/broken_configuration/broken_conf_session_encryption_without_encryption_key.phpt +++ b/src/tests/broken_configuration/broken_conf_session_encryption_without_encryption_key.phpt @@ -6,9 +6,9 @@ Broken configuration - encrypted session without encryption key sp.configuration_file={PWD}/config/broken_conf_session_encryption_without_encryption_key.ini --FILE-- --EXPECT-- -PHP Fatal error: [snuffleupagus][0.0.0.0][config] You're trying to use the session cookie encryption feature on line 2 without having set the `.secret_key` option in`sp.global`: please set it first in Unknown on line 0 +PHP Fatal error: [snuffleupagus][0.0.0.0][config][log] You're trying to use the session cookie encryption feature on line 2 without having set the `.secret_key` option in`sp.global`: please set it first in Unknown on line 0 -Fatal error: [snuffleupagus][0.0.0.0][config] You're trying to use the session cookie encryption feature on line 2 without having set the `.secret_key` option in`sp.global`: please set it first in Unknown on line 0 +Fatal error: [snuffleupagus][0.0.0.0][config][log] You're trying to use the session cookie encryption feature on line 2 without having set the `.secret_key` option in`sp.global`: please set it first in Unknown on line 0 -Fatal error: [snuffleupagus][0.0.0.0][config] Invalid configuration file in Unknown on line 0 +Fatal error: [snuffleupagus][0.0.0.0][config][log] Invalid configuration file in Unknown on line 0 Could not startup. diff --git a/src/tests/broken_configuration/broken_conf_session_encryption_without_env_var.phpt b/src/tests/broken_configuration/broken_conf_session_encryption_without_env_var.phpt index 0f6f744..0aba1ac 100644 --- a/src/tests/broken_configuration/broken_conf_session_encryption_without_env_var.phpt +++ b/src/tests/broken_configuration/broken_conf_session_encryption_without_env_var.phpt @@ -6,9 +6,9 @@ Broken configuration - encrypted session without env var sp.configuration_file={PWD}/config/broken_conf_session_encryption_without_env_var.ini --FILE-- --EXPECT-- -PHP Fatal error: [snuffleupagus][0.0.0.0][config] You're trying to use the session cookie encryption feature on line 2 without having set the `.cookie_env_var` option in`sp.global`: please set it first in Unknown on line 0 +PHP Fatal error: [snuffleupagus][0.0.0.0][config][log] You're trying to use the session cookie encryption feature on line 2 without having set the `.cookie_env_var` option in`sp.global`: please set it first in Unknown on line 0 -Fatal error: [snuffleupagus][0.0.0.0][config] You're trying to use the session cookie encryption feature on line 2 without having set the `.cookie_env_var` option in`sp.global`: please set it first in Unknown on line 0 +Fatal error: [snuffleupagus][0.0.0.0][config][log] You're trying to use the session cookie encryption feature on line 2 without having set the `.cookie_env_var` option in`sp.global`: please set it first in Unknown on line 0 -Fatal error: [snuffleupagus][0.0.0.0][config] Invalid configuration file in Unknown on line 0 +Fatal error: [snuffleupagus][0.0.0.0][config][log] Invalid configuration file in Unknown on line 0 Could not startup. diff --git a/src/tests/broken_configuration/broken_conf_shown_in_phpinfo.phpt b/src/tests/broken_configuration/broken_conf_shown_in_phpinfo.phpt index c5c26c0..15619de 100644 --- a/src/tests/broken_configuration/broken_conf_shown_in_phpinfo.phpt +++ b/src/tests/broken_configuration/broken_conf_shown_in_phpinfo.phpt @@ -17,12 +17,12 @@ if (strstr($info, 'Valid config => no') !== FALSE) { } ?> --EXPECTF-- -PHP Fatal error: [snuffleupagus][0.0.0.0][config] Failed to compile '*.': %s on line 1. in Unknown on line 0 -PHP Fatal error: [snuffleupagus][0.0.0.0][config] '.filename_r()' is expecting a valid regexp, and not '"*."' on line 1 in Unknown on line 0 +PHP Fatal error: [snuffleupagus][0.0.0.0][config][log] Failed to compile '*.': %s on line 1. in Unknown on line 0 +PHP Fatal error: [snuffleupagus][0.0.0.0][config][log] '.filename_r()' is expecting a valid regexp, and not '"*."' on line 1 in Unknown on line 0 -Fatal error: [snuffleupagus][0.0.0.0][config] Failed to compile '*.': %s on line 1. in Unknown on line 0 +Fatal error: [snuffleupagus][0.0.0.0][config][log] Failed to compile '*.': %s on line 1. in Unknown on line 0 -Fatal error: [snuffleupagus][0.0.0.0][config] '.filename_r()' is expecting a valid regexp, and not '"*."' on line 1 in Unknown on line 0 +Fatal error: [snuffleupagus][0.0.0.0][config][log] '.filename_r()' is expecting a valid regexp, and not '"*."' on line 1 in Unknown on line 0 -Fatal error: [snuffleupagus][0.0.0.0][config] Invalid configuration file in Unknown on line 0 +Fatal error: [snuffleupagus][0.0.0.0][config][log] Invalid configuration file in Unknown on line 0 Could not startup. diff --git a/src/tests/broken_configuration/broken_conf_truncated.phpt b/src/tests/broken_configuration/broken_conf_truncated.phpt index ac0cbb3..035f308 100644 --- a/src/tests/broken_configuration/broken_conf_truncated.phpt +++ b/src/tests/broken_configuration/broken_conf_truncated.phpt @@ -6,9 +6,9 @@ Bad boolean value in configuration sp.configuration_file={PWD}/config/config_broken_conf_truncated.ini --FILE-- --EXPECT-- -PHP Fatal error: [snuffleupagus][0.0.0.0][error] A valid string as parameter is expected on line 1 in Unknown on line 0 +PHP Fatal error: [snuffleupagus][0.0.0.0][error][log] A valid string as parameter is expected on line 1 in Unknown on line 0 -Fatal error: [snuffleupagus][0.0.0.0][error] A valid string as parameter is expected on line 1 in Unknown on line 0 +Fatal error: [snuffleupagus][0.0.0.0][error][log] A valid string as parameter is expected on line 1 in Unknown on line 0 -Fatal error: [snuffleupagus][0.0.0.0][config] Invalid configuration file in Unknown on line 0 +Fatal error: [snuffleupagus][0.0.0.0][config][log] Invalid configuration file in Unknown on line 0 Could not startup. \ No newline at end of file diff --git a/src/tests/broken_configuration/broken_conf_unserialize.phpt b/src/tests/broken_configuration/broken_conf_unserialize.phpt index b1c26a3..e389177 100644 --- a/src/tests/broken_configuration/broken_conf_unserialize.phpt +++ b/src/tests/broken_configuration/broken_conf_unserialize.phpt @@ -8,9 +8,9 @@ sp.configuration_file={PWD}/config/broken_conf_unserialize.ini echo 1; ?> --EXPECTF-- -PHP Fatal error: [snuffleupagus][0.0.0.0][config] Trailing chars '234);' at the end of '.enable(1234);' on line 1 in Unknown on line 0 +PHP Fatal error: [snuffleupagus][0.0.0.0][config][log] Trailing chars '234);' at the end of '.enable(1234);' on line 1 in Unknown on line 0 -Fatal error: [snuffleupagus][0.0.0.0][config] Trailing chars '234);' at the end of '.enable(1234);' on line 1 in Unknown on line 0 +Fatal error: [snuffleupagus][0.0.0.0][config][log] Trailing chars '234);' at the end of '.enable(1234);' on line 1 in Unknown on line 0 -Fatal error: [snuffleupagus][0.0.0.0][config] Invalid configuration file in Unknown on line 0 +Fatal error: [snuffleupagus][0.0.0.0][config][log] Invalid configuration file in Unknown on line 0 Could not startup. diff --git a/src/tests/broken_configuration/broken_conf_upload_validation.phpt b/src/tests/broken_configuration/broken_conf_upload_validation.phpt index 47a2dd0..553271b 100644 --- a/src/tests/broken_configuration/broken_conf_upload_validation.phpt +++ b/src/tests/broken_configuration/broken_conf_upload_validation.phpt @@ -8,9 +8,9 @@ sp.configuration_file={PWD}/config/borken_conf_upload_validation.ini echo 1; ?> --EXPECTF-- -PHP Fatal error: [snuffleupagus][0.0.0.0][error] A valid string as parameter is expected on line 1 in Unknown on line 0 +PHP Fatal error: [snuffleupagus][0.0.0.0][error][log] A valid string as parameter is expected on line 1 in Unknown on line 0 -Fatal error: [snuffleupagus][0.0.0.0][error] A valid string as parameter is expected on line 1 in Unknown on line 0 +Fatal error: [snuffleupagus][0.0.0.0][error][log] A valid string as parameter is expected on line 1 in Unknown on line 0 -Fatal error: [snuffleupagus][0.0.0.0][config] Invalid configuration file in Unknown on line 0 +Fatal error: [snuffleupagus][0.0.0.0][config][log] Invalid configuration file in Unknown on line 0 Could not startup. diff --git a/src/tests/broken_configuration/broken_conf_weird_keyword.phpt b/src/tests/broken_configuration/broken_conf_weird_keyword.phpt index e560c21..24e6047 100644 --- a/src/tests/broken_configuration/broken_conf_weird_keyword.phpt +++ b/src/tests/broken_configuration/broken_conf_weird_keyword.phpt @@ -6,9 +6,9 @@ Bad config, unknown keyword sp.configuration_file={PWD}/config/broken_conf_weird_keyword.ini --FILE-- --EXPECT-- -PHP Fatal error: [snuffleupagus][0.0.0.0][config] Trailing chars '.not_a_valid_keyword("test");' at the end of '.enable().not_a_valid_keyword("test");' on line 1 in Unknown on line 0 +PHP Fatal error: [snuffleupagus][0.0.0.0][config][log] Trailing chars '.not_a_valid_keyword("test");' at the end of '.enable().not_a_valid_keyword("test");' on line 1 in Unknown on line 0 -Fatal error: [snuffleupagus][0.0.0.0][config] Trailing chars '.not_a_valid_keyword("test");' at the end of '.enable().not_a_valid_keyword("test");' on line 1 in Unknown on line 0 +Fatal error: [snuffleupagus][0.0.0.0][config][log] Trailing chars '.not_a_valid_keyword("test");' at the end of '.enable().not_a_valid_keyword("test");' on line 1 in Unknown on line 0 -Fatal error: [snuffleupagus][0.0.0.0][config] Invalid configuration file in Unknown on line 0 +Fatal error: [snuffleupagus][0.0.0.0][config][log] Invalid configuration file in Unknown on line 0 Could not startup. \ No newline at end of file diff --git a/src/tests/broken_configuration/broken_conf_wrapper_whitelist.phpt b/src/tests/broken_configuration/broken_conf_wrapper_whitelist.phpt index d0b7427..c3e40c1 100644 --- a/src/tests/broken_configuration/broken_conf_wrapper_whitelist.phpt +++ b/src/tests/broken_configuration/broken_conf_wrapper_whitelist.phpt @@ -10,9 +10,9 @@ sp.allow_broken_configuration=Off echo 1337; ?> --EXPECT-- -PHP Fatal error: [snuffleupagus][0.0.0.0][config] Trailing chars '.invalid_param();' at the end of '.invalid_param();' on line 1 in Unknown on line 0 +PHP Fatal error: [snuffleupagus][0.0.0.0][config][log] Trailing chars '.invalid_param();' at the end of '.invalid_param();' on line 1 in Unknown on line 0 -Fatal error: [snuffleupagus][0.0.0.0][config] Trailing chars '.invalid_param();' at the end of '.invalid_param();' on line 1 in Unknown on line 0 +Fatal error: [snuffleupagus][0.0.0.0][config][log] Trailing chars '.invalid_param();' at the end of '.invalid_param();' on line 1 in Unknown on line 0 -Fatal error: [snuffleupagus][0.0.0.0][config] Invalid configuration file in Unknown on line 0 +Fatal error: [snuffleupagus][0.0.0.0][config][log] Invalid configuration file in Unknown on line 0 Could not startup. diff --git a/src/tests/broken_configuration/broken_conf_wrong_quotes.phpt b/src/tests/broken_configuration/broken_conf_wrong_quotes.phpt index 52ea8d7..b61cf3f 100644 --- a/src/tests/broken_configuration/broken_conf_wrong_quotes.phpt +++ b/src/tests/broken_configuration/broken_conf_wrong_quotes.phpt @@ -6,9 +6,9 @@ Configuration line with too many quotes sp.configuration_file={PWD}/config/broken_conf_wrong_quotes.ini --FILE-- --EXPECT-- -PHP Fatal error: [snuffleupagus][0.0.0.0][error] There is an issue with the parsing of '"\)': it doesn't look like a valid string on line 1 in Unknown on line 0 +PHP Fatal error: [snuffleupagus][0.0.0.0][error][log] There is an issue with the parsing of '"\)': it doesn't look like a valid string on line 1 in Unknown on line 0 -Fatal error: [snuffleupagus][0.0.0.0][error] There is an issue with the parsing of '"\)': it doesn't look like a valid string on line 1 in Unknown on line 0 +Fatal error: [snuffleupagus][0.0.0.0][error][log] There is an issue with the parsing of '"\)': it doesn't look like a valid string on line 1 in Unknown on line 0 -Fatal error: [snuffleupagus][0.0.0.0][config] Invalid configuration file in Unknown on line 0 +Fatal error: [snuffleupagus][0.0.0.0][config][log] Invalid configuration file in Unknown on line 0 Could not startup. \ No newline at end of file diff --git a/src/tests/broken_configuration/broken_conf_wrong_type.phpt b/src/tests/broken_configuration/broken_conf_wrong_type.phpt index 60dde56..150cda0 100644 --- a/src/tests/broken_configuration/broken_conf_wrong_type.phpt +++ b/src/tests/broken_configuration/broken_conf_wrong_type.phpt @@ -6,9 +6,9 @@ Broken conf with wrong type sp.configuration_file={PWD}/config/broken_conf_wrong_type.ini --FILE-- --EXPECTF-- -PHP Fatal error: [snuffleupagus][0.0.0.0][error] .ret_type() is expecting a valid php type ('false', 'true', 'array'. 'object', 'long', 'double', 'null', 'resource', 'reference', 'undef') on line 5 in Unknown on line 0 +PHP Fatal error: [snuffleupagus][0.0.0.0][error][log] .ret_type() is expecting a valid php type ('false', 'true', 'array'. 'object', 'long', 'double', 'null', 'resource', 'reference', 'undef') on line 5 in Unknown on line 0 -Fatal error: [snuffleupagus][0.0.0.0][error] .ret_type() is expecting a valid php type ('false', 'true', 'array'. 'object', 'long', 'double', 'null', 'resource', 'reference', 'undef') on line 5 in Unknown on line 0 +Fatal error: [snuffleupagus][0.0.0.0][error][log] .ret_type() is expecting a valid php type ('false', 'true', 'array'. 'object', 'long', 'double', 'null', 'resource', 'reference', 'undef') on line 5 in Unknown on line 0 -Fatal error: [snuffleupagus][0.0.0.0][config] Invalid configuration file in Unknown on line 0 +Fatal error: [snuffleupagus][0.0.0.0][config][log] Invalid configuration file in Unknown on line 0 Could not startup. \ No newline at end of file diff --git a/src/tests/broken_configuration/broken_invalid_client_ip4.phpt b/src/tests/broken_configuration/broken_invalid_client_ip4.phpt index 8e445e7..cbc17e7 100644 --- a/src/tests/broken_configuration/broken_invalid_client_ip4.phpt +++ b/src/tests/broken_configuration/broken_invalid_client_ip4.phpt @@ -13,4 +13,4 @@ sp.configuration_file={PWD}/config/disabled_functions_cidr.ini strpos("1337", "1"); ?> --EXPECTF-- -Fatal error: [snuffleupagus][xyz][cidr_match] Weird ip (xyz) family in %a/broken_invalid_client_ip4.php on line 2 \ No newline at end of file +Fatal error: [snuffleupagus][xyz][cidr_match][log] Weird ip (xyz) family in %a/broken_invalid_client_ip4.php on line 2 \ No newline at end of file diff --git a/src/tests/broken_configuration/broken_regexp.phpt b/src/tests/broken_configuration/broken_regexp.phpt index 28d803e..150ddb7 100644 --- a/src/tests/broken_configuration/broken_regexp.phpt +++ b/src/tests/broken_configuration/broken_regexp.phpt @@ -6,12 +6,12 @@ Broken regexp sp.configuration_file={PWD}/config/broken_regexp.ini --FILE-- --EXPECTF-- -PHP Fatal error: [snuffleupagus][0.0.0.0][config] Failed to compile '^$[': missing terminating ] for character class on line 1. in Unknown on line 0 -PHP Fatal error: [snuffleupagus][0.0.0.0][config] '.value_r()' is expecting a valid regexp, and not '"^$["' on line 1 in Unknown on line 0 +PHP Fatal error: [snuffleupagus][0.0.0.0][config][log] Failed to compile '^$[': missing terminating ] for character class on line 1. in Unknown on line 0 +PHP Fatal error: [snuffleupagus][0.0.0.0][config][log] '.value_r()' is expecting a valid regexp, and not '"^$["' on line 1 in Unknown on line 0 -Fatal error: [snuffleupagus][0.0.0.0][config] Failed to compile '^$[': missing terminating ] for character class on line 1. in Unknown on line 0 +Fatal error: [snuffleupagus][0.0.0.0][config][log] Failed to compile '^$[': missing terminating ] for character class on line 1. in Unknown on line 0 -Fatal error: [snuffleupagus][0.0.0.0][config] '.value_r()' is expecting a valid regexp, and not '"^$["' on line 1 in Unknown on line 0 +Fatal error: [snuffleupagus][0.0.0.0][config][log] '.value_r()' is expecting a valid regexp, and not '"^$["' on line 1 in Unknown on line 0 -Fatal error: [snuffleupagus][0.0.0.0][config] Invalid configuration file in Unknown on line 0 +Fatal error: [snuffleupagus][0.0.0.0][config][log] Invalid configuration file in Unknown on line 0 Could not startup. \ No newline at end of file diff --git a/src/tests/broken_configuration/broken_unmatching_brackets.phpt b/src/tests/broken_configuration/broken_unmatching_brackets.phpt index 6c63303..bba8e0c 100644 --- a/src/tests/broken_configuration/broken_unmatching_brackets.phpt +++ b/src/tests/broken_configuration/broken_unmatching_brackets.phpt @@ -6,12 +6,12 @@ Broken configuration - unmatching brackets sp.configuration_file={PWD}/config/config_unmatching_brackets.ini --FILE-- --EXPECTF-- -PHP Fatal error: [snuffleupagus][0.0.0.0][config] Invalid `]` position. in Unknown on line 0 -PHP Fatal error: [snuffleupagus][0.0.0.0][config] Invalid value 'arr[b]]]]]' for `param` on line 1 in Unknown on line 0 +PHP Fatal error: [snuffleupagus][0.0.0.0][config][log] Invalid `]` position. in Unknown on line 0 +PHP Fatal error: [snuffleupagus][0.0.0.0][config][log] Invalid value 'arr[b]]]]]' for `param` on line 1 in Unknown on line 0 -Fatal error: [snuffleupagus][0.0.0.0][config] Invalid `]` position. in Unknown on line 0 +Fatal error: [snuffleupagus][0.0.0.0][config][log] Invalid `]` position. in Unknown on line 0 -Fatal error: [snuffleupagus][0.0.0.0][config] Invalid value 'arr[b]]]]]' for `param` on line 1 in Unknown on line 0 +Fatal error: [snuffleupagus][0.0.0.0][config][log] Invalid value 'arr[b]]]]]' for `param` on line 1 in Unknown on line 0 -Fatal error: [snuffleupagus][0.0.0.0][config] Invalid configuration file in Unknown on line 0 +Fatal error: [snuffleupagus][0.0.0.0][config][log] Invalid configuration file in Unknown on line 0 Could not startup. \ No newline at end of file diff --git a/src/tests/broken_configuration/encrypt_regexp_cookies_bad_regexp.phpt b/src/tests/broken_configuration/encrypt_regexp_cookies_bad_regexp.phpt index c0fe5e4..0b98e73 100644 --- a/src/tests/broken_configuration/encrypt_regexp_cookies_bad_regexp.phpt +++ b/src/tests/broken_configuration/encrypt_regexp_cookies_bad_regexp.phpt @@ -15,8 +15,8 @@ EOF; --FILE-- --EXPECT-- -Fatal error: [snuffleupagus][127.0.0.1][config] Invalid configuration file in Unknown on line 0 +Fatal error: [snuffleupagus][127.0.0.1][config][log] Invalid configuration file in Unknown on line 0 -Fatal error: [snuffleupagus][127.0.0.1][config] Failed to compile '^super_co[a-z+$': missing terminating ] for character class on line 2. in Unknown on line 0 +Fatal error: [snuffleupagus][127.0.0.1][config][log] Failed to compile '^super_co[a-z+$': missing terminating ] for character class on line 2. in Unknown on line 0 -Fatal error: [snuffleupagus][127.0.0.1][config] '.name_r()' is expecting a valid regexp, and not '"^super_co[a-z+$"' on line 2 in Unknown on line 0 +Fatal error: [snuffleupagus][127.0.0.1][config][log] '.name_r()' is expecting a valid regexp, and not '"^super_co[a-z+$"' on line 2 in Unknown on line 0 diff --git a/src/tests/cookies_encryption/encrypt_cookies_empty_env.phpt b/src/tests/cookies_encryption/encrypt_cookies_empty_env.phpt index 721806a..0cd4460 100644 --- a/src/tests/cookies_encryption/encrypt_cookies_empty_env.phpt +++ b/src/tests/cookies_encryption/encrypt_cookies_empty_env.phpt @@ -12,7 +12,7 @@ super_cookie=cGFkZGluZ3BhZGRpbmdwYWRkaW5ncGFkZGluZ3BhZGRpbmdwYWRkaW5ncGFkZGluZ3B --FILE-- --EXPECT-- -Warning: [snuffleupagus][0.0.0.0][cookie_encryption] The environment variable 'SUPER_ENV_VAR' is empty, cookies are weakly encrypted in Unknown on line 0 +Warning: [snuffleupagus][0.0.0.0][cookie_encryption][log] The environment variable 'SUPER_ENV_VAR' is empty, cookies are weakly encrypted in Unknown on line 0 -Warning: [snuffleupagus][0.0.0.0][cookie_encryption] Something went wrong with the decryption of super_cookie in Unknown on line 0 +Warning: [snuffleupagus][0.0.0.0][cookie_encryption][log] Something went wrong with the decryption of super_cookie in Unknown on line 0 1 diff --git a/src/tests/cookies_encryption/encrypt_cookies_invalid_decryption.phpt b/src/tests/cookies_encryption/encrypt_cookies_invalid_decryption.phpt index e2190b3..2833819 100644 --- a/src/tests/cookies_encryption/encrypt_cookies_invalid_decryption.phpt +++ b/src/tests/cookies_encryption/encrypt_cookies_invalid_decryption.phpt @@ -18,7 +18,7 @@ EOF; echo "1337\n"; var_dump($_COOKIE); ?> --EXPECT-- -Warning: [snuffleupagus][127.0.0.1][cookie_encryption] Something went wrong with the decryption of super_cookie in Unknown on line 0 +Warning: [snuffleupagus][127.0.0.1][cookie_encryption][log] Something went wrong with the decryption of super_cookie in Unknown on line 0 1337 array(1) { ["awfulcookie"]=> diff --git a/src/tests/cookies_encryption/encrypt_cookies_invalid_decryption2.phpt b/src/tests/cookies_encryption/encrypt_cookies_invalid_decryption2.phpt index 3efe051..5a76999 100644 --- a/src/tests/cookies_encryption/encrypt_cookies_invalid_decryption2.phpt +++ b/src/tests/cookies_encryption/encrypt_cookies_invalid_decryption2.phpt @@ -16,4 +16,4 @@ EOF; --FILE-- --EXPECT-- -Fatal error: [snuffleupagus][127.0.0.1][cookie_encryption] Buffer underflow tentative detected in cookie encryption handling in Unknown on line 0 \ No newline at end of file +Fatal error: [snuffleupagus][127.0.0.1][cookie_encryption][drop] Buffer underflow tentative detected in cookie encryption handling in Unknown on line 0 \ No newline at end of file diff --git a/src/tests/cookies_encryption/encrypt_cookies_invalid_decryption_short_cookie.phpt b/src/tests/cookies_encryption/encrypt_cookies_invalid_decryption_short_cookie.phpt index 5c99dfc..feb3688 100644 --- a/src/tests/cookies_encryption/encrypt_cookies_invalid_decryption_short_cookie.phpt +++ b/src/tests/cookies_encryption/encrypt_cookies_invalid_decryption_short_cookie.phpt @@ -16,7 +16,7 @@ EOF; --FILE-- --EXPECT-- -Warning: [snuffleupagus][127.0.0.1][cookie_encryption] Buffer underflow tentative detected in cookie encryption handling for super_cookie. Using the cookie 'as it' instead of decrypting it in Unknown on line 0 +Warning: [snuffleupagus][127.0.0.1][cookie_encryption][simulation] Buffer underflow tentative detected in cookie encryption handling for super_cookie. Using the cookie 'as it' instead of decrypting it in Unknown on line 0 array(2) { ["super_cookie"]=> string(3) "AAA" diff --git a/src/tests/cookies_encryption/encrypt_cookies_invalid_decryption_simulation.phpt b/src/tests/cookies_encryption/encrypt_cookies_invalid_decryption_simulation.phpt index 29adcf4..3cb13d4 100644 --- a/src/tests/cookies_encryption/encrypt_cookies_invalid_decryption_simulation.phpt +++ b/src/tests/cookies_encryption/encrypt_cookies_invalid_decryption_simulation.phpt @@ -18,7 +18,7 @@ EOF; echo "1337\n"; var_dump($_COOKIE); ?> --EXPECT-- -Warning: [snuffleupagus][127.0.0.1][cookie_encryption] Something went wrong with the decryption of super_cookie. Using the cookie 'as it' instead of decrypting it in Unknown on line 0 +Warning: [snuffleupagus][127.0.0.1][cookie_encryption][simulation] Something went wrong with the decryption of super_cookie. Using the cookie 'as it' instead of decrypting it in Unknown on line 0 1337 array(2) { ["super_cookie"]=> diff --git a/src/tests/cookies_encryption/encrypt_regexp_cookies_empty_env.phpt b/src/tests/cookies_encryption/encrypt_regexp_cookies_empty_env.phpt index 7bd2fcc..2d8de76 100644 --- a/src/tests/cookies_encryption/encrypt_regexp_cookies_empty_env.phpt +++ b/src/tests/cookies_encryption/encrypt_regexp_cookies_empty_env.phpt @@ -16,4 +16,4 @@ EOF; --FILE-- --EXPECT-- -Fatal error: [snuffleupagus][0.0.0.0][cookie_encryption] Buffer underflow tentative detected in cookie encryption handling in Unknown on line 0 \ No newline at end of file +Fatal error: [snuffleupagus][0.0.0.0][cookie_encryption][drop] Buffer underflow tentative detected in cookie encryption handling in Unknown on line 0 \ No newline at end of file diff --git a/src/tests/cookies_encryption/encrypt_regexp_cookies_invalid_decryption.phpt b/src/tests/cookies_encryption/encrypt_regexp_cookies_invalid_decryption.phpt index a0729d4..20914f3 100644 --- a/src/tests/cookies_encryption/encrypt_regexp_cookies_invalid_decryption.phpt +++ b/src/tests/cookies_encryption/encrypt_regexp_cookies_invalid_decryption.phpt @@ -16,7 +16,7 @@ EOF; --FILE-- --EXPECT-- -Warning: [snuffleupagus][127.0.0.1][cookie_encryption] Something went wrong with the decryption of super_cookie in Unknown on line 0 +Warning: [snuffleupagus][127.0.0.1][cookie_encryption][log] Something went wrong with the decryption of super_cookie in Unknown on line 0 array(1) { ["awful_cookie"]=> string(18) "awful_cookie_value" diff --git a/src/tests/cookies_encryption/encrypt_regexp_cookies_invalid_decryption2.phpt b/src/tests/cookies_encryption/encrypt_regexp_cookies_invalid_decryption2.phpt index 11288e0..9a6bc9c 100644 --- a/src/tests/cookies_encryption/encrypt_regexp_cookies_invalid_decryption2.phpt +++ b/src/tests/cookies_encryption/encrypt_regexp_cookies_invalid_decryption2.phpt @@ -16,4 +16,4 @@ EOF; --FILE-- --EXPECT-- -Fatal error: [snuffleupagus][127.0.0.1][cookie_encryption] Buffer underflow tentative detected in cookie encryption handling in Unknown on line 0 \ No newline at end of file +Fatal error: [snuffleupagus][127.0.0.1][cookie_encryption][drop] Buffer underflow tentative detected in cookie encryption handling in Unknown on line 0 \ No newline at end of file diff --git a/src/tests/cookies_encryption_warning/encrypt_cookies_no_env.phpt b/src/tests/cookies_encryption_warning/encrypt_cookies_no_env.phpt index f1ebf2f..7ef193a 100644 --- a/src/tests/cookies_encryption_warning/encrypt_cookies_no_env.phpt +++ b/src/tests/cookies_encryption_warning/encrypt_cookies_no_env.phpt @@ -16,6 +16,6 @@ EOF; --FILE-- --EXPECT-- -Fatal error: [snuffleupagus][127.0.0.1][config] Invalid configuration file in Unknown on line 0 +Fatal error: [snuffleupagus][127.0.0.1][config][log] Invalid configuration file in Unknown on line 0 -Fatal error: [snuffleupagus][127.0.0.1][config] You're trying to use the cookie encryption featureon line 2 without having set the `.cookie_env_var` option in`sp.global`: please set it first in Unknown on line 0 +Fatal error: [snuffleupagus][127.0.0.1][config][log] You're trying to use the cookie encryption featureon line 2 without having set the `.cookie_env_var` option in`sp.global`: please set it first in Unknown on line 0 diff --git a/src/tests/cookies_encryption_warning/encrypt_cookies_no_key.phpt b/src/tests/cookies_encryption_warning/encrypt_cookies_no_key.phpt index d24446b..a633652 100644 --- a/src/tests/cookies_encryption_warning/encrypt_cookies_no_key.phpt +++ b/src/tests/cookies_encryption_warning/encrypt_cookies_no_key.phpt @@ -16,6 +16,6 @@ EOF; --FILE-- --EXPECT-- -Fatal error: [snuffleupagus][127.0.0.1][config] Invalid configuration file in Unknown on line 0 +Fatal error: [snuffleupagus][127.0.0.1][config][log] Invalid configuration file in Unknown on line 0 -Fatal error: [snuffleupagus][127.0.0.1][config] You're trying to use the cookie encryption featureon line 2 without having set the `.encryption_key` option in`sp.global`: please set it first in Unknown on line 0 +Fatal error: [snuffleupagus][127.0.0.1][config][log] You're trying to use the cookie encryption featureon line 2 without having set the `.encryption_key` option in`sp.global`: please set it first in Unknown on line 0 diff --git a/src/tests/cookies_encryption_warning/encrypt_regexp_cookies_no_env.phpt b/src/tests/cookies_encryption_warning/encrypt_regexp_cookies_no_env.phpt index 995ac4f..d40b9a9 100644 --- a/src/tests/cookies_encryption_warning/encrypt_regexp_cookies_no_env.phpt +++ b/src/tests/cookies_encryption_warning/encrypt_regexp_cookies_no_env.phpt @@ -16,6 +16,6 @@ EOF; --FILE-- --EXPECT-- -Fatal error: [snuffleupagus][127.0.0.1][config] Invalid configuration file in Unknown on line 0 +Fatal error: [snuffleupagus][127.0.0.1][config][log] Invalid configuration file in Unknown on line 0 -Fatal error: [snuffleupagus][127.0.0.1][config] You're trying to use the cookie encryption featureon line 2 without having set the `.cookie_env_var` option in`sp.global`: please set it first in Unknown on line 0 +Fatal error: [snuffleupagus][127.0.0.1][config][log] You're trying to use the cookie encryption featureon line 2 without having set the `.cookie_env_var` option in`sp.global`: please set it first in Unknown on line 0 diff --git a/src/tests/cookies_encryption_warning/encrypt_regexp_cookies_no_key.phpt b/src/tests/cookies_encryption_warning/encrypt_regexp_cookies_no_key.phpt index ead651d..d03f28f 100644 --- a/src/tests/cookies_encryption_warning/encrypt_regexp_cookies_no_key.phpt +++ b/src/tests/cookies_encryption_warning/encrypt_regexp_cookies_no_key.phpt @@ -16,6 +16,6 @@ EOF; --FILE-- --EXPECT-- -Fatal error: [snuffleupagus][127.0.0.1][config] Invalid configuration file in Unknown on line 0 +Fatal error: [snuffleupagus][127.0.0.1][config][log] Invalid configuration file in Unknown on line 0 -Fatal error: [snuffleupagus][127.0.0.1][config] You're trying to use the cookie encryption featureon line 2 without having set the `.encryption_key` option in`sp.global`: please set it first in Unknown on line 0 +Fatal error: [snuffleupagus][127.0.0.1][config][log] You're trying to use the cookie encryption featureon line 2 without having set the `.encryption_key` option in`sp.global`: please set it first in Unknown on line 0 diff --git a/src/tests/deny_writable/deny_writable_execution.phpt b/src/tests/deny_writable/deny_writable_execution.phpt index 43d12c3..e65dc32 100644 --- a/src/tests/deny_writable/deny_writable_execution.phpt +++ b/src/tests/deny_writable/deny_writable_execution.phpt @@ -40,4 +40,4 @@ unlink("$dir/non_writable_file.txt"); unlink("$dir/writable_file.txt"); ?> --EXPECTF-- -Fatal error: [snuffleupagus][0.0.0.0][readonly_exec] Attempted execution of a writable file (%a/deny_writable_execution.php). in %a/deny_writable_execution.php on line 2 +Fatal error: [snuffleupagus][0.0.0.0][readonly_exec][drop] Attempted execution of a writable file (%a/deny_writable_execution.php). in %a/deny_writable_execution.php on line 2 diff --git a/src/tests/deny_writable/deny_writable_execution_simulation.phpt b/src/tests/deny_writable/deny_writable_execution_simulation.phpt index db46718..d825cfa 100644 --- a/src/tests/deny_writable/deny_writable_execution_simulation.phpt +++ b/src/tests/deny_writable/deny_writable_execution_simulation.phpt @@ -42,10 +42,10 @@ unlink("$dir/non_writable_file.txt"); unlink("$dir/writable_file.txt"); ?> --EXPECTF-- -Warning: [snuffleupagus][0.0.0.0][readonly_exec] Attempted execution of a writable file (%a/deny_writable_execution_simulation.php). in %a/deny_writable_execution_simulation.php on line 2 +Warning: [snuffleupagus][0.0.0.0][readonly_exec][simulation] Attempted execution of a writable file (%a/deny_writable_execution_simulation.php). in %a/deny_writable_execution_simulation.php on line 2 -Warning: [snuffleupagus][0.0.0.0][readonly_exec] Attempted execution of a writable file (%a/writable_file.txt). in %a/deny_writable_execution_simulation.php on line 12 +Warning: [snuffleupagus][0.0.0.0][readonly_exec][simulation] Attempted execution of a writable file (%a/writable_file.txt). in %a/deny_writable_execution_simulation.php on line 12 -Warning: [snuffleupagus][0.0.0.0][readonly_exec] Attempted execution of a writable file (%a/writable_file.txt). in %a/writable_file.txt on line 1 +Warning: [snuffleupagus][0.0.0.0][readonly_exec][simulation] Attempted execution of a writable file (%a/writable_file.txt). in %a/writable_file.txt on line 1 Code execution within a writable file. Code execution within a non-writable file. diff --git a/src/tests/disable_function/disabled_function_echo.phpt b/src/tests/disable_function/disabled_function_echo.phpt index 5dbfe43..9e5d3e0 100644 --- a/src/tests/disable_function/disabled_function_echo.phpt +++ b/src/tests/disable_function/disabled_function_echo.phpt @@ -16,4 +16,4 @@ test("oops"); --CLEAN-- --EXPECTF-- qwerty -Fatal error: [snuffleupagus][0.0.0.0][disabled_function] Aborted execution on call of the function 'echo' in %a/disabled_function_echo.php on line 3 \ No newline at end of file +Fatal error: [snuffleupagus][0.0.0.0][disabled_function][drop] Aborted execution on call of the function 'echo' in %a/disabled_function_echo.php on line 3 \ No newline at end of file diff --git a/src/tests/disable_function/disabled_function_echo_2.phpt b/src/tests/disable_function/disabled_function_echo_2.phpt index c317cf7..55a7abe 100644 --- a/src/tests/disable_function/disabled_function_echo_2.phpt +++ b/src/tests/disable_function/disabled_function_echo_2.phpt @@ -12,4 +12,4 @@ echo "1", "oops"; --CLEAN-- --EXPECTF-- qwe1 -Fatal error: [snuffleupagus][0.0.0.0][disabled_function] Aborted execution on call of the function 'echo' in %a/disabled_function_echo_2.php on line 3 \ No newline at end of file +Fatal error: [snuffleupagus][0.0.0.0][disabled_function][drop] Aborted execution on call of the function 'echo' in %a/disabled_function_echo_2.php on line 3 \ No newline at end of file diff --git a/src/tests/disable_function/disabled_function_echo_local_var.phpt b/src/tests/disable_function/disabled_function_echo_local_var.phpt index 3bbb2a0..dbc7f4e 100644 --- a/src/tests/disable_function/disabled_function_echo_local_var.phpt +++ b/src/tests/disable_function/disabled_function_echo_local_var.phpt @@ -18,4 +18,4 @@ test(); --EXPECTF-- 3 -Fatal error: [snuffleupagus][0.0.0.0][disabled_function] Aborted execution on call of the function 'echo' in %a/disabled_function_echo_local_var.php on line 3 \ No newline at end of file +Fatal error: [snuffleupagus][0.0.0.0][disabled_function][drop] Aborted execution on call of the function 'echo' in %a/disabled_function_echo_local_var.php on line 3 \ No newline at end of file diff --git a/src/tests/disable_function/disabled_function_ensure_client_valid_certs.phpt b/src/tests/disable_function/disabled_function_ensure_client_valid_certs.phpt index dc53593..0cca9d1 100644 --- a/src/tests/disable_function/disabled_function_ensure_client_valid_certs.phpt +++ b/src/tests/disable_function/disabled_function_ensure_client_valid_certs.phpt @@ -17,4 +17,4 @@ curl_setopt($ch, CURLOPT_SSL_VERIFYPEER, '0'); echo "1337"; ?> --EXPECTF-- -Fatal error: [snuffleupagus][0.0.0.0][disabled_function] Aborted execution on call of the function 'curl_setopt', because its argument '$option' content (64) matched the rule 'Please don't turn CURLOPT_SSL_VERIFYPEER off.' in %s/disabled_function_ensure_client_valid_certs.php on line %d +Fatal error: [snuffleupagus][0.0.0.0][disabled_function][drop] Aborted execution on call of the function 'curl_setopt', because its argument '$option' content (64) matched the rule 'Please don't turn CURLOPT_SSL_VERIFYPEER off.' in %s/disabled_function_ensure_client_valid_certs.php on line %d diff --git a/src/tests/disable_function/disabled_function_ensure_client_valid_certs_curl_multi_setopt.phpt b/src/tests/disable_function/disabled_function_ensure_client_valid_certs_curl_multi_setopt.phpt index 9ff37ec..6470181 100644 --- a/src/tests/disable_function/disabled_function_ensure_client_valid_certs_curl_multi_setopt.phpt +++ b/src/tests/disable_function/disabled_function_ensure_client_valid_certs_curl_multi_setopt.phpt @@ -16,4 +16,4 @@ curl_multi_setopt($mch, CURLOPT_SSL_VERIFYPEER, 0); echo "1337"; ?> --EXPECTF-- -Fatal error: [snuffleupagus][0.0.0.0][disabled_function] Aborted execution on call of the function 'curl_multi_setopt', because its argument '$option' content (64) matched the rule 'Please don't turn CURLOPT_SSL_VERIFYPEER off.' in %s/disabled_function_ensure_client_valid_certs_curl_multi_setopt.php on line %d +Fatal error: [snuffleupagus][0.0.0.0][disabled_function][drop] Aborted execution on call of the function 'curl_multi_setopt', because its argument '$option' content (64) matched the rule 'Please don't turn CURLOPT_SSL_VERIFYPEER off.' in %s/disabled_function_ensure_client_valid_certs_curl_multi_setopt.php on line %d diff --git a/src/tests/disable_function/disabled_function_ensure_client_valid_certs_curl_setopt_array.phpt b/src/tests/disable_function/disabled_function_ensure_client_valid_certs_curl_setopt_array.phpt index 246fee6..bae19e6 100644 --- a/src/tests/disable_function/disabled_function_ensure_client_valid_certs_curl_setopt_array.phpt +++ b/src/tests/disable_function/disabled_function_ensure_client_valid_certs_curl_setopt_array.phpt @@ -18,4 +18,4 @@ curl_setopt_array($ch, $options); echo "1337"; ?> --EXPECTF-- -Fatal error: [snuffleupagus][0.0.0.0][disabled_function] Aborted execution on call of the function 'curl_setopt_array', because its argument '$options' content (0) matched the rule 'Please don't turn CURLOPT_SSL_VERIFYPEER off.' in %s/disabled_function_ensure_client_valid_certs_curl_setopt_array.php on line 5 +Fatal error: [snuffleupagus][0.0.0.0][disabled_function][drop] Aborted execution on call of the function 'curl_setopt_array', because its argument '$options' content (0) matched the rule 'Please don't turn CURLOPT_SSL_VERIFYPEER off.' in %s/disabled_function_ensure_client_valid_certs_curl_setopt_array.php on line 5 diff --git a/src/tests/disable_function/disabled_function_ensure_server_valid_certs.phpt b/src/tests/disable_function/disabled_function_ensure_server_valid_certs.phpt index fa583b0..dc3ee33 100644 --- a/src/tests/disable_function/disabled_function_ensure_server_valid_certs.phpt +++ b/src/tests/disable_function/disabled_function_ensure_server_valid_certs.phpt @@ -17,4 +17,4 @@ curl_setopt($ch, CURLOPT_SSL_VERIFYHOST, '0'); echo "1337"; ?> --EXPECTF-- -Fatal error: [snuffleupagus][0.0.0.0][disabled_function] Aborted execution on call of the function 'curl_setopt', because its argument '$option' content (81) matched the rule 'Please don't turn CURLOPT_SSL_VERIFYHOST off.' in %s/disabled_function_ensure_server_valid_certs.php on line %d +Fatal error: [snuffleupagus][0.0.0.0][disabled_function][drop] Aborted execution on call of the function 'curl_setopt', because its argument '$option' content (81) matched the rule 'Please don't turn CURLOPT_SSL_VERIFYHOST off.' in %s/disabled_function_ensure_server_valid_certs.php on line %d diff --git a/src/tests/disable_function/disabled_function_ensure_server_valid_certs_curl_multi_setopt.phpt b/src/tests/disable_function/disabled_function_ensure_server_valid_certs_curl_multi_setopt.phpt index 3b374ee..65b9020 100644 --- a/src/tests/disable_function/disabled_function_ensure_server_valid_certs_curl_multi_setopt.phpt +++ b/src/tests/disable_function/disabled_function_ensure_server_valid_certs_curl_multi_setopt.phpt @@ -16,4 +16,4 @@ curl_multi_setopt($mch, CURLOPT_SSL_VERIFYHOST, 0); echo "1337"; ?> --EXPECTF-- -Fatal error: [snuffleupagus][0.0.0.0][disabled_function] Aborted execution on call of the function 'curl_multi_setopt', because its argument '$option' content (81) matched the rule 'Please don't turn CURLOPT_SSL_VERIFYHOST off.' in %s/disabled_function_ensure_server_valid_certs_curl_multi_setopt.php on line %d +Fatal error: [snuffleupagus][0.0.0.0][disabled_function][drop] Aborted execution on call of the function 'curl_multi_setopt', because its argument '$option' content (81) matched the rule 'Please don't turn CURLOPT_SSL_VERIFYHOST off.' in %s/disabled_function_ensure_server_valid_certs_curl_multi_setopt.php on line %d diff --git a/src/tests/disable_function/disabled_function_ensure_server_valid_certs_curl_setopt_array.phpt b/src/tests/disable_function/disabled_function_ensure_server_valid_certs_curl_setopt_array.phpt index 97accce..ec0528a 100644 --- a/src/tests/disable_function/disabled_function_ensure_server_valid_certs_curl_setopt_array.phpt +++ b/src/tests/disable_function/disabled_function_ensure_server_valid_certs_curl_setopt_array.phpt @@ -18,4 +18,4 @@ curl_setopt_array($ch, $options); echo "1337"; ?> --EXPECTF-- -Fatal error: [snuffleupagus][0.0.0.0][disabled_function] Aborted execution on call of the function 'curl_setopt_array', because its argument '$options' content (0) matched the rule 'Please don't turn CURLOPT_SSL_VERIFYHOST off.' in %s/disabled_function_ensure_server_valid_certs_curl_setopt_array.php on line 5 +Fatal error: [snuffleupagus][0.0.0.0][disabled_function][drop] Aborted execution on call of the function 'curl_setopt_array', because its argument '$options' content (0) matched the rule 'Please don't turn CURLOPT_SSL_VERIFYHOST off.' in %s/disabled_function_ensure_server_valid_certs_curl_setopt_array.php on line 5 diff --git a/src/tests/disable_function/disabled_function_local_var.phpt b/src/tests/disable_function/disabled_function_local_var.phpt index 1323cc9..58a5b77 100644 --- a/src/tests/disable_function/disabled_function_local_var.phpt +++ b/src/tests/disable_function/disabled_function_local_var.phpt @@ -22,4 +22,4 @@ Value of a: 1338 ID Value of a: 1337 -Fatal error: [snuffleupagus][0.0.0.0][disabled_function] Aborted execution on call of the function 'strtoupper' in %a/disabled_function_local_var.php on line 4 +Fatal error: [snuffleupagus][0.0.0.0][disabled_function][drop] Aborted execution on call of the function 'strtoupper' in %a/disabled_function_local_var.php on line 4 diff --git a/src/tests/disable_function/disabled_function_local_var_10.phpt b/src/tests/disable_function/disabled_function_local_var_10.phpt index a3110ac..7f10740 100644 --- a/src/tests/disable_function/disabled_function_local_var_10.phpt +++ b/src/tests/disable_function/disabled_function_local_var_10.phpt @@ -42,4 +42,4 @@ array(2) { } } -Fatal error: [snuffleupagus][0.0.0.0][disabled_function] Aborted execution on call of the function 'strtoupper' in %a/disabled_function_local_var_10.php on line 7 \ No newline at end of file +Fatal error: [snuffleupagus][0.0.0.0][disabled_function][drop] Aborted execution on call of the function 'strtoupper' in %a/disabled_function_local_var_10.php on line 7 \ No newline at end of file diff --git a/src/tests/disable_function/disabled_function_local_var_2.phpt b/src/tests/disable_function/disabled_function_local_var_2.phpt index d672010..d216bd2 100644 --- a/src/tests/disable_function/disabled_function_local_var_2.phpt +++ b/src/tests/disable_function/disabled_function_local_var_2.phpt @@ -44,4 +44,4 @@ array(2) { string(5) "block" } -Fatal error: [snuffleupagus][0.0.0.0][disabled_function] Aborted execution on call of the function 'strtoupper' in %a/disabled_function_local_var_2.php on line 4 +Fatal error: [snuffleupagus][0.0.0.0][disabled_function][drop] Aborted execution on call of the function 'strtoupper' in %a/disabled_function_local_var_2.php on line 4 diff --git a/src/tests/disable_function/disabled_function_local_var_3.phpt b/src/tests/disable_function/disabled_function_local_var_3.phpt index 66c5d69..7fb6c07 100644 --- a/src/tests/disable_function/disabled_function_local_var_3.phpt +++ b/src/tests/disable_function/disabled_function_local_var_3.phpt @@ -43,4 +43,4 @@ array(2) { } } -Fatal error: [snuffleupagus][0.0.0.0][disabled_function] Aborted execution on call of the function 'strtoupper' in %a/disabled_function_local_var_3.php on line 3 +Fatal error: [snuffleupagus][0.0.0.0][disabled_function][drop] Aborted execution on call of the function 'strtoupper' in %a/disabled_function_local_var_3.php on line 3 diff --git a/src/tests/disable_function/disabled_function_local_var_4.phpt b/src/tests/disable_function/disabled_function_local_var_4.phpt index fceee23..101ed38 100644 --- a/src/tests/disable_function/disabled_function_local_var_4.phpt +++ b/src/tests/disable_function/disabled_function_local_var_4.phpt @@ -54,4 +54,4 @@ test(); Valeur: valeur de a Valeur: valeur de apres -Fatal error: [snuffleupagus][0.0.0.0][disabled_function] Aborted execution on call of the function 'strtoupper' in %a/disabled_function_local_var_4.php on line 36 \ No newline at end of file +Fatal error: [snuffleupagus][0.0.0.0][disabled_function][drop] Aborted execution on call of the function 'strtoupper' in %a/disabled_function_local_var_4.php on line 36 \ No newline at end of file diff --git a/src/tests/disable_function/disabled_function_local_var_5.phpt b/src/tests/disable_function/disabled_function_local_var_5.phpt index e95ff19..64c3e78 100644 --- a/src/tests/disable_function/disabled_function_local_var_5.phpt +++ b/src/tests/disable_function/disabled_function_local_var_5.phpt @@ -31,4 +31,4 @@ object(stdClass)#1 (1) { string(16) "not a good value" } -Fatal error: [snuffleupagus][0.0.0.0][disabled_function] Aborted execution on call of the function 'strtoupper' in %a/disabled_function_local_var_5.php on line 3 +Fatal error: [snuffleupagus][0.0.0.0][disabled_function][drop] Aborted execution on call of the function 'strtoupper' in %a/disabled_function_local_var_5.php on line 3 diff --git a/src/tests/disable_function/disabled_function_local_var_6.phpt b/src/tests/disable_function/disabled_function_local_var_6.phpt index cd2eb61..7cc6515 100644 --- a/src/tests/disable_function/disabled_function_local_var_6.phpt +++ b/src/tests/disable_function/disabled_function_local_var_6.phpt @@ -29,4 +29,4 @@ class test_object { --EXPECTF-- Valeur: no good -Fatal error: [snuffleupagus][0.0.0.0][disabled_function] Aborted execution on call of the function 'strtoupper' in %a/disabled_function_local_var_6.php on line 4 \ No newline at end of file +Fatal error: [snuffleupagus][0.0.0.0][disabled_function][drop] Aborted execution on call of the function 'strtoupper' in %a/disabled_function_local_var_6.php on line 4 \ No newline at end of file diff --git a/src/tests/disable_function/disabled_function_local_var_7.phpt b/src/tests/disable_function/disabled_function_local_var_7.phpt index d219780..5b19070 100644 --- a/src/tests/disable_function/disabled_function_local_var_7.phpt +++ b/src/tests/disable_function/disabled_function_local_var_7.phpt @@ -29,4 +29,4 @@ class test_object { --EXPECTF-- Valeur: qwerty -Fatal error: [snuffleupagus][0.0.0.0][disabled_function] Aborted execution on call of the function 'strtoupper' in %a/disabled_function_local_var_7.php on line 4 \ No newline at end of file +Fatal error: [snuffleupagus][0.0.0.0][disabled_function][drop] Aborted execution on call of the function 'strtoupper' in %a/disabled_function_local_var_7.php on line 4 \ No newline at end of file diff --git a/src/tests/disable_function/disabled_function_local_var_8.phpt b/src/tests/disable_function/disabled_function_local_var_8.phpt index 8b64534..a80ac04 100644 --- a/src/tests/disable_function/disabled_function_local_var_8.phpt +++ b/src/tests/disable_function/disabled_function_local_var_8.phpt @@ -18,4 +18,4 @@ namespace asd { --EXPECTF-- Valeur: qwerty -Fatal error: [snuffleupagus][0.0.0.0][disabled_function] Aborted execution on call of the function 'strtoupper' in %a/disabled_function_local_var_8.php on line 8 \ No newline at end of file +Fatal error: [snuffleupagus][0.0.0.0][disabled_function][drop] Aborted execution on call of the function 'strtoupper' in %a/disabled_function_local_var_8.php on line 8 \ No newline at end of file diff --git a/src/tests/disable_function/disabled_function_local_var_9.phpt b/src/tests/disable_function/disabled_function_local_var_9.phpt index cc37a78..390f046 100644 --- a/src/tests/disable_function/disabled_function_local_var_9.phpt +++ b/src/tests/disable_function/disabled_function_local_var_9.phpt @@ -18,4 +18,4 @@ namespace asd { --EXPECTF-- Valeur: asdfgh -Fatal error: [snuffleupagus][0.0.0.0][disabled_function] Aborted execution on call of the function 'strtoupper' in %a/disabled_function_local_var_9.php on line 8 \ No newline at end of file +Fatal error: [snuffleupagus][0.0.0.0][disabled_function][drop] Aborted execution on call of the function 'strtoupper' in %a/disabled_function_local_var_9.php on line 8 \ No newline at end of file diff --git a/src/tests/disable_function/disabled_function_local_var_const.phpt b/src/tests/disable_function/disabled_function_local_var_const.phpt index 1500558..7f275a1 100644 --- a/src/tests/disable_function/disabled_function_local_var_const.phpt +++ b/src/tests/disable_function/disabled_function_local_var_const.phpt @@ -11,4 +11,4 @@ define("MY_CONST", $a); strtoupper("test"); ?> --EXPECTF-- -Fatal error: [snuffleupagus][0.0.0.0][disabled_function] Aborted execution on call of the function 'strtoupper' in %a/disabled_function_local_var_const.php on line 4 \ No newline at end of file +Fatal error: [snuffleupagus][0.0.0.0][disabled_function][drop] Aborted execution on call of the function 'strtoupper' in %a/disabled_function_local_var_const.php on line 4 \ No newline at end of file diff --git a/src/tests/disable_function/disabled_function_local_var_obj.phpt b/src/tests/disable_function/disabled_function_local_var_obj.phpt index c8c3be3..90a192d 100644 --- a/src/tests/disable_function/disabled_function_local_var_obj.phpt +++ b/src/tests/disable_function/disabled_function_local_var_obj.phpt @@ -23,4 +23,4 @@ echo strtoupper($test->$arg) . "\n"; --EXPECTF-- QWE -Fatal error: [snuffleupagus][0.0.0.0][disabled_function] Aborted execution on call of the function 'strtoupper' in %a/disabled_function_local_var_obj.php on line 14 +Fatal error: [snuffleupagus][0.0.0.0][disabled_function][drop] Aborted execution on call of the function 'strtoupper' in %a/disabled_function_local_var_obj.php on line 14 diff --git a/src/tests/disable_function/disabled_function_param.phpt b/src/tests/disable_function/disabled_function_param.phpt index 80812b9..4c3c2e8 100644 --- a/src/tests/disable_function/disabled_function_param.phpt +++ b/src/tests/disable_function/disabled_function_param.phpt @@ -17,4 +17,4 @@ qweqwe(Array(2)); --EXPECTF-- OK -Fatal error: [snuffleupagus][0.0.0.0][disabled_function] Aborted execution on call of the function 'qweqwe', because its argument '$asd' content (2) matched a rule in %a/disabled_function_param.php on line 3 \ No newline at end of file +Fatal error: [snuffleupagus][0.0.0.0][disabled_function][drop] Aborted execution on call of the function 'qweqwe', because its argument '$asd' content (2) matched a rule in %a/disabled_function_param.php on line 3 \ No newline at end of file diff --git a/src/tests/disable_function/disabled_function_print.phpt b/src/tests/disable_function/disabled_function_print.phpt index ee02687..8b61542 100644 --- a/src/tests/disable_function/disabled_function_print.phpt +++ b/src/tests/disable_function/disabled_function_print.phpt @@ -16,4 +16,4 @@ test("oops"); --CLEAN-- --EXPECTF-- qwerty -Fatal error: [snuffleupagus][0.0.0.0][disabled_function] Aborted execution on call of the function 'echo' in %a/disabled_function_print.php on line 3 \ No newline at end of file +Fatal error: [snuffleupagus][0.0.0.0][disabled_function][drop] Aborted execution on call of the function 'echo' in %a/disabled_function_print.php on line 3 \ No newline at end of file diff --git a/src/tests/disable_function/disabled_function_super_global_var.phpt b/src/tests/disable_function/disabled_function_super_global_var.phpt index 19bb892..f5385b6 100644 --- a/src/tests/disable_function/disabled_function_super_global_var.phpt +++ b/src/tests/disable_function/disabled_function_super_global_var.phpt @@ -22,4 +22,4 @@ test(); --EXPECTF-- TEST -Fatal error: [snuffleupagus][0.0.0.0][disabled_function] Aborted execution on call of the function 'strtoupper' in %a/disabled_function_super_global_var.php on line 4 +Fatal error: [snuffleupagus][0.0.0.0][disabled_function][drop] Aborted execution on call of the function 'strtoupper' in %a/disabled_function_super_global_var.php on line 4 diff --git a/src/tests/disable_function/disabled_functions.phpt b/src/tests/disable_function/disabled_functions.phpt index 45a46ad..00e2827 100644 --- a/src/tests/disable_function/disabled_functions.phpt +++ b/src/tests/disable_function/disabled_functions.phpt @@ -14,4 +14,4 @@ var_dump("this is a super test"); echo strpos("pouet", "o"); ?> --EXPECTF-- -Fatal error: [snuffleupagus][0.0.0.0][disabled_function] Aborted execution on call of the function 'system' in %a/disabled_functions.php on line %d +Fatal error: [snuffleupagus][0.0.0.0][disabled_function][drop] Aborted execution on call of the function 'system' in %a/disabled_functions.php on line %d diff --git a/src/tests/disable_function/disabled_functions_callback_called_file_r.phpt b/src/tests/disable_function/disabled_functions_callback_called_file_r.phpt index 63a0e00..41c76bb 100644 --- a/src/tests/disable_function/disabled_functions_callback_called_file_r.phpt +++ b/src/tests/disable_function/disabled_functions_callback_called_file_r.phpt @@ -36,4 +36,4 @@ $dir = __DIR__; @unlink("$dir/myfunc_callback.php"); ?> --EXPECTF-- -Fatal error: [snuffleupagus][0.0.0.0][disabled_function] Aborted execution on call of the function 'test_callback' in %a/myfunc_callback.php on line 4 +Fatal error: [snuffleupagus][0.0.0.0][disabled_function][drop] Aborted execution on call of the function 'test_callback' in %a/myfunc_callback.php on line 4 diff --git a/src/tests/disable_function/disabled_functions_called_file_r.phpt b/src/tests/disable_function/disabled_functions_called_file_r.phpt index a02dde0..58d2f5a 100644 --- a/src/tests/disable_function/disabled_functions_called_file_r.phpt +++ b/src/tests/disable_function/disabled_functions_called_file_r.phpt @@ -31,4 +31,4 @@ $dir = __DIR__; @unlink("$dir/myfunc.php"); ?> --EXPECTF-- -Fatal error: [snuffleupagus][0.0.0.0][disabled_function] Aborted execution on call of the function 'test' in %a/myfunc.php on line 3 +Fatal error: [snuffleupagus][0.0.0.0][disabled_function][drop] Aborted execution on call of the function 'test' in %a/myfunc.php on line 3 diff --git a/src/tests/disable_function/disabled_functions_chain.phpt b/src/tests/disable_function/disabled_functions_chain.phpt index fd379c9..757eccf 100644 --- a/src/tests/disable_function/disabled_functions_chain.phpt +++ b/src/tests/disable_function/disabled_functions_chain.phpt @@ -24,4 +24,4 @@ echo "I'm after the call to outer\n"; I'm before the call to outer I'm in the outer function, before the call! -Fatal error: [snuffleupagus][0.0.0.0][disabled_function] Aborted execution on call of the function 'outer>inner' in %a/disabled_functions_chain.php on line 5 \ No newline at end of file +Fatal error: [snuffleupagus][0.0.0.0][disabled_function][drop] Aborted execution on call of the function 'outer>inner' in %a/disabled_functions_chain.php on line 5 \ No newline at end of file diff --git a/src/tests/disable_function/disabled_functions_chain_call_user_func.phpt b/src/tests/disable_function/disabled_functions_chain_call_user_func.phpt index fd07225..f3f6498 100644 --- a/src/tests/disable_function/disabled_functions_chain_call_user_func.phpt +++ b/src/tests/disable_function/disabled_functions_chain_call_user_func.phpt @@ -24,4 +24,4 @@ echo "I'm after the call to outer\n"; I'm before the call to outer I'm in the outer function, before the call! -Fatal error: [snuffleupagus][0.0.0.0][disabled_function] Aborted execution on call of the function 'outer>inner' in %a/disabled_functions_chain_call_user_func.php on line 5 \ No newline at end of file +Fatal error: [snuffleupagus][0.0.0.0][disabled_function][drop] Aborted execution on call of the function 'outer>inner' in %a/disabled_functions_chain_call_user_func.php on line 5 \ No newline at end of file diff --git a/src/tests/disable_function/disabled_functions_chain_call_user_func_ret.phpt b/src/tests/disable_function/disabled_functions_chain_call_user_func_ret.phpt index 3046096..2898f73 100644 --- a/src/tests/disable_function/disabled_functions_chain_call_user_func_ret.phpt +++ b/src/tests/disable_function/disabled_functions_chain_call_user_func_ret.phpt @@ -28,7 +28,7 @@ not matching_one one two -Warning: [snuffleupagus][0.0.0.0][disabled_function] Aborted execution on return of the function 'two', because the function returned 'matching_two', which matched a rule in %a/disabled_functions_chain_call_user_func_ret.php on line %d +Warning: [snuffleupagus][0.0.0.0][disabled_function][simulation] Aborted execution on return of the function 'two', because the function returned 'matching_two', which matched a rule in %a/disabled_functions_chain_call_user_func_ret.php on line %d matching_one one two diff --git a/src/tests/disable_function/disabled_functions_cidr.phpt b/src/tests/disable_function/disabled_functions_cidr.phpt index ea690e8..b26533f 100644 --- a/src/tests/disable_function/disabled_functions_cidr.phpt +++ b/src/tests/disable_function/disabled_functions_cidr.phpt @@ -13,4 +13,4 @@ sp.configuration_file={PWD}/config/disabled_functions_cidr.ini system("echo 42"); ?> --EXPECTF-- -Fatal error: [snuffleupagus][127.0.0.1][disabled_function] Aborted execution on call of the function 'system' in %a/disabled_functions_cidr.php on line 2 \ No newline at end of file +Fatal error: [snuffleupagus][127.0.0.1][disabled_function][drop] Aborted execution on call of the function 'system' in %a/disabled_functions_cidr.php on line 2 \ No newline at end of file diff --git a/src/tests/disable_function/disabled_functions_cidr_6.phpt b/src/tests/disable_function/disabled_functions_cidr_6.phpt index 914cd35..a795395 100644 --- a/src/tests/disable_function/disabled_functions_cidr_6.phpt +++ b/src/tests/disable_function/disabled_functions_cidr_6.phpt @@ -14,4 +14,4 @@ strpos("a", "b"); printf(1337); ?> --EXPECTF-- -Fatal error: [snuffleupagus][2001:0db8:f000:f000:f000:ff00:0042:8328][disabled_function] Aborted execution on call of the function 'strpos' in %a/disabled_functions_cidr_6.php on line 2 +Fatal error: [snuffleupagus][2001:0db8:f000:f000:f000:ff00:0042:8328][disabled_function][drop] Aborted execution on call of the function 'strpos' in %a/disabled_functions_cidr_6.php on line 2 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 index 03112c7..e0703bc 100644 --- a/src/tests/disable_function/disabled_functions_cidr_x_fwd_for.phpt +++ b/src/tests/disable_function/disabled_functions_cidr_x_fwd_for.phpt @@ -13,4 +13,4 @@ sp.configuration_file={PWD}/config/disabled_functions_cidr.ini system("echo 42"); ?> --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 +Fatal error: [snuffleupagus][127.0.0.1][disabled_function][drop] 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 index 9e223e8..7f2ecae 100644 --- 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 @@ -14,4 +14,4 @@ sp.configuration_file={PWD}/config/disabled_functions_cidr.ini system("echo 42"); ?> --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 +Fatal error: [snuffleupagus][127.0.0.2][disabled_function][drop] Aborted execution on call of the function 'system' in %a/disabled_functions_cidr_x_fwd_for_remote_addr.php on line 2 diff --git a/src/tests/disable_function/disabled_functions_die.phpt b/src/tests/disable_function/disabled_functions_die.phpt index 73bd657..10aae14 100644 --- a/src/tests/disable_function/disabled_functions_die.phpt +++ b/src/tests/disable_function/disabled_functions_die.phpt @@ -10,4 +10,4 @@ die('OMG'); ?> --XFAIL-- --EXPECTF-- -Fatal error: [snuffleupagus][0.0.0.0][disabled_function] Aborted execution on call of the function 'die' in %a/disabled_function_echo.php on line 3 +Fatal error: [snuffleupagus][0.0.0.0][disabled_function][drop] Aborted execution on call of the function 'die' in %a/disabled_function_echo.php on line 3 diff --git a/src/tests/disable_function/disabled_functions_eval.phpt b/src/tests/disable_function/disabled_functions_eval.phpt index 04b2342..7297213 100644 --- a/src/tests/disable_function/disabled_functions_eval.phpt +++ b/src/tests/disable_function/disabled_functions_eval.phpt @@ -11,4 +11,4 @@ eval('$var = 1337 + 1337;'); print("Variable: $var\n"); ?> --EXPECTF-- -Fatal error: [snuffleupagus][0.0.0.0][disabled_function] Aborted execution on call of the function 'eval' in %a/disabled_functions_eval.php(3) : eval()'d code on line 1 \ No newline at end of file +Fatal error: [snuffleupagus][0.0.0.0][disabled_function][drop] Aborted execution on call of the function 'eval' in %a/disabled_functions_eval.php(3) : eval()'d code on line 1 \ No newline at end of file diff --git a/src/tests/disable_function/disabled_functions_eval_filename.phpt b/src/tests/disable_function/disabled_functions_eval_filename.phpt index 564116e..e58c449 100644 --- a/src/tests/disable_function/disabled_functions_eval_filename.phpt +++ b/src/tests/disable_function/disabled_functions_eval_filename.phpt @@ -11,4 +11,4 @@ eval('$var = 1337 + 1337;'); print("Variable: $var\n"); ?> --EXPECTF-- -Fatal error: [snuffleupagus][0.0.0.0][disabled_function] Aborted execution on call of the function 'eval' in %a/disabled_functions_eval_filename.php(3) : eval()'d code on line 1 \ No newline at end of file +Fatal error: [snuffleupagus][0.0.0.0][disabled_function][drop] Aborted execution on call of the function 'eval' in %a/disabled_functions_eval_filename.php(3) : eval()'d code on line 1 \ No newline at end of file diff --git a/src/tests/disable_function/disabled_functions_eval_simulation.phpt b/src/tests/disable_function/disabled_functions_eval_simulation.phpt index 6286235..d757b73 100644 --- a/src/tests/disable_function/disabled_functions_eval_simulation.phpt +++ b/src/tests/disable_function/disabled_functions_eval_simulation.phpt @@ -11,5 +11,5 @@ eval('$var = 1337 + 1337;'); print("Variable: $var\n"); ?> --EXPECTF-- -Warning: [snuffleupagus][0.0.0.0][disabled_function] Aborted execution on call of the function 'eval' in %a/disabled_functions_eval_simulation.php(3) : eval()'d code on line 1 +Warning: [snuffleupagus][0.0.0.0][disabled_function][simulation] Aborted execution on call of the function 'eval' in %a/disabled_functions_eval_simulation.php(3) : eval()'d code on line 1 Variable: 2674 \ No newline at end of file diff --git a/src/tests/disable_function/disabled_functions_eval_user.phpt b/src/tests/disable_function/disabled_functions_eval_user.phpt index 7e02d13..46918d6 100644 --- a/src/tests/disable_function/disabled_functions_eval_user.phpt +++ b/src/tests/disable_function/disabled_functions_eval_user.phpt @@ -15,4 +15,4 @@ eval('$a = my_func();'); echo '$a = ' . $a . "\n"; ?> --EXPECTF-- -Fatal error: [snuffleupagus][0.0.0.0][disabled_function] Aborted execution on call of the function 'my_func' in %a/disabled_functions_eval_user.php on line 3 \ No newline at end of file +Fatal error: [snuffleupagus][0.0.0.0][disabled_function][drop] Aborted execution on call of the function 'my_func' in %a/disabled_functions_eval_user.php on line 3 \ No newline at end of file diff --git a/src/tests/disable_function/disabled_functions_exit.phpt b/src/tests/disable_function/disabled_functions_exit.phpt index a6fd3c6..80ffbca 100644 --- a/src/tests/disable_function/disabled_functions_exit.phpt +++ b/src/tests/disable_function/disabled_functions_exit.phpt @@ -10,4 +10,4 @@ exit('OMG'); ?> --XFAIL-- --EXPECTF-- -Fatal error: [snuffleupagus][0.0.0.0][disabled_function] Aborted execution on call of the function 'exit' in %a/disabled_function_echo.php on line 3 +Fatal error: [snuffleupagus][0.0.0.0][disabled_function][drop] Aborted execution on call of the function 'exit' in %a/disabled_function_echo.php on line 3 diff --git a/src/tests/disable_function/disabled_functions_filename_r.phpt b/src/tests/disable_function/disabled_functions_filename_r.phpt index 9f36cce..8b1c98e 100644 --- a/src/tests/disable_function/disabled_functions_filename_r.phpt +++ b/src/tests/disable_function/disabled_functions_filename_r.phpt @@ -12,4 +12,4 @@ shell_exec("echo 43"); --EXPECTF-- 42 -Fatal error: [snuffleupagus][0.0.0.0][disabled_function] Aborted execution on call of the function 'shell_exec' in %a/disabled_functions_filename_r.php on line 3 \ No newline at end of file +Fatal error: [snuffleupagus][0.0.0.0][disabled_function][drop] Aborted execution on call of the function 'shell_exec' in %a/disabled_functions_filename_r.php on line 3 \ No newline at end of file diff --git a/src/tests/disable_function/disabled_functions_include_once.phpt b/src/tests/disable_function/disabled_functions_include_once.phpt index 3709aff..0018744 100644 --- a/src/tests/disable_function/disabled_functions_include_once.phpt +++ b/src/tests/disable_function/disabled_functions_include_once.phpt @@ -22,6 +22,6 @@ unlink($dir . '/test.sim'); --EXPECTF-- BLA -Warning: [snuffleupagus][0.0.0.0][disabled_function] Aborted execution on call of the function 'include_once', because its argument 'inclusion path' content (%a/test.sim) matched a rule in %a/disabled_functions_include_once.php on line 6 +Warning: [snuffleupagus][0.0.0.0][disabled_function][simulation] Aborted execution on call of the function 'include_once', because its argument 'inclusion path' content (%a/test.sim) matched a rule in %a/disabled_functions_include_once.php on line 6 MEH 1337 diff --git a/src/tests/disable_function/disabled_functions_include_simulation.phpt b/src/tests/disable_function/disabled_functions_include_simulation.phpt index 60ba9ee..1e9b944 100644 --- a/src/tests/disable_function/disabled_functions_include_simulation.phpt +++ b/src/tests/disable_function/disabled_functions_include_simulation.phpt @@ -22,6 +22,6 @@ unlink($dir . '/test.sim'); --EXPECTF-- BLA -Warning: [snuffleupagus][0.0.0.0][disabled_function] Aborted execution on call of the function 'include', because its argument 'inclusion path' content (%a/test.sim) matched a rule in %a/disabled_functions_include_simulation.php on line 6 +Warning: [snuffleupagus][0.0.0.0][disabled_function][simulation] Aborted execution on call of the function 'include', because its argument 'inclusion path' content (%a/test.sim) matched a rule in %a/disabled_functions_include_simulation.php on line 6 MEH 1337 diff --git a/src/tests/disable_function/disabled_functions_local_var_array.phpt b/src/tests/disable_function/disabled_functions_local_var_array.phpt index f460d72..3bb0928 100644 --- a/src/tests/disable_function/disabled_functions_local_var_array.phpt +++ b/src/tests/disable_function/disabled_functions_local_var_array.phpt @@ -18,4 +18,4 @@ foo($a); --EXPECTF-- cccc -Fatal error: [snuffleupagus][0.0.0.0][disabled_function] Aborted execution on call of the function 'foo' in %a/disabled_functions_local_var_array.php on line 3 \ No newline at end of file +Fatal error: [snuffleupagus][0.0.0.0][disabled_function][drop] Aborted execution on call of the function 'foo' in %a/disabled_functions_local_var_array.php on line 3 \ No newline at end of file diff --git a/src/tests/disable_function/disabled_functions_local_var_array_key.phpt b/src/tests/disable_function/disabled_functions_local_var_array_key.phpt index b69db4a..dbf038b 100644 --- a/src/tests/disable_function/disabled_functions_local_var_array_key.phpt +++ b/src/tests/disable_function/disabled_functions_local_var_array_key.phpt @@ -18,4 +18,4 @@ foo($a); --EXPECTF-- cccc -Fatal error: [snuffleupagus][0.0.0.0][disabled_function] Aborted execution on call of the function 'foo' in %a/disabled_functions_local_var_array_key.php on line 3 \ No newline at end of file +Fatal error: [snuffleupagus][0.0.0.0][disabled_function][drop] Aborted execution on call of the function 'foo' in %a/disabled_functions_local_var_array_key.php on line 3 \ No newline at end of file diff --git a/src/tests/disable_function/disabled_functions_mb.phpt b/src/tests/disable_function/disabled_functions_mb.phpt index eda11f7..b283787 100644 --- a/src/tests/disable_function/disabled_functions_mb.phpt +++ b/src/tests/disable_function/disabled_functions_mb.phpt @@ -9,4 +9,4 @@ sp.configuration_file={PWD}/config/disabled_functions_mb.ini echo strtoupper("id"); ?> --EXPECTF-- -Fatal error: [snuffleupagus][0.0.0.0][disabled_function] Aborted execution on call of the function 'strtoupper' in %a/disabled_functions_mb.php on line 2 \ No newline at end of file +Fatal error: [snuffleupagus][0.0.0.0][disabled_function][drop] Aborted execution on call of the function 'strtoupper' in %a/disabled_functions_mb.php on line 2 \ No newline at end of file diff --git a/src/tests/disable_function/disabled_functions_method.phpt b/src/tests/disable_function/disabled_functions_method.phpt index 632d570..fe9b22d 100644 --- a/src/tests/disable_function/disabled_functions_method.phpt +++ b/src/tests/disable_function/disabled_functions_method.phpt @@ -24,4 +24,4 @@ $c->method2("paf"); $c->method3("pouet"); ?> --EXPECTF-- -Fatal error: [snuffleupagus][0.0.0.0][disabled_function] Aborted execution on call of the function 'AwesomeClass::method1' in %a/disabled_functions_method.php on line 4 \ No newline at end of file +Fatal error: [snuffleupagus][0.0.0.0][disabled_function][drop] Aborted execution on call of the function 'AwesomeClass::method1' in %a/disabled_functions_method.php on line 4 \ No newline at end of file diff --git a/src/tests/disable_function/disabled_functions_name_r.phpt b/src/tests/disable_function/disabled_functions_name_r.phpt index 0a151a6..5759679 100644 --- a/src/tests/disable_function/disabled_functions_name_r.phpt +++ b/src/tests/disable_function/disabled_functions_name_r.phpt @@ -13,4 +13,4 @@ system("echo 1337"); 42 1337 -Fatal error: [snuffleupagus][0.0.0.0][disabled_function] Aborted execution on return of the function 'system', because the function returned '1337', which matched a rule in %a/disabled_functions_name_r.php on line 3 \ No newline at end of file +Fatal error: [snuffleupagus][0.0.0.0][disabled_function][drop] Aborted execution on return of the function 'system', because the function returned '1337', which matched a rule in %a/disabled_functions_name_r.php on line 3 \ No newline at end of file diff --git a/src/tests/disable_function/disabled_functions_name_regexp_type.phpt b/src/tests/disable_function/disabled_functions_name_regexp_type.phpt index 0bcb28c..ce24d76 100644 --- a/src/tests/disable_function/disabled_functions_name_regexp_type.phpt +++ b/src/tests/disable_function/disabled_functions_name_regexp_type.phpt @@ -14,4 +14,4 @@ echo strcmp([1], "pouet") . "\n"; 0 -1 -Fatal error: [snuffleupagus][0.0.0.0][disabled_function] Aborted execution on call of the function 'strcmp', because its argument 'str1' content (?) matched a rule in %a/disabled_functions_name_regexp_type.php on line 4 \ No newline at end of file +Fatal error: [snuffleupagus][0.0.0.0][disabled_function][drop] Aborted execution on call of the function 'strcmp', because its argument 'str1' content (?) matched a rule in %a/disabled_functions_name_regexp_type.php on line 4 \ No newline at end of file diff --git a/src/tests/disable_function/disabled_functions_name_type.phpt b/src/tests/disable_function/disabled_functions_name_type.phpt index 59b4683..3816ef6 100644 --- a/src/tests/disable_function/disabled_functions_name_type.phpt +++ b/src/tests/disable_function/disabled_functions_name_type.phpt @@ -12,4 +12,4 @@ echo strcmp([1,23], "pouet") . "\n"; --EXPECTF-- 0 -Fatal error: [snuffleupagus][0.0.0.0][disabled_function] Aborted execution on call of the function 'strcmp', because its argument '$str1' content (ARRAY) matched a rule in %a/disabled_functions_name_type.php on line 3 \ No newline at end of file +Fatal error: [snuffleupagus][0.0.0.0][disabled_function][drop] Aborted execution on call of the function 'strcmp', because its argument '$str1' content (ARRAY) matched a rule in %a/disabled_functions_name_type.php on line 3 \ No newline at end of file diff --git a/src/tests/disable_function/disabled_functions_namespace.phpt b/src/tests/disable_function/disabled_functions_namespace.phpt index af310c3..a51c788 100644 --- a/src/tests/disable_function/disabled_functions_namespace.phpt +++ b/src/tests/disable_function/disabled_functions_namespace.phpt @@ -27,4 +27,4 @@ my_function(); } ?> --EXPECTF-- -Fatal error: [snuffleupagus][0.0.0.0][disabled_function] Aborted execution on call of the function 'strcmp' in %a/disabled_functions_namespace.php on line 16 \ No newline at end of file +Fatal error: [snuffleupagus][0.0.0.0][disabled_function][drop] Aborted execution on call of the function 'strcmp' in %a/disabled_functions_namespace.php on line 16 \ No newline at end of file diff --git a/src/tests/disable_function/disabled_functions_nul_byte.phpt b/src/tests/disable_function/disabled_functions_nul_byte.phpt index dbb7600..53ce25b 100644 --- a/src/tests/disable_function/disabled_functions_nul_byte.phpt +++ b/src/tests/disable_function/disabled_functions_nul_byte.phpt @@ -11,4 +11,4 @@ system("id"); ?> --EXPECTF-- -Fatal error: [snuffleupagus][0.0.0.0][disabled_function] Aborted execution on call of the function 'system', because its argument '$command' content (0id) matched a rule in %a/disabled_functions_nul_byte.php on line 2 \ No newline at end of file +Fatal error: [snuffleupagus][0.0.0.0][disabled_function][drop] Aborted execution on call of the function 'system', because its argument '$command' content (0id) matched a rule in %a/disabled_functions_nul_byte.php on line 2 \ No newline at end of file diff --git a/src/tests/disable_function/disabled_functions_param.phpt b/src/tests/disable_function/disabled_functions_param.phpt index 4bc276a..52f3acb 100644 --- a/src/tests/disable_function/disabled_functions_param.phpt +++ b/src/tests/disable_function/disabled_functions_param.phpt @@ -15,4 +15,4 @@ strcmp("bla", "ble"); strncmp("bla", "ble", 2); ?> --EXPECTF-- -Fatal error: [snuffleupagus][0.0.0.0][disabled_function] Aborted execution on call of the function 'system', because its argument '$command' content (id) matched the rule '1' in %a/disabled_functions_param.php on line 2 \ No newline at end of file +Fatal error: [snuffleupagus][0.0.0.0][disabled_function][drop] Aborted execution on call of the function 'system', because its argument '$command' content (id) matched the rule '1' in %a/disabled_functions_param.php on line 2 \ No newline at end of file diff --git a/src/tests/disable_function/disabled_functions_param_alias.phpt b/src/tests/disable_function/disabled_functions_param_alias.phpt index 1d44e72..42a6fb7 100644 --- a/src/tests/disable_function/disabled_functions_param_alias.phpt +++ b/src/tests/disable_function/disabled_functions_param_alias.phpt @@ -10,4 +10,4 @@ system("id"); shell_exec("id"); ?> --EXPECTF-- -Fatal error: [snuffleupagus][0.0.0.0][disabled_function] Aborted execution on call of the function 'system', because of the the rule '1' in %a/disabled_functions_param_alias.php on line 2 \ No newline at end of file +Fatal error: [snuffleupagus][0.0.0.0][disabled_function][drop] Aborted execution on call of the function 'system', because of the the rule '1' in %a/disabled_functions_param_alias.php on line 2 \ No newline at end of file diff --git a/src/tests/disable_function/disabled_functions_param_allow.phpt b/src/tests/disable_function/disabled_functions_param_allow.phpt index b0e7de1..1913754 100644 --- a/src/tests/disable_function/disabled_functions_param_allow.phpt +++ b/src/tests/disable_function/disabled_functions_param_allow.phpt @@ -12,4 +12,4 @@ system("id"); --EXPECTF-- win -Fatal error: [snuffleupagus][0.0.0.0][disabled_function] Aborted execution on call of the function 'system' in %a/disabled_functions_param_allow.php on line 3 \ No newline at end of file +Fatal error: [snuffleupagus][0.0.0.0][disabled_function][drop] Aborted execution on call of the function 'system' in %a/disabled_functions_param_allow.php on line 3 \ No newline at end of file diff --git a/src/tests/disable_function/disabled_functions_param_array.phpt b/src/tests/disable_function/disabled_functions_param_array.phpt index 2053b14..47123bd 100644 --- a/src/tests/disable_function/disabled_functions_param_array.phpt +++ b/src/tests/disable_function/disabled_functions_param_array.phpt @@ -22,4 +22,4 @@ foo($a); test1 abcde -Fatal error: [snuffleupagus][0.0.0.0][disabled_function] Aborted execution on call of the function 'foo', because its argument '$arr' content (abcd) matched the rule '1' in %a/disabled_functions_param_array.php on line 3 \ No newline at end of file +Fatal error: [snuffleupagus][0.0.0.0][disabled_function][drop] Aborted execution on call of the function 'foo', because its argument '$arr' content (abcd) matched the rule '1' in %a/disabled_functions_param_array.php on line 3 \ No newline at end of file diff --git a/src/tests/disable_function/disabled_functions_param_array_deref.phpt b/src/tests/disable_function/disabled_functions_param_array_deref.phpt index f162d47..795f5eb 100644 --- a/src/tests/disable_function/disabled_functions_param_array_deref.phpt +++ b/src/tests/disable_function/disabled_functions_param_array_deref.phpt @@ -23,4 +23,4 @@ foo($a); eee abcdef -Fatal error: [snuffleupagus][0.0.0.0][disabled_function] Aborted execution on call of the function 'foo', because its argument '$arr' content (abcdef) matched the rule '2' in %a/disabled_functions_param_array_deref.php on line 3 \ No newline at end of file +Fatal error: [snuffleupagus][0.0.0.0][disabled_function][drop] Aborted execution on call of the function 'foo', because its argument '$arr' content (abcdef) matched the rule '2' in %a/disabled_functions_param_array_deref.php on line 3 \ No newline at end of file diff --git a/src/tests/disable_function/disabled_functions_param_array_no_value.phpt b/src/tests/disable_function/disabled_functions_param_array_no_value.phpt index 549842f..5f6a59b 100644 --- a/src/tests/disable_function/disabled_functions_param_array_no_value.phpt +++ b/src/tests/disable_function/disabled_functions_param_array_no_value.phpt @@ -20,4 +20,4 @@ foo($a); --EXPECTF-- cccc -Fatal error: [snuffleupagus][0.0.0.0][disabled_function] Aborted execution on call of the function 'foo', because its argument '$arr' content (aaa) matched the rule '3' in %a/disabled_functions_param_array_no_value.php on line 3 \ No newline at end of file +Fatal error: [snuffleupagus][0.0.0.0][disabled_function][drop] Aborted execution on call of the function 'foo', because its argument '$arr' content (aaa) matched the rule '3' in %a/disabled_functions_param_array_no_value.php on line 3 \ No newline at end of file diff --git a/src/tests/disable_function/disabled_functions_param_array_r.phpt b/src/tests/disable_function/disabled_functions_param_array_r.phpt index 6c11c63..b3bf286 100644 --- a/src/tests/disable_function/disabled_functions_param_array_r.phpt +++ b/src/tests/disable_function/disabled_functions_param_array_r.phpt @@ -18,4 +18,4 @@ foo($a); --EXPECTF-- cccc -Fatal error: [snuffleupagus][0.0.0.0][disabled_function] Aborted execution on call of the function 'foo', because its argument 'arr' content (ARRAY) matched the rule '1' in %a/disabled_functions_param_array_r.php on line 3 \ No newline at end of file +Fatal error: [snuffleupagus][0.0.0.0][disabled_function][drop] Aborted execution on call of the function 'foo', because its argument 'arr' content (ARRAY) matched the rule '1' in %a/disabled_functions_param_array_r.php on line 3 \ No newline at end of file diff --git a/src/tests/disable_function/disabled_functions_param_array_r_keys.phpt b/src/tests/disable_function/disabled_functions_param_array_r_keys.phpt index 3fdd398..7f68633 100644 --- a/src/tests/disable_function/disabled_functions_param_array_r_keys.phpt +++ b/src/tests/disable_function/disabled_functions_param_array_r_keys.phpt @@ -18,4 +18,4 @@ foo($a); --EXPECTF-- cccc -Fatal error: [snuffleupagus][0.0.0.0][disabled_function] Aborted execution on call of the function 'foo', because its argument 'arr' content (ARRAY) matched the rule '2' in %a/disabled_functions_param_array_r_keys.php on line 3 \ No newline at end of file +Fatal error: [snuffleupagus][0.0.0.0][disabled_function][drop] Aborted execution on call of the function 'foo', because its argument 'arr' content (ARRAY) matched the rule '2' in %a/disabled_functions_param_array_r_keys.php on line 3 \ No newline at end of file diff --git a/src/tests/disable_function/disabled_functions_param_array_several_levels.phpt b/src/tests/disable_function/disabled_functions_param_array_several_levels.phpt index 7d7d727..68026e1 100644 --- a/src/tests/disable_function/disabled_functions_param_array_several_levels.phpt +++ b/src/tests/disable_function/disabled_functions_param_array_several_levels.phpt @@ -18,4 +18,4 @@ foo($a); --EXPECTF-- cccc -Fatal error: [snuffleupagus][0.0.0.0][disabled_function] Aborted execution on call of the function 'foo', because its argument '$arr' content (ARRAY) matched the rule '4' in %a/disabled_functions_param_array_several_levels.php on line 3 \ No newline at end of file +Fatal error: [snuffleupagus][0.0.0.0][disabled_function][drop] Aborted execution on call of the function 'foo', because its argument '$arr' content (ARRAY) matched the rule '4' in %a/disabled_functions_param_array_several_levels.php on line 3 \ No newline at end of file diff --git a/src/tests/disable_function/disabled_functions_param_array_several_levels_int.phpt b/src/tests/disable_function/disabled_functions_param_array_several_levels_int.phpt index c22b912..c869c4f 100644 --- a/src/tests/disable_function/disabled_functions_param_array_several_levels_int.phpt +++ b/src/tests/disable_function/disabled_functions_param_array_several_levels_int.phpt @@ -18,4 +18,4 @@ foo($a); --EXPECTF-- cccc -Fatal error: [snuffleupagus][0.0.0.0][disabled_function] Aborted execution on call of the function 'foo', because its argument '$arr' content (ARRAY) matched the rule '4' in %a/disabled_functions_param_array_several_levels_int.php on line 3 \ No newline at end of file +Fatal error: [snuffleupagus][0.0.0.0][disabled_function][drop] Aborted execution on call of the function 'foo', because its argument '$arr' content (ARRAY) matched the rule '4' in %a/disabled_functions_param_array_several_levels_int.php on line 3 \ No newline at end of file diff --git a/src/tests/disable_function/disabled_functions_param_array_several_levels_keys.phpt b/src/tests/disable_function/disabled_functions_param_array_several_levels_keys.phpt index f662d11..0b1bd23 100644 --- a/src/tests/disable_function/disabled_functions_param_array_several_levels_keys.phpt +++ b/src/tests/disable_function/disabled_functions_param_array_several_levels_keys.phpt @@ -18,4 +18,4 @@ foo($a); --EXPECTF-- cccc -Fatal error: [snuffleupagus][0.0.0.0][disabled_function] Aborted execution on call of the function 'foo', because its argument '$arr' content (ARRAY) matched the rule '5' in %a/disabled_functions_param_array_several_levels_keys.php on line 3 \ No newline at end of file +Fatal error: [snuffleupagus][0.0.0.0][disabled_function][drop] Aborted execution on call of the function 'foo', because its argument '$arr' content (ARRAY) matched the rule '5' in %a/disabled_functions_param_array_several_levels_keys.php on line 3 \ No newline at end of file diff --git a/src/tests/disable_function/disabled_functions_param_array_several_levels_keys_int.phpt b/src/tests/disable_function/disabled_functions_param_array_several_levels_keys_int.phpt index 9ede4d8..5641ce7 100644 --- a/src/tests/disable_function/disabled_functions_param_array_several_levels_keys_int.phpt +++ b/src/tests/disable_function/disabled_functions_param_array_several_levels_keys_int.phpt @@ -18,4 +18,4 @@ foo($a); --EXPECTF-- cccc -Fatal error: [snuffleupagus][0.0.0.0][disabled_function] Aborted execution on call of the function 'foo', because its argument '$arr' content (ARRAY) matched the rule '6' in %a/disabled_functions_param_array_several_levels_keys_int.php on line 3 \ No newline at end of file +Fatal error: [snuffleupagus][0.0.0.0][disabled_function][drop] Aborted execution on call of the function 'foo', because its argument '$arr' content (ARRAY) matched the rule '6' in %a/disabled_functions_param_array_several_levels_keys_int.php on line 3 \ No newline at end of file diff --git a/src/tests/disable_function/disabled_functions_param_broken_line.phpt b/src/tests/disable_function/disabled_functions_param_broken_line.phpt index f7a379d..2dfab6a 100644 --- a/src/tests/disable_function/disabled_functions_param_broken_line.phpt +++ b/src/tests/disable_function/disabled_functions_param_broken_line.phpt @@ -10,9 +10,9 @@ system("echo 1337"); system("echo 1338"); ?> --EXPECTF-- -PHP Fatal error: [snuffleupagus][0.0.0.0][config] Failed to parse arg 'qwe' of `line` on line 1 in Unknown on line 0 +PHP Fatal error: [snuffleupagus][0.0.0.0][config][log] Failed to parse arg 'qwe' of `line` on line 1 in Unknown on line 0 -Fatal error: [snuffleupagus][0.0.0.0][config] Failed to parse arg 'qwe' of `line` on line 1 in Unknown on line 0 +Fatal error: [snuffleupagus][0.0.0.0][config][log] Failed to parse arg 'qwe' of `line` on line 1 in Unknown on line 0 -Fatal error: [snuffleupagus][0.0.0.0][config] Invalid configuration file in Unknown on line 0 +Fatal error: [snuffleupagus][0.0.0.0][config][log] Invalid configuration file in Unknown on line 0 Could not startup. diff --git a/src/tests/disable_function/disabled_functions_param_int.phpt b/src/tests/disable_function/disabled_functions_param_int.phpt index 4fa87e1..482bea8 100644 --- a/src/tests/disable_function/disabled_functions_param_int.phpt +++ b/src/tests/disable_function/disabled_functions_param_int.phpt @@ -19,4 +19,4 @@ foobar("10"); --EXPECTF-- 1 -Fatal error: [snuffleupagus][0.0.0.0][disabled_function] Aborted execution on call of the function 'foobar', because its argument '$id' content (42) matched a rule in %a/disabled_functions_param_int.php on line 3 \ No newline at end of file +Fatal error: [snuffleupagus][0.0.0.0][disabled_function][drop] Aborted execution on call of the function 'foobar', because its argument '$id' content (42) matched a rule in %a/disabled_functions_param_int.php on line 3 \ No newline at end of file diff --git a/src/tests/disable_function/disabled_functions_param_invalid_pos.phpt b/src/tests/disable_function/disabled_functions_param_invalid_pos.phpt index 67da890..4c5b824 100644 --- a/src/tests/disable_function/disabled_functions_param_invalid_pos.phpt +++ b/src/tests/disable_function/disabled_functions_param_invalid_pos.phpt @@ -9,9 +9,9 @@ sp.configuration_file={PWD}/config/disabled_functions_invalid_pos.ini system("echo 1"); ?> --EXPECTF-- -PHP Fatal error: [snuffleupagus][0.0.0.0][config] Failed to parse arg 'qwe' of `pos` on line 1 in Unknown on line 0 +PHP Fatal error: [snuffleupagus][0.0.0.0][config][log] Failed to parse arg 'qwe' of `pos` on line 1 in Unknown on line 0 -Fatal error: [snuffleupagus][0.0.0.0][config] Failed to parse arg 'qwe' of `pos` on line 1 in Unknown on line 0 +Fatal error: [snuffleupagus][0.0.0.0][config][log] Failed to parse arg 'qwe' of `pos` on line 1 in Unknown on line 0 -Fatal error: [snuffleupagus][0.0.0.0][config] Invalid configuration file in Unknown on line 0 +Fatal error: [snuffleupagus][0.0.0.0][config][log] Invalid configuration file in Unknown on line 0 Could not startup. diff --git a/src/tests/disable_function/disabled_functions_param_line.phpt b/src/tests/disable_function/disabled_functions_param_line.phpt index 9d2daba..2172d4b 100644 --- a/src/tests/disable_function/disabled_functions_param_line.phpt +++ b/src/tests/disable_function/disabled_functions_param_line.phpt @@ -12,4 +12,4 @@ system("id"); --EXPECTF-- 1337 -Fatal error: [snuffleupagus][0.0.0.0][disabled_function] Aborted execution on call of the function 'system' in %a/disabled_functions_param_line.php on line 3 \ No newline at end of file +Fatal error: [snuffleupagus][0.0.0.0][disabled_function][drop] Aborted execution on call of the function 'system' in %a/disabled_functions_param_line.php on line 3 \ No newline at end of file diff --git a/src/tests/disable_function/disabled_functions_param_pos.phpt b/src/tests/disable_function/disabled_functions_param_pos.phpt index 468c09e..8d5f93f 100644 --- a/src/tests/disable_function/disabled_functions_param_pos.phpt +++ b/src/tests/disable_function/disabled_functions_param_pos.phpt @@ -9,6 +9,6 @@ sp.configuration_file={PWD}/config/disabled_functions_pos.ini system("id"); ?> --EXPECTF-- -Warning: [snuffleupagus][0.0.0.0][config] It seems that you wrote a rule filtering on the 1337th argument of the function 'system', but it takes only 1 arguments. Matching on _all_ arguments instead. in %a/disabled_functions_param_pos.php on line 2 +Warning: [snuffleupagus][0.0.0.0][config][log] It seems that you wrote a rule filtering on the 1337th argument of the function 'system', but it takes only 1 arguments. Matching on _all_ arguments instead. in %a/disabled_functions_param_pos.php on line 2 -Fatal error: [snuffleupagus][0.0.0.0][disabled_function] Aborted execution on call of the function 'system', because its argument 'command' content (id) matched a rule in %a/disabled_functions_param_pos.php on line %d +Fatal error: [snuffleupagus][0.0.0.0][disabled_function][drop] Aborted execution on call of the function 'system', because its argument 'command' content (id) matched a rule in %a/disabled_functions_param_pos.php on line %d diff --git a/src/tests/disable_function/disabled_functions_param_pos2.phpt b/src/tests/disable_function/disabled_functions_param_pos2.phpt index a33ffe6..c8f7893 100644 --- a/src/tests/disable_function/disabled_functions_param_pos2.phpt +++ b/src/tests/disable_function/disabled_functions_param_pos2.phpt @@ -10,4 +10,4 @@ strtoupper("od"); strtoupper("id"); ?> --EXPECTF-- -Fatal error: [snuffleupagus][0.0.0.0][disabled_function] Aborted execution on call of the function 'strtoupper', because its argument 'str' content (id) matched the rule 'strlen array' in %a/disabled_functions_param_pos2.php on line 3 \ No newline at end of file +Fatal error: [snuffleupagus][0.0.0.0][disabled_function][drop] Aborted execution on call of the function 'strtoupper', because its argument 'str' content (id) matched the rule 'strlen array' in %a/disabled_functions_param_pos2.php on line 3 \ No newline at end of file diff --git a/src/tests/disable_function/disabled_functions_param_r.phpt b/src/tests/disable_function/disabled_functions_param_r.phpt index 1f066b6..4d34701 100644 --- a/src/tests/disable_function/disabled_functions_param_r.phpt +++ b/src/tests/disable_function/disabled_functions_param_r.phpt @@ -10,4 +10,4 @@ system("id"); system("echo win"); ?> --EXPECTF-- -Fatal error: [snuffleupagus][0.0.0.0][disabled_function] Aborted execution on call of the function 'system', because its argument 'command' content (id) matched a rule in %a/disabled_functions_param_r.php on line 2 \ No newline at end of file +Fatal error: [snuffleupagus][0.0.0.0][disabled_function][drop] Aborted execution on call of the function 'system', because its argument 'command' content (id) matched a rule in %a/disabled_functions_param_r.php on line 2 \ No newline at end of file diff --git a/src/tests/disable_function/disabled_functions_pos_type.phpt b/src/tests/disable_function/disabled_functions_pos_type.phpt index b033e8a..74d5e08 100644 --- a/src/tests/disable_function/disabled_functions_pos_type.phpt +++ b/src/tests/disable_function/disabled_functions_pos_type.phpt @@ -9,8 +9,8 @@ sp.configuration_file={PWD}/config/disabled_functions_pos.ini system([123, 456]); ?> --EXPECTF-- -Warning: [snuffleupagus][0.0.0.0][config] It seems that you wrote a rule filtering on the 1337th argument of the function 'system', but it takes only 1 arguments. Matching on _all_ arguments instead. in %a/disabled_functions_pos_type.php on line %d +Warning: [snuffleupagus][0.0.0.0][config][log] It seems that you wrote a rule filtering on the 1337th argument of the function 'system', but it takes only 1 arguments. Matching on _all_ arguments instead. in %a/disabled_functions_pos_type.php on line %d -Warning: [snuffleupagus][0.0.0.0][config] It seems that you wrote a rule filtering on the 1st argument of the function 'system', but it takes only 1 arguments. Matching on _all_ arguments instead. in %a/disabled_functions_pos_type.php on line %d +Warning: [snuffleupagus][0.0.0.0][config][log] It seems that you wrote a rule filtering on the 1st argument of the function 'system', but it takes only 1 arguments. Matching on _all_ arguments instead. in %a/disabled_functions_pos_type.php on line %d -Fatal error: [snuffleupagus][0.0.0.0][disabled_function] Aborted execution on call of the function 'system', because its argument 'command' content (?) matched the rule '1' in %a/disabled_functions_pos_type.php on line %d +Fatal error: [snuffleupagus][0.0.0.0][disabled_function][drop] Aborted execution on call of the function 'system', because its argument 'command' content (?) matched the rule '1' in %a/disabled_functions_pos_type.php on line %d diff --git a/src/tests/disable_function/disabled_functions_regexp_multiple.phpt b/src/tests/disable_function/disabled_functions_regexp_multiple.phpt index e783c30..f78e0f5 100644 --- a/src/tests/disable_function/disabled_functions_regexp_multiple.phpt +++ b/src/tests/disable_function/disabled_functions_regexp_multiple.phpt @@ -11,9 +11,9 @@ echo strcmp("1", "2") . "\n"; print("After") . "\n"; ?> --EXPECTF-- -Warning: [snuffleupagus][0.0.0.0][disabled_function] Aborted execution on call of the function 'strtoupper' in %a/disabled_functions_regexp_multiple.php on line 2 +Warning: [snuffleupagus][0.0.0.0][disabled_function][simulation] Aborted execution on call of the function 'strtoupper' in %a/disabled_functions_regexp_multiple.php on line 2 ID -Warning: [snuffleupagus][0.0.0.0][disabled_function] Aborted execution on call of the function 'strcmp' in %a/disabled_functions_regexp_multiple.php on line 3 +Warning: [snuffleupagus][0.0.0.0][disabled_function][simulation] Aborted execution on call of the function 'strcmp' in %a/disabled_functions_regexp_multiple.php on line 3 -1 After diff --git a/src/tests/disable_function/disabled_functions_register_shutdown_function.phpt b/src/tests/disable_function/disabled_functions_register_shutdown_function.phpt index 623cadf..b0d04ad 100644 --- a/src/tests/disable_function/disabled_functions_register_shutdown_function.phpt +++ b/src/tests/disable_function/disabled_functions_register_shutdown_function.phpt @@ -15,4 +15,4 @@ register_shutdown_function('my_super_function'); --EXPECTF-- 1337 -Fatal error: [snuffleupagus][0.0.0.0][disabled_function] Aborted execution on call of the function 'my_super_function' in %a/disabled_functions_register_shutdown_function.php on line 3 \ No newline at end of file +Fatal error: [snuffleupagus][0.0.0.0][disabled_function][drop] Aborted execution on call of the function 'my_super_function' in %a/disabled_functions_register_shutdown_function.php on line 3 \ No newline at end of file diff --git a/src/tests/disable_function/disabled_functions_register_tick_function.phpt b/src/tests/disable_function/disabled_functions_register_tick_function.phpt index 8e6331e..c74f3c7 100644 --- a/src/tests/disable_function/disabled_functions_register_tick_function.phpt +++ b/src/tests/disable_function/disabled_functions_register_tick_function.phpt @@ -16,4 +16,4 @@ register_tick_function('my_super_function'); --EXPECTF-- 1337 -Fatal error: [snuffleupagus][0.0.0.0][disabled_function] Aborted execution on call of the function 'my_super_function' in %a/disabled_functions_register_tick_function.php on line 4 \ No newline at end of file +Fatal error: [snuffleupagus][0.0.0.0][disabled_function][drop] Aborted execution on call of the function 'my_super_function' in %a/disabled_functions_register_tick_function.php on line 4 \ No newline at end of file diff --git a/src/tests/disable_function/disabled_functions_require.phpt b/src/tests/disable_function/disabled_functions_require.phpt index af146d3..d05ab04 100644 --- a/src/tests/disable_function/disabled_functions_require.phpt +++ b/src/tests/disable_function/disabled_functions_require.phpt @@ -21,4 +21,4 @@ unlink($dir . '/test.meh'); ?> --EXPECTF-- BLA -Fatal error: [snuffleupagus][0.0.0.0][disabled_function] Aborted execution on call of the function 'require', because its argument 'inclusion path' content (%a/test.meh) matched a rule in %a/disabled_functions_require.php on line 6 +Fatal error: [snuffleupagus][0.0.0.0][disabled_function][drop] Aborted execution on call of the function 'require', because its argument 'inclusion path' content (%a/test.meh) matched a rule in %a/disabled_functions_require.php on line 6 diff --git a/src/tests/disable_function/disabled_functions_require_once.phpt b/src/tests/disable_function/disabled_functions_require_once.phpt index cd09671..b9e64f2 100644 --- a/src/tests/disable_function/disabled_functions_require_once.phpt +++ b/src/tests/disable_function/disabled_functions_require_once.phpt @@ -21,4 +21,4 @@ unlink($dir . '/test.meh'); ?> --EXPECTF-- BLA -Fatal error: [snuffleupagus][0.0.0.0][disabled_function] Aborted execution on call of the function 'require_once', because its argument 'inclusion path' content (%a/test.meh) matched a rule in %a/disabled_functions_require_once.php on line 6 +Fatal error: [snuffleupagus][0.0.0.0][disabled_function][drop] Aborted execution on call of the function 'require_once', because its argument 'inclusion path' content (%a/test.meh) matched a rule in %a/disabled_functions_require_once.php on line 6 diff --git a/src/tests/disable_function/disabled_functions_require_simulation.phpt b/src/tests/disable_function/disabled_functions_require_simulation.phpt index 405bc18..b23fdec 100644 --- a/src/tests/disable_function/disabled_functions_require_simulation.phpt +++ b/src/tests/disable_function/disabled_functions_require_simulation.phpt @@ -22,6 +22,6 @@ unlink($dir . '/test.sim'); --EXPECTF-- BLA -Warning: [snuffleupagus][0.0.0.0][disabled_function] Aborted execution on call of the function 'require', because its argument 'inclusion path' content (%a/test.sim) matched a rule in %a/disabled_functions_require_simulation.php on line 6 +Warning: [snuffleupagus][0.0.0.0][disabled_function][simulation] Aborted execution on call of the function 'require', because its argument 'inclusion path' content (%a/test.sim) matched a rule in %a/disabled_functions_require_simulation.php on line 6 MEH 1337 diff --git a/src/tests/disable_function/disabled_functions_ret.phpt b/src/tests/disable_function/disabled_functions_ret.phpt index ab1b263..f8a20c7 100644 --- a/src/tests/disable_function/disabled_functions_ret.phpt +++ b/src/tests/disable_function/disabled_functions_ret.phpt @@ -10,4 +10,4 @@ echo strpos("pouet", "p"); echo stripos("pouet", "p"); ?> --EXPECTF-- -Fatal error: [snuffleupagus][0.0.0.0][disabled_function] Aborted execution on return of the function 'strpos', because the function returned '0', which matched a rule in %a/disabled_functions_ret.php on line 2 \ No newline at end of file +Fatal error: [snuffleupagus][0.0.0.0][disabled_function][drop] Aborted execution on return of the function 'strpos', because the function returned '0', which matched a rule in %a/disabled_functions_ret.php on line 2 \ No newline at end of file diff --git a/src/tests/disable_function/disabled_functions_ret2.phpt b/src/tests/disable_function/disabled_functions_ret2.phpt index 1f3b02d..93af2d1 100644 --- a/src/tests/disable_function/disabled_functions_ret2.phpt +++ b/src/tests/disable_function/disabled_functions_ret2.phpt @@ -9,4 +9,4 @@ sp.configuration_file={PWD}/config/disabled_functions_ret.ini echo stripos("pouet", "p"); ?> --EXPECTF-- -Fatal error: [snuffleupagus][0.0.0.0][disabled_function] Aborted execution on return of the function 'stripos', because the function returned '0', which matched a rule in %a/disabled_functions_ret2.php on line 2 \ No newline at end of file +Fatal error: [snuffleupagus][0.0.0.0][disabled_function][drop] Aborted execution on return of the function 'stripos', because the function returned '0', which matched a rule in %a/disabled_functions_ret2.php on line 2 \ No newline at end of file diff --git a/src/tests/disable_function/disabled_functions_ret3.phpt b/src/tests/disable_function/disabled_functions_ret3.phpt index aa2d7d2..21edb94 100644 --- a/src/tests/disable_function/disabled_functions_ret3.phpt +++ b/src/tests/disable_function/disabled_functions_ret3.phpt @@ -20,4 +20,4 @@ echo("We're at the end of the execution.\n"); --EXPECTF-- We're in function `a`. -Fatal error: [snuffleupagus][0.0.0.0][disabled_function] Aborted execution on return of the function 'Bob::a', because the function returned '2', which matched a rule in %a/disabled_functions_ret3.php on line 9 \ No newline at end of file +Fatal error: [snuffleupagus][0.0.0.0][disabled_function][drop] Aborted execution on return of the function 'Bob::a', because the function returned '2', which matched a rule in %a/disabled_functions_ret3.php on line 9 \ No newline at end of file diff --git a/src/tests/disable_function/disabled_functions_ret_right_hash.phpt b/src/tests/disable_function/disabled_functions_ret_right_hash.phpt index b306fb9..68d89a5 100644 --- a/src/tests/disable_function/disabled_functions_ret_right_hash.phpt +++ b/src/tests/disable_function/disabled_functions_ret_right_hash.phpt @@ -11,4 +11,4 @@ system("echo $((1 + 1336))"); --EXPECTF-- 1337 -Fatal error: [snuffleupagus][0.0.0.0][disabled_function] Aborted execution on return of the function 'system', because the function returned '1337', which matched a rule in %a/disabled_functions_ret_right_hash.php on line 2 \ No newline at end of file +Fatal error: [snuffleupagus][0.0.0.0][disabled_function][drop] Aborted execution on return of the function 'system', because the function returned '1337', which matched a rule in %a/disabled_functions_ret_right_hash.php on line 2 \ No newline at end of file diff --git a/src/tests/disable_function/disabled_functions_ret_simulation.phpt b/src/tests/disable_function/disabled_functions_ret_simulation.phpt index 70691ee..4085215 100644 --- a/src/tests/disable_function/disabled_functions_ret_simulation.phpt +++ b/src/tests/disable_function/disabled_functions_ret_simulation.phpt @@ -11,10 +11,10 @@ echo stripos("pouet", "p") . "\n"; strcmp("p", "p") . "\n"; ?> --EXPECTF-- -Warning: [snuffleupagus][0.0.0.0][disabled_function] Aborted execution on return of the function 'strpos', because the function returned '0', which matched a rule in %a/disabled_functions_ret_simulation.php on line 2 +Warning: [snuffleupagus][0.0.0.0][disabled_function][simulation] Aborted execution on return of the function 'strpos', because the function returned '0', which matched a rule in %a/disabled_functions_ret_simulation.php on line 2 0 -Warning: [snuffleupagus][0.0.0.0][disabled_function] Aborted execution on return of the function 'stripos', because the function returned '0', which matched the rule '1' in %a/disabled_functions_ret_simulation.php on line 3 +Warning: [snuffleupagus][0.0.0.0][disabled_function][simulation] Aborted execution on return of the function 'stripos', because the function returned '0', which matched the rule '1' in %a/disabled_functions_ret_simulation.php on line 3 0 -Fatal error: [snuffleupagus][0.0.0.0][disabled_function] Aborted execution on return of the function 'strcmp', because the function returned '0', which matched a rule in %a/disabled_functions_ret_simulation.php on line 4 \ No newline at end of file +Fatal error: [snuffleupagus][0.0.0.0][disabled_function][drop] Aborted execution on return of the function 'strcmp', because the function returned '0', which matched a rule in %a/disabled_functions_ret_simulation.php on line 4 \ No newline at end of file diff --git a/src/tests/disable_function/disabled_functions_ret_type.phpt b/src/tests/disable_function/disabled_functions_ret_type.phpt index 9679f01..ffcc590 100644 --- a/src/tests/disable_function/disabled_functions_ret_type.phpt +++ b/src/tests/disable_function/disabled_functions_ret_type.phpt @@ -14,4 +14,4 @@ echo strpos("pouet", "123"); int(0) 1337 -Fatal error: [snuffleupagus][0.0.0.0][disabled_function] Aborted execution on return of the function 'strpos', because the function returned 'FALSE', which matched the rule 'Return value is FALSE' in %a/disabled_functions_ret_type.php on line 4 \ No newline at end of file +Fatal error: [snuffleupagus][0.0.0.0][disabled_function][drop] Aborted execution on return of the function 'strpos', because the function returned 'FALSE', which matched the rule 'Return value is FALSE' in %a/disabled_functions_ret_type.php on line 4 \ No newline at end of file diff --git a/src/tests/disable_function/disabled_functions_ret_type_array.phpt b/src/tests/disable_function/disabled_functions_ret_type_array.phpt index 1b20e53..85e1ce9 100644 --- a/src/tests/disable_function/disabled_functions_ret_type_array.phpt +++ b/src/tests/disable_function/disabled_functions_ret_type_array.phpt @@ -9,4 +9,4 @@ sp.configuration_file={PWD}/config/disabled_functions_ret_type_array.ini echo get_loaded_extensions(); ?> --EXPECTF-- -Fatal error: [snuffleupagus][0.0.0.0][disabled_function] Aborted execution on return of the function 'get_loaded_extensions', because the function returned 'ARRAY', which matched the rule 'Return value is an array' in %a/disabled_functions_ret_type_array.php on line 2 \ No newline at end of file +Fatal error: [snuffleupagus][0.0.0.0][disabled_function][drop] Aborted execution on return of the function 'get_loaded_extensions', because the function returned 'ARRAY', which matched the rule 'Return value is an array' in %a/disabled_functions_ret_type_array.php on line 2 \ No newline at end of file diff --git a/src/tests/disable_function/disabled_functions_ret_type_double.phpt b/src/tests/disable_function/disabled_functions_ret_type_double.phpt index 1810b88..6291d60 100644 --- a/src/tests/disable_function/disabled_functions_ret_type_double.phpt +++ b/src/tests/disable_function/disabled_functions_ret_type_double.phpt @@ -9,4 +9,4 @@ sp.configuration_file={PWD}/config/disabled_functions_ret_type_double.ini echo cos(0.5) . "\n"; ?> --EXPECTF-- -Fatal error: [snuffleupagus][0.0.0.0][disabled_function] Aborted execution on return of the function 'cos', because the function returned '0.877583', which matched the rule 'Return value is a double' in %a/disabled_functions_ret_type_double.php on line 2 \ No newline at end of file +Fatal error: [snuffleupagus][0.0.0.0][disabled_function][drop] Aborted execution on return of the function 'cos', because the function returned '0.877583', which matched the rule 'Return value is a double' in %a/disabled_functions_ret_type_double.php on line 2 \ No newline at end of file diff --git a/src/tests/disable_function/disabled_functions_ret_type_long.phpt b/src/tests/disable_function/disabled_functions_ret_type_long.phpt index c5c9e38..694b6c5 100644 --- a/src/tests/disable_function/disabled_functions_ret_type_long.phpt +++ b/src/tests/disable_function/disabled_functions_ret_type_long.phpt @@ -9,4 +9,4 @@ sp.configuration_file={PWD}/config/disabled_functions_ret_type_long.ini echo strpos("pouet", "o") . "\n"; ?> --EXPECTF-- -Fatal error: [snuffleupagus][0.0.0.0][disabled_function] Aborted execution on return of the function 'strpos', because the function returned '1', which matched the rule 'Return value is a long' in %a/disabled_functions_ret_type_long.php on line 2 +Fatal error: [snuffleupagus][0.0.0.0][disabled_function][drop] Aborted execution on return of the function 'strpos', because the function returned '1', which matched the rule 'Return value is a long' in %a/disabled_functions_ret_type_long.php on line 2 diff --git a/src/tests/disable_function/disabled_functions_ret_type_null.phpt b/src/tests/disable_function/disabled_functions_ret_type_null.phpt index b245a95..e946ea9 100644 --- a/src/tests/disable_function/disabled_functions_ret_type_null.phpt +++ b/src/tests/disable_function/disabled_functions_ret_type_null.phpt @@ -13,4 +13,4 @@ function my_function() { var_dump(my_function()); ?> --EXPECTF-- -Fatal error: [snuffleupagus][0.0.0.0][disabled_function] Aborted execution on return of the function 'my_function', because the function returned 'NULL', which matched the rule 'Return value is null' in %a/disabled_functions_ret_type_null.php on line 6 \ No newline at end of file +Fatal error: [snuffleupagus][0.0.0.0][disabled_function][drop] Aborted execution on return of the function 'my_function', because the function returned 'NULL', which matched the rule 'Return value is null' in %a/disabled_functions_ret_type_null.php on line 6 \ No newline at end of file diff --git a/src/tests/disable_function/disabled_functions_ret_type_object.phpt b/src/tests/disable_function/disabled_functions_ret_type_object.phpt index a4d1c9a..f8ee6a8 100644 --- a/src/tests/disable_function/disabled_functions_ret_type_object.phpt +++ b/src/tests/disable_function/disabled_functions_ret_type_object.phpt @@ -13,4 +13,4 @@ $var = a(); echo "fail"; ?> --EXPECTF-- -Fatal error: [snuffleupagus][0.0.0.0][disabled_function] Aborted execution on return of the function 'a', because the function returned 'OBJECT', which matched a rule in %a/disabled_functions_ret_type_object.php on line 5 \ No newline at end of file +Fatal error: [snuffleupagus][0.0.0.0][disabled_function][drop] Aborted execution on return of the function 'a', because the function returned 'OBJECT', which matched a rule in %a/disabled_functions_ret_type_object.php on line 5 \ No newline at end of file diff --git a/src/tests/disable_function/disabled_functions_ret_type_resource.phpt b/src/tests/disable_function/disabled_functions_ret_type_resource.phpt index 67ae2a6..6a3e940 100644 --- a/src/tests/disable_function/disabled_functions_ret_type_resource.phpt +++ b/src/tests/disable_function/disabled_functions_ret_type_resource.phpt @@ -9,4 +9,4 @@ sp.configuration_file={PWD}/config/disabled_functions_ret_type_resource.ini echo fopen("/etc/passwd", "r"); ?> --EXPECTF-- -Fatal error: [snuffleupagus][0.0.0.0][disabled_function] Aborted execution on return of the function 'fopen', because the function returned 'RESOURCE', which matched the rule 'Return value is a resource' in %a/disabled_functions_ret_type_resource.php on line 2 \ No newline at end of file +Fatal error: [snuffleupagus][0.0.0.0][disabled_function][drop] Aborted execution on return of the function 'fopen', because the function returned 'RESOURCE', which matched the rule 'Return value is a resource' in %a/disabled_functions_ret_type_resource.php on line 2 \ No newline at end of file diff --git a/src/tests/disable_function/disabled_functions_ret_type_str.phpt b/src/tests/disable_function/disabled_functions_ret_type_str.phpt index 0dcdaaa..c4750b4 100644 --- a/src/tests/disable_function/disabled_functions_ret_type_str.phpt +++ b/src/tests/disable_function/disabled_functions_ret_type_str.phpt @@ -9,4 +9,4 @@ sp.configuration_file={PWD}/config/disabled_functions_ret_type_str.ini echo substr("pouet", 3) . "\n"; ?> --EXPECTF-- -Fatal error: [snuffleupagus][0.0.0.0][disabled_function] Aborted execution on return of the function 'substr', because the function returned 'et', which matched the rule 'Return value is a string' in %a/disabled_functions_ret_type_str.php on line 2 \ No newline at end of file +Fatal error: [snuffleupagus][0.0.0.0][disabled_function][drop] Aborted execution on return of the function 'substr', because the function returned 'et', which matched the rule 'Return value is a string' in %a/disabled_functions_ret_type_str.php on line 2 \ No newline at end of file diff --git a/src/tests/disable_function/disabled_functions_ret_type_true.phpt b/src/tests/disable_function/disabled_functions_ret_type_true.phpt index 6a4749a..5b2dacb 100644 --- a/src/tests/disable_function/disabled_functions_ret_type_true.phpt +++ b/src/tests/disable_function/disabled_functions_ret_type_true.phpt @@ -14,4 +14,4 @@ echo is_numeric("1234") . "\n"; bool(false) 1337 -Fatal error: [snuffleupagus][0.0.0.0][disabled_function] Aborted execution on return of the function 'is_numeric', because the function returned 'TRUE', which matched the rule 'Return value is a true' in %a/disabled_functions_ret_type_true.php on line 4 \ No newline at end of file +Fatal error: [snuffleupagus][0.0.0.0][disabled_function][drop] Aborted execution on return of the function 'is_numeric', because the function returned 'TRUE', which matched the rule 'Return value is a true' in %a/disabled_functions_ret_type_true.php on line 4 \ No newline at end of file diff --git a/src/tests/disable_function/disabled_functions_ret_user.phpt b/src/tests/disable_function/disabled_functions_ret_user.phpt index 989a7ab..71f1375 100644 --- a/src/tests/disable_function/disabled_functions_ret_user.phpt +++ b/src/tests/disable_function/disabled_functions_ret_user.phpt @@ -13,4 +13,4 @@ qwe(); echo 1; ?> --EXPECTF-- -Fatal error: [snuffleupagus][0.0.0.0][disabled_function] Aborted execution on return of the function 'qwe', because the function returned 'asd', which matched a rule in %a/disabled_functions_ret_user.php on line %d +Fatal error: [snuffleupagus][0.0.0.0][disabled_function][drop] Aborted execution on return of the function 'qwe', because the function returned 'asd', which matched a rule in %a/disabled_functions_ret_user.php on line %d diff --git a/src/tests/disable_function/disabled_functions_ret_user_used.phpt b/src/tests/disable_function/disabled_functions_ret_user_used.phpt index 05e1323..9640329 100644 --- a/src/tests/disable_function/disabled_functions_ret_user_used.phpt +++ b/src/tests/disable_function/disabled_functions_ret_user_used.phpt @@ -12,4 +12,4 @@ function qwe() { echo qwe(); ?> --EXPECTF-- -Fatal error: [snuffleupagus][0.0.0.0][disabled_function] Aborted execution on return of the function 'qwe', because the function returned 'asd', which matched a rule in %a/disabled_functions_ret_user_used.php on line %d +Fatal error: [snuffleupagus][0.0.0.0][disabled_function][drop] Aborted execution on return of the function 'qwe', because the function returned 'asd', which matched a rule in %a/disabled_functions_ret_user_used.php on line %d diff --git a/src/tests/disable_function/disabled_functions_ret_val.phpt b/src/tests/disable_function/disabled_functions_ret_val.phpt index a914c56..12ce715 100644 --- a/src/tests/disable_function/disabled_functions_ret_val.phpt +++ b/src/tests/disable_function/disabled_functions_ret_val.phpt @@ -12,4 +12,4 @@ echo str_repeat("fufufu",1); --EXPECTF-- fufu -Fatal error: [snuffleupagus][0.0.0.0][disabled_function] Aborted execution on return of the function 'str_repeat', because the function returned 'fufufu', which matched a rule in %a/disabled_functions_ret_val.php on line 3 \ No newline at end of file +Fatal error: [snuffleupagus][0.0.0.0][disabled_function][drop] Aborted execution on return of the function 'str_repeat', because the function returned 'fufufu', which matched a rule in %a/disabled_functions_ret_val.php on line 3 \ No newline at end of file diff --git a/src/tests/disable_function/disabled_functions_ret_val_dump.phpt b/src/tests/disable_function/disabled_functions_ret_val_dump.phpt index c8fb2c3..95b2639 100644 --- a/src/tests/disable_function/disabled_functions_ret_val_dump.phpt +++ b/src/tests/disable_function/disabled_functions_ret_val_dump.phpt @@ -20,4 +20,4 @@ echo str_repeat("fufufu",1); --EXPECTF-- fufu -Fatal error: [snuffleupagus][0.0.0.0][disabled_function] Aborted execution on return of the function 'str_repeat', because the function returned 'fufufu', which matched a rule in %a/disabled_functions_ret_val_dump.php on line 3 +Fatal error: [snuffleupagus][0.0.0.0][disabled_function][drop] Aborted execution on return of the function 'str_repeat', because the function returned 'fufufu', which matched a rule in %a/disabled_functions_ret_val_dump.php on line 3 diff --git a/src/tests/disable_function/disabled_functions_ret_val_rx.phpt b/src/tests/disable_function/disabled_functions_ret_val_rx.phpt index 9623ef4..01eceac 100644 --- a/src/tests/disable_function/disabled_functions_ret_val_rx.phpt +++ b/src/tests/disable_function/disabled_functions_ret_val_rx.phpt @@ -12,4 +12,4 @@ echo str_repeat("fufufu",1); --EXPECTF-- fufu -Fatal error: [snuffleupagus][0.0.0.0][disabled_function] Aborted execution on return of the function 'str_repeat', because the function returned 'fufufu', which matched a rule in %a/disabled_functions_ret_val_rx.php on line 3 \ No newline at end of file +Fatal error: [snuffleupagus][0.0.0.0][disabled_function][drop] Aborted execution on return of the function 'str_repeat', because the function returned 'fufufu', which matched a rule in %a/disabled_functions_ret_val_rx.php on line 3 \ No newline at end of file diff --git a/src/tests/disable_function/disabled_functions_runtime.phpt b/src/tests/disable_function/disabled_functions_runtime.phpt index cd6f44d..41fa297 100644 --- a/src/tests/disable_function/disabled_functions_runtime.phpt +++ b/src/tests/disable_function/disabled_functions_runtime.phpt @@ -29,4 +29,4 @@ unlink("file_to_include2.php"); --EXPECTF-- 1338 -Fatal error: [snuffleupagus][0.0.0.0][disabled_function] Aborted execution on call of the function 'test', because its argument '$param' content (1337) matched a rule in %a/src/file_to_include%d.php on line 1 +Fatal error: [snuffleupagus][0.0.0.0][disabled_function][drop] Aborted execution on call of the function 'test', because its argument '$param' content (1337) matched a rule in %a/src/file_to_include%d.php on line 1 diff --git a/src/tests/disable_function/disabled_functions_upper.phpt b/src/tests/disable_function/disabled_functions_upper.phpt index f7cdcbb..cdeb1b9 100644 --- a/src/tests/disable_function/disabled_functions_upper.phpt +++ b/src/tests/disable_function/disabled_functions_upper.phpt @@ -13,4 +13,4 @@ vaR_DUmp("this is a super test"); echo sTRPOs("pouet", "o"); ?> --EXPECTF-- -Fatal error: [snuffleupagus][0.0.0.0][disabled_function] Aborted execution on call of the function 'system' in %a/disabled_functions_upper.php on line 2 \ No newline at end of file +Fatal error: [snuffleupagus][0.0.0.0][disabled_function][drop] Aborted execution on call of the function 'system' in %a/disabled_functions_upper.php on line 2 \ No newline at end of file diff --git a/src/tests/disable_function/disabled_functions_variadic.phpt b/src/tests/disable_function/disabled_functions_variadic.phpt index 32b6b0e..e20fa41 100644 --- a/src/tests/disable_function/disabled_functions_variadic.phpt +++ b/src/tests/disable_function/disabled_functions_variadic.phpt @@ -13,6 +13,6 @@ function foo(...$b) { echo foo(5, 4, 3, 2, 1); ?> --EXPECTF-- -Warning: [snuffleupagus][0.0.0.0][disable_function] Snuffleupagus doesn't support variadic functions yet, sorry. Check https://github.com/jvoisin/snuffleupagus/issues/164 for details. in %a/disabled_functions_variadic.php on line %d +Warning: [snuffleupagus][0.0.0.0][disable_function][log] Snuffleupagus doesn't support variadic functions yet, sorry. Check https://github.com/jvoisin/snuffleupagus/issues/164 for details. in %a/disabled_functions_variadic.php on line %d -Fatal error: [snuffleupagus][0.0.0.0][disabled_function] Aborted execution on call of the function 'foo' in %a/disabled_functions_variadic.php on line %d +Fatal error: [snuffleupagus][0.0.0.0][disabled_function][drop] Aborted execution on call of the function 'foo' in %a/disabled_functions_variadic.php on line %d diff --git a/src/tests/disable_function/disabled_functions_zero_cidr.phpt b/src/tests/disable_function/disabled_functions_zero_cidr.phpt index 0ec596c..a0bc95c 100644 --- a/src/tests/disable_function/disabled_functions_zero_cidr.phpt +++ b/src/tests/disable_function/disabled_functions_zero_cidr.phpt @@ -14,4 +14,4 @@ system("echo 42"); printf("1337"); ?> --EXPECTF-- -Fatal error: [snuffleupagus][127.0.0.1][disabled_function] Aborted execution on call of the function 'system' in %a/disabled_functions_zero_cidr.php on line 2 \ No newline at end of file +Fatal error: [snuffleupagus][127.0.0.1][disabled_function][drop] Aborted execution on call of the function 'system' in %a/disabled_functions_zero_cidr.php on line 2 \ No newline at end of file diff --git a/src/tests/disable_function/disabled_native_functions_indirect.phpt b/src/tests/disable_function/disabled_native_functions_indirect.phpt index bcbb1eb..9b2cda0 100644 --- a/src/tests/disable_function/disabled_native_functions_indirect.phpt +++ b/src/tests/disable_function/disabled_native_functions_indirect.phpt @@ -9,4 +9,4 @@ sp.configuration_file={PWD}/config/disabled_functions.ini array_map('system', [1,2,3,4]); ?> --EXPECTF-- -Fatal error: [snuffleupagus][0.0.0.0][disabled_function] Aborted execution on call of the function 'system' in %a/disabled_native_functions_indirect.php on line 2 \ No newline at end of file +Fatal error: [snuffleupagus][0.0.0.0][disabled_function][drop] Aborted execution on call of the function 'system' in %a/disabled_native_functions_indirect.php on line 2 \ No newline at end of file diff --git a/src/tests/disable_function/disabled_user_functions.phpt b/src/tests/disable_function/disabled_user_functions.phpt index 66303ec..629d1df 100644 --- a/src/tests/disable_function/disabled_user_functions.phpt +++ b/src/tests/disable_function/disabled_user_functions.phpt @@ -12,4 +12,4 @@ function my_super_function() { my_super_function(); ?> --EXPECTF-- -Fatal error: [snuffleupagus][0.0.0.0][disabled_function] Aborted execution on call of the function 'my_super_function' in %a/disabled_user_functions.php on line 3 \ No newline at end of file +Fatal error: [snuffleupagus][0.0.0.0][disabled_function][drop] Aborted execution on call of the function 'my_super_function' in %a/disabled_user_functions.php on line 3 \ No newline at end of file diff --git a/src/tests/disable_function/disabled_user_functions_indirect.phpt b/src/tests/disable_function/disabled_user_functions_indirect.phpt index 6631866..9231bb9 100644 --- a/src/tests/disable_function/disabled_user_functions_indirect.phpt +++ b/src/tests/disable_function/disabled_user_functions_indirect.phpt @@ -12,4 +12,4 @@ function my_super_function() { array_map('my_super_function', [1,2,3,4]); ?> --EXPECTF-- -Fatal error: [snuffleupagus][0.0.0.0][disabled_function] Aborted execution on call of the function 'my_super_function' in %a/disabled_user_functions_indirect.php on line 3 \ No newline at end of file +Fatal error: [snuffleupagus][0.0.0.0][disabled_function][drop] Aborted execution on call of the function 'my_super_function' in %a/disabled_user_functions_indirect.php on line 3 \ No newline at end of file diff --git a/src/tests/disable_function/noncore_function_hooking.phpt b/src/tests/disable_function/noncore_function_hooking.phpt index a1639e5..ac7d987 100644 --- a/src/tests/disable_function/noncore_function_hooking.phpt +++ b/src/tests/disable_function/noncore_function_hooking.phpt @@ -12,4 +12,4 @@ function custom_fun($a) { custom_fun("hello"); ?> --EXPECTF-- -Fatal error: [snuffleupagus][0.0.0.0][disabled_function] Aborted execution on call of the function 'custom_fun' in %a/noncore_function_hooking.php on line 3 \ No newline at end of file +Fatal error: [snuffleupagus][0.0.0.0][disabled_function][drop] Aborted execution on call of the function 'custom_fun' in %a/noncore_function_hooking.php on line 3 \ No newline at end of file diff --git a/src/tests/dump_request/dump_eval_blacklist.phpt b/src/tests/dump_request/dump_eval_blacklist.phpt index f3c0b2b..c4981a3 100644 --- a/src/tests/dump_request/dump_eval_blacklist.phpt +++ b/src/tests/dump_request/dump_eval_blacklist.phpt @@ -36,5 +36,5 @@ if ($res[2] != "GET:get_a='data_get_a' get_b='data_get_b' \n") { --EXPECTF-- Outside of eval: 1337 1337 1337 -Warning: [snuffleupagus][0.0.0.0][eval] A call to strtoupper was tried in eval, in %a/dump_eval_blacklist.php:1, logging it. in %a/dump_eval_blacklist.php(9) : eval()'d code on line 1 +Warning: [snuffleupagus][0.0.0.0][eval][simulation] A call to strtoupper was tried in eval, in %a/dump_eval_blacklist.php:1, logging it. in %a/dump_eval_blacklist.php(9) : eval()'d code on line 1 After eval: 1234 diff --git a/src/tests/dump_request/dump_eval_whitelist.phpt b/src/tests/dump_request/dump_eval_whitelist.phpt index d4f5305..53bb918 100644 --- a/src/tests/dump_request/dump_eval_whitelist.phpt +++ b/src/tests/dump_request/dump_eval_whitelist.phpt @@ -48,5 +48,5 @@ if ($res[2] != "GET:get_a='data_get_a' get_b='data_get_b' \n") { Outside of eval: my_fun: 1337 1337 1337 After allowed eval: my_fun: 1234 -Warning: [snuffleupagus][0.0.0.0][Eval_whitelist] The function 'my_other_fun' isn't in the eval whitelist, logging its call. in %a/dump_eval_whitelist.php on line 12 +Warning: [snuffleupagus][0.0.0.0][Eval_whitelist][simulation] The function 'my_other_fun' isn't in the eval whitelist, logging its call. in %a/dump_eval_whitelist.php on line 12 After eval: my_other_fun: 1234 diff --git a/src/tests/dump_request/dump_request.phpt b/src/tests/dump_request/dump_request.phpt index 8e174f8..d177445 100644 --- a/src/tests/dump_request/dump_request.phpt +++ b/src/tests/dump_request/dump_request.phpt @@ -40,5 +40,5 @@ if ($res[2] != "GET:get_a='data_get_a' get_b='data_get_b' \n") { --EXPECTF-- 1 -Warning: [snuffleupagus][0.0.0.0][disabled_function] Aborted execution on call of the function 'system' in %a/dump_request.php on line 7 +Warning: [snuffleupagus][0.0.0.0][disabled_function][simulation] Aborted execution on call of the function 'system' in %a/dump_request.php on line 7 1337 diff --git a/src/tests/dump_request/dump_request_invalid_folder.phpt b/src/tests/dump_request/dump_request_invalid_folder.phpt index 79a1935..2eea791 100644 --- a/src/tests/dump_request/dump_request_invalid_folder.phpt +++ b/src/tests/dump_request/dump_request_invalid_folder.phpt @@ -21,6 +21,6 @@ echo "2\n"; --EXPECTF-- 1 -Warning: [snuffleupagus][0.0.0.0][request_logging] Unable to create the folder '/root/NON_EXISTENT/FOLDER/PLEASE/' in %a/dump_request_invalid_folder.php on line %d +Warning: [snuffleupagus][0.0.0.0][request_logging][log] Unable to create the folder '/root/NON_EXISTENT/FOLDER/PLEASE/' in %a/dump_request_invalid_folder.php on line %d -Fatal error: [snuffleupagus][0.0.0.0][disabled_function] Aborted execution on call of the function 'system' in %a/dump_request_invalid_folder.php on line %d +Fatal error: [snuffleupagus][0.0.0.0][disabled_function][drop] Aborted execution on call of the function 'system' in %a/dump_request_invalid_folder.php on line %d diff --git a/src/tests/dump_request/dump_request_nonwriteable_folder.phpt b/src/tests/dump_request/dump_request_nonwriteable_folder.phpt index 05296b1..fc70341 100644 --- a/src/tests/dump_request/dump_request_nonwriteable_folder.phpt +++ b/src/tests/dump_request/dump_request_nonwriteable_folder.phpt @@ -34,6 +34,6 @@ echo "2\n"; --EXPECTF-- 1 -Warning: [snuffleupagus][0.0.0.0][request_logging] Unable to open %a: Permission denied in %a/dump_request_nonwriteable_folder.php on line %d +Warning: [snuffleupagus][0.0.0.0][request_logging][log] Unable to open %a: Permission denied in %a/dump_request_nonwriteable_folder.php on line %d -Fatal error: [snuffleupagus][0.0.0.0][disabled_function] Aborted execution on call of the function 'system' in %a/dump_request_nonwriteable_folder.php on line 3 +Fatal error: [snuffleupagus][0.0.0.0][disabled_function][drop] Aborted execution on call of the function 'system' in %a/dump_request_nonwriteable_folder.php on line 3 diff --git a/src/tests/dump_request/dump_request_too_big.phpt b/src/tests/dump_request/dump_request_too_big.phpt index 6a3f590..be5d370 100644 --- a/src/tests/dump_request/dump_request_too_big.phpt +++ b/src/tests/dump_request/dump_request_too_big.phpt @@ -40,5 +40,5 @@ if ($res[2] != "GET:get_a='data_get_a' get_b='data_get_b' get_c='aaaaaaaaaaaaaaa --EXPECTF-- 1 -Warning: [snuffleupagus][127.0.0.1][disabled_function] Aborted execution on call of the function 'system' in %a/dump_request_too_big.php on line 8 +Warning: [snuffleupagus][127.0.0.1][disabled_function][simulation] Aborted execution on call of the function 'system' in %a/dump_request_too_big.php on line 8 1337 diff --git a/src/tests/dump_request/dump_segfault1.phpt b/src/tests/dump_request/dump_segfault1.phpt index 27f8af8..4febccf 100644 --- a/src/tests/dump_request/dump_segfault1.phpt +++ b/src/tests/dump_request/dump_segfault1.phpt @@ -9,4 +9,4 @@ sp.configuration_file={PWD}/config/config_dump_segfault1.ini echo strpos("pouet", "p") . "\n"; ?> --EXPECTF-- -Fatal error: [snuffleupagus][0.0.0.0][disabled_function] Aborted execution on return of the function 'strpos', because the function returned '0', which matched the rule 'test' in %a/dump_segfault1.php on line 2 \ No newline at end of file +Fatal error: [snuffleupagus][0.0.0.0][disabled_function][drop] Aborted execution on return of the function 'strpos', because the function returned '0', which matched the rule 'test' in %a/dump_segfault1.php on line 2 \ No newline at end of file diff --git a/src/tests/eval_blacklist/eval_backlist.phpt b/src/tests/eval_blacklist/eval_backlist.phpt index 67643d7..0cb000e 100644 --- a/src/tests/eval_blacklist/eval_backlist.phpt +++ b/src/tests/eval_blacklist/eval_backlist.phpt @@ -14,4 +14,4 @@ echo "After eval: $a\n"; --EXPECTF-- Outside of eval: 1337 1337 1337 -Fatal error: [snuffleupagus][0.0.0.0][eval] A call to strtoupper was tried in eval, in %a/eval_backlist.php:1, dropping it. in %a/eval_backlist.php(4) : eval()'d code on line 1 +Fatal error: [snuffleupagus][0.0.0.0][eval][drop] A call to strtoupper was tried in eval, in %a/eval_backlist.php:1, dropping it. in %a/eval_backlist.php(4) : eval()'d code on line 1 diff --git a/src/tests/eval_blacklist/eval_backlist_call_user_func.phpt b/src/tests/eval_blacklist/eval_backlist_call_user_func.phpt index 7578eac..96bf682 100644 --- a/src/tests/eval_blacklist/eval_backlist_call_user_func.phpt +++ b/src/tests/eval_blacklist/eval_backlist_call_user_func.phpt @@ -11,4 +11,4 @@ eval(' ') ?> --EXPECTF-- -Fatal error: [snuffleupagus][0.0.0.0][eval] A call to strtoupper was tried in eval, in %s/eval_backlist_call_user_func.php:%d, dropping it. in %s/eval_backlist_call_user_func.php(%d) : eval()'d code on line %d +Fatal error: [snuffleupagus][0.0.0.0][eval][drop] A call to strtoupper was tried in eval, in %s/eval_backlist_call_user_func.php:%d, dropping it. in %s/eval_backlist_call_user_func.php(%d) : eval()'d code on line %d diff --git a/src/tests/eval_blacklist/eval_backlist_chained.phpt b/src/tests/eval_blacklist/eval_backlist_chained.phpt index 7eabc02..584ff2f 100644 --- a/src/tests/eval_blacklist/eval_backlist_chained.phpt +++ b/src/tests/eval_blacklist/eval_backlist_chained.phpt @@ -13,4 +13,4 @@ eval(' ') ?> --EXPECTF-- -Fatal error: [snuffleupagus][0.0.0.0][eval] A call to strtoupper was tried in eval, in %s/eval_backlist_chained.php:%d, dropping it. in %s/eval_backlist_chained.php(%d) : eval()'d code on line %d +Fatal error: [snuffleupagus][0.0.0.0][eval][drop] A call to strtoupper was tried in eval, in %s/eval_backlist_chained.php:%d, dropping it. in %s/eval_backlist_chained.php(%d) : eval()'d code on line %d diff --git a/src/tests/eval_blacklist/eval_backlist_list.phpt b/src/tests/eval_blacklist/eval_backlist_list.phpt index 7cb0183..c63df75 100644 --- a/src/tests/eval_blacklist/eval_backlist_list.phpt +++ b/src/tests/eval_blacklist/eval_backlist_list.phpt @@ -14,4 +14,4 @@ echo "After eval: $a\n"; --EXPECTF-- Outside of eval: 1337 1337 1337 -Fatal error: [snuffleupagus][0.0.0.0][eval] A call to strtoupper was tried in eval, in %a/eval_backlist_list.php:1, dropping it. in %a/eval_backlist_list.php(4) : eval()'d code on line 1 +Fatal error: [snuffleupagus][0.0.0.0][eval][drop] A call to strtoupper was tried in eval, in %a/eval_backlist_list.php:1, dropping it. in %a/eval_backlist_list.php(4) : eval()'d code on line 1 diff --git a/src/tests/eval_blacklist/eval_backlist_simulation.phpt b/src/tests/eval_blacklist/eval_backlist_simulation.phpt index d81398c..5701096 100644 --- a/src/tests/eval_blacklist/eval_backlist_simulation.phpt +++ b/src/tests/eval_blacklist/eval_backlist_simulation.phpt @@ -14,5 +14,5 @@ echo "After eval: $a\n"; --EXPECTF-- Outside of eval: 1337 1337 1337 -Warning: [snuffleupagus][0.0.0.0][eval] A call to strtoupper was tried in eval, in %a/eval_backlist_simulation.php:1, logging it. in %a/eval_backlist_simulation.php(4) : eval()'d code on line 1 +Warning: [snuffleupagus][0.0.0.0][eval][simulation] A call to strtoupper was tried in eval, in %a/eval_backlist_simulation.php:1, logging it. in %a/eval_backlist_simulation.php(4) : eval()'d code on line 1 After eval: 1234 diff --git a/src/tests/eval_blacklist/eval_backlist_whitelist.phpt b/src/tests/eval_blacklist/eval_backlist_whitelist.phpt index 7e6524b..3973bb8 100644 --- a/src/tests/eval_blacklist/eval_backlist_whitelist.phpt +++ b/src/tests/eval_blacklist/eval_backlist_whitelist.phpt @@ -21,4 +21,4 @@ echo "After eval: $a\n"; Outside of eval: my_fun: 1337 1337 1337 After allowed eval: my_fun: 1234 -Fatal error: [snuffleupagus][0.0.0.0][Eval_whitelist] The function 'cos' isn't in the eval whitelist, dropping its call. in %a/eval_backlist_whitelist.php(10) : eval()'d code on line 1 \ No newline at end of file +Fatal error: [snuffleupagus][0.0.0.0][Eval_whitelist][drop] The function 'cos' isn't in the eval whitelist, dropping its call. in %a/eval_backlist_whitelist.php(10) : eval()'d code on line 1 \ No newline at end of file diff --git a/src/tests/eval_blacklist/eval_backlist_whitelist_builtin.phpt b/src/tests/eval_blacklist/eval_backlist_whitelist_builtin.phpt index 8b05821..fe770a6 100644 --- a/src/tests/eval_blacklist/eval_backlist_whitelist_builtin.phpt +++ b/src/tests/eval_blacklist/eval_backlist_whitelist_builtin.phpt @@ -21,4 +21,4 @@ echo "After eval: $a\n"; Outside of eval: 1.5574077246549 After allowed eval: 1.5574077246549 -Fatal error: [snuffleupagus][0.0.0.0][Eval_whitelist] The function 'cos' isn't in the eval whitelist, dropping its call. in %a/eval_backlist_whitelist_builtin.php(10) : eval()'d code on line 1 \ No newline at end of file +Fatal error: [snuffleupagus][0.0.0.0][Eval_whitelist][drop] The function 'cos' isn't in the eval whitelist, dropping its call. in %a/eval_backlist_whitelist_builtin.php(10) : eval()'d code on line 1 \ No newline at end of file diff --git a/src/tests/eval_blacklist/eval_whitelist.phpt b/src/tests/eval_blacklist/eval_whitelist.phpt index d5b9d1c..483e097 100644 --- a/src/tests/eval_blacklist/eval_whitelist.phpt +++ b/src/tests/eval_blacklist/eval_whitelist.phpt @@ -25,4 +25,4 @@ echo "After eval: $a\n"; Outside of eval: my_fun: 1337 1337 1337 After allowed eval: my_fun: 1234 -Fatal error: [snuffleupagus][0.0.0.0][Eval_whitelist] The function 'my_other_fun' isn't in the eval whitelist, dropping its call. in %a/eval_whitelist.php on line 7 \ No newline at end of file +Fatal error: [snuffleupagus][0.0.0.0][Eval_whitelist][drop] The function 'my_other_fun' isn't in the eval whitelist, dropping its call. in %a/eval_whitelist.php on line 7 \ No newline at end of file diff --git a/src/tests/eval_blacklist/eval_whitelist_builtin.phpt b/src/tests/eval_blacklist/eval_whitelist_builtin.phpt index 9b406b5..339aef5 100644 --- a/src/tests/eval_blacklist/eval_whitelist_builtin.phpt +++ b/src/tests/eval_blacklist/eval_whitelist_builtin.phpt @@ -17,4 +17,4 @@ echo "After eval: $a\n"; Outside of eval: 0.54030230586814 After allowed eval: 0.28366218546323 -Fatal error: [snuffleupagus][0.0.0.0][Eval_whitelist] The function 'sin' isn't in the eval whitelist, dropping its call. in %a/eval_whitelist_builtin.php(6) : eval()'d code on line 1 \ No newline at end of file +Fatal error: [snuffleupagus][0.0.0.0][Eval_whitelist][drop] The function 'sin' isn't in the eval whitelist, dropping its call. in %a/eval_whitelist_builtin.php(6) : eval()'d code on line 1 \ No newline at end of file diff --git a/src/tests/eval_blacklist/eval_whitelist_include_then_user.phpt b/src/tests/eval_blacklist/eval_whitelist_include_then_user.phpt index f3be8a8..ad294ce 100644 --- a/src/tests/eval_blacklist/eval_whitelist_include_then_user.phpt +++ b/src/tests/eval_blacklist/eval_whitelist_include_then_user.phpt @@ -27,4 +27,4 @@ unlink($dir . '/test.bla'); Outside of eval: 0.54030230586814 After allowed eval: 0.28366218546323 -Fatal error: [snuffleupagus][0.0.0.0][Eval_whitelist] The function 'sin' isn't in the eval whitelist, dropping its call. in %a/test.bla on line 1 \ No newline at end of file +Fatal error: [snuffleupagus][0.0.0.0][Eval_whitelist][drop] The function 'sin' isn't in the eval whitelist, dropping its call. in %a/test.bla on line 1 \ No newline at end of file diff --git a/src/tests/eval_blacklist/eval_whitelist_simulation.phpt b/src/tests/eval_blacklist/eval_whitelist_simulation.phpt index 7648dad..f5d8028 100644 --- a/src/tests/eval_blacklist/eval_whitelist_simulation.phpt +++ b/src/tests/eval_blacklist/eval_whitelist_simulation.phpt @@ -25,5 +25,5 @@ echo "After eval: $a\n"; Outside of eval: my_fun: 1337 1337 1337 After allowed eval: my_fun: 1234 -Warning: [snuffleupagus][0.0.0.0][Eval_whitelist] The function 'my_other_fun' isn't in the eval whitelist, logging its call. in %a/eval_whitelist_simulation.php on line 7 +Warning: [snuffleupagus][0.0.0.0][Eval_whitelist][simulation] The function 'my_other_fun' isn't in the eval whitelist, logging its call. in %a/eval_whitelist_simulation.php on line 7 After eval: my_other_fun: 1234 \ No newline at end of file diff --git a/src/tests/eval_blacklist/eval_whitelist_user_then_builtin.phpt b/src/tests/eval_blacklist/eval_whitelist_user_then_builtin.phpt index aeb4d70..a0806b9 100644 --- a/src/tests/eval_blacklist/eval_whitelist_user_then_builtin.phpt +++ b/src/tests/eval_blacklist/eval_whitelist_user_then_builtin.phpt @@ -21,4 +21,4 @@ echo "After eval: $a\n"; --EXPECTF-- Outside of eval: -0.54402111088937 -Fatal error: [snuffleupagus][0.0.0.0][Eval_whitelist] The function 'sin' isn't in the eval whitelist, dropping its call. in %a/eval_whitelist_user_then_builtin.php on line 4 \ No newline at end of file +Fatal error: [snuffleupagus][0.0.0.0][Eval_whitelist][drop] The function 'sin' isn't in the eval whitelist, dropping its call. in %a/eval_whitelist_user_then_builtin.php on line 4 \ No newline at end of file diff --git a/src/tests/eval_blacklist/nested_eval_blacklist.phpt b/src/tests/eval_blacklist/nested_eval_blacklist.phpt index 2d99449..01bba3c 100644 --- a/src/tests/eval_blacklist/nested_eval_blacklist.phpt +++ b/src/tests/eval_blacklist/nested_eval_blacklist.phpt @@ -26,4 +26,4 @@ Inception lvl 1... Inception lvl 2... Inception lvl 3... -Fatal error: [snuffleupagus][0.0.0.0][eval] A call to strtoupper was tried in eval, in %a/nested_eval_blacklist.php(5) : eval()'d code(4) : eval()'d code:3, dropping it. in %a/nested_eval_blacklist.php(5) : eval()'d code(4) : eval()'d code(4) : eval()'d code on line 3 +Fatal error: [snuffleupagus][0.0.0.0][eval][drop] A call to strtoupper was tried in eval, in %a/nested_eval_blacklist.php(5) : eval()'d code(4) : eval()'d code:3, dropping it. in %a/nested_eval_blacklist.php(5) : eval()'d code(4) : eval()'d code(4) : eval()'d code on line 3 diff --git a/src/tests/eval_blacklist/nested_eval_blacklist2.phpt b/src/tests/eval_blacklist/nested_eval_blacklist2.phpt index d84a1f6..ec5bdfe 100644 --- a/src/tests/eval_blacklist/nested_eval_blacklist2.phpt +++ b/src/tests/eval_blacklist/nested_eval_blacklist2.phpt @@ -26,4 +26,4 @@ Inception lvl 1... Inception lvl 2... Inception lvl 3... -Fatal error: [snuffleupagus][0.0.0.0][eval] A call to strtoupper was tried in eval, in %a/nested_eval_blacklist2.php(5) : eval()'d code:7, dropping it. in %a/nested_eval_blacklist2.php(5) : eval()'d code(4) : eval()'d code on line 7 +Fatal error: [snuffleupagus][0.0.0.0][eval][drop] A call to strtoupper was tried in eval, in %a/nested_eval_blacklist2.php(5) : eval()'d code:7, dropping it. in %a/nested_eval_blacklist2.php(5) : eval()'d code(4) : eval()'d code on line 7 diff --git a/src/tests/glob_config.phpt b/src/tests/glob_config.phpt index 2d62c3a..6cacc38 100644 --- a/src/tests/glob_config.phpt +++ b/src/tests/glob_config.phpt @@ -16,8 +16,8 @@ foo(); bla(); ?> --EXPECTF-- -Warning: [snuffleupagus][0.0.0.0][disabled_function] Aborted execution on call of the function 'foo' in %a/glob_config.php on line 3 +Warning: [snuffleupagus][0.0.0.0][disabled_function][simulation] Aborted execution on call of the function 'foo' in %a/glob_config.php on line 3 1 -Warning: [snuffleupagus][0.0.0.0][disabled_function] Aborted execution on call of the function 'bla' in %a/glob_config.php on line 6 +Warning: [snuffleupagus][0.0.0.0][disabled_function][simulation] Aborted execution on call of the function 'bla' in %a/glob_config.php on line 6 2 \ No newline at end of file diff --git a/src/tests/inexistent_conf_file.phpt b/src/tests/inexistent_conf_file.phpt index 9b5e3d6..78f37a6 100644 --- a/src/tests/inexistent_conf_file.phpt +++ b/src/tests/inexistent_conf_file.phpt @@ -7,9 +7,9 @@ sp.configuration_file={PWD}/config/unexistent_configuration_file.ini --FILE-- --EXPECTF-- -PHP Fatal error: [snuffleupagus][0.0.0.0][config] Could not open configuration file %a/config/unexistent_configuration_file.ini : No such file or directory in Unknown on line 0 +PHP Fatal error: [snuffleupagus][0.0.0.0][config][log] Could not open configuration file %a/config/unexistent_configuration_file.ini : No such file or directory in Unknown on line 0 -Fatal error: [snuffleupagus][0.0.0.0][config] Could not open configuration file %a/config/unexistent_configuration_file.ini : No such file or directory in Unknown on line 0 +Fatal error: [snuffleupagus][0.0.0.0][config][log] Could not open configuration file %a/config/unexistent_configuration_file.ini : No such file or directory in Unknown on line 0 -Fatal error: [snuffleupagus][0.0.0.0][config] Invalid configuration file in Unknown on line 0 +Fatal error: [snuffleupagus][0.0.0.0][config][log] Invalid configuration file in Unknown on line 0 Could not startup. \ No newline at end of file diff --git a/src/tests/inexistent_conf_file_list.phpt b/src/tests/inexistent_conf_file_list.phpt index b8b3bea..705fcbf 100644 --- a/src/tests/inexistent_conf_file_list.phpt +++ b/src/tests/inexistent_conf_file_list.phpt @@ -7,9 +7,9 @@ sp.configuration_file={PWD}/../../config/default.rules,{PWD}/non_existent_config --FILE-- --EXPECTF-- -PHP Fatal error: [snuffleupagus][0.0.0.0][config] Could not open configuration file %a/non_existent_configuration_file : No such file or directory in Unknown on line 0 +PHP Fatal error: [snuffleupagus][0.0.0.0][config][log] Could not open configuration file %a/non_existent_configuration_file : No such file or directory in Unknown on line 0 -Fatal error: [snuffleupagus][0.0.0.0][config] Could not open configuration file %a/non_existent_configuration_file : No such file or directory in Unknown on line 0 +Fatal error: [snuffleupagus][0.0.0.0][config][log] Could not open configuration file %a/non_existent_configuration_file : No such file or directory in Unknown on line 0 -Fatal error: [snuffleupagus][0.0.0.0][config] Invalid configuration file in Unknown on line 0 +Fatal error: [snuffleupagus][0.0.0.0][config][log] Invalid configuration file in Unknown on line 0 Could not startup. \ No newline at end of file diff --git a/src/tests/loading.phpt b/src/tests/loading.phpt index d48703e..761917a 100644 --- a/src/tests/loading.phpt +++ b/src/tests/loading.phpt @@ -7,5 +7,5 @@ Check for snuffleupagus presence echo "snuffleupagus extension is available"; ?> --EXPECT-- -Fatal error: [snuffleupagus][0.0.0.0][config] Invalid configuration file in Unknown on line 0 +Fatal error: [snuffleupagus][0.0.0.0][config][log] Invalid configuration file in Unknown on line 0 Could not startup. diff --git a/src/tests/multi_config.phpt b/src/tests/multi_config.phpt index 558d9a1..dfb9615 100644 --- a/src/tests/multi_config.phpt +++ b/src/tests/multi_config.phpt @@ -16,8 +16,8 @@ foo(); bla(); ?> --EXPECTF-- -Warning: [snuffleupagus][0.0.0.0][disabled_function] Aborted execution on call of the function 'foo' in %a/multi_config.php on line 3 +Warning: [snuffleupagus][0.0.0.0][disabled_function][simulation] Aborted execution on call of the function 'foo' in %a/multi_config.php on line 3 1 -Warning: [snuffleupagus][0.0.0.0][disabled_function] Aborted execution on call of the function 'bla' in %a/multi_config.php on line 6 +Warning: [snuffleupagus][0.0.0.0][disabled_function][simulation] Aborted execution on call of the function 'bla' in %a/multi_config.php on line 6 2 \ No newline at end of file diff --git a/src/tests/session_encryption/crypt_session_corrupted_session.phpt b/src/tests/session_encryption/crypt_session_corrupted_session.phpt index 2c4f085..e139115 100644 --- a/src/tests/session_encryption/crypt_session_corrupted_session.phpt +++ b/src/tests/session_encryption/crypt_session_corrupted_session.phpt @@ -27,4 +27,4 @@ session_start(); var_dump($_SESSION); ?> --EXPECTF-- -Fatal error: [snuffleupagus][127.0.0.1][cookie_encryption] Buffer underflow tentative detected in cookie encryption handling in %s/crypt_session_corrupted_session.php on line %s +Fatal error: [snuffleupagus][127.0.0.1][cookie_encryption][drop] Buffer underflow tentative detected in cookie encryption handling in %s/crypt_session_corrupted_session.php on line %s diff --git a/src/tests/session_encryption/crypt_session_invalid.phpt b/src/tests/session_encryption/crypt_session_invalid.phpt index 9d9a88a..69e7e72 100644 --- a/src/tests/session_encryption/crypt_session_invalid.phpt +++ b/src/tests/session_encryption/crypt_session_invalid.phpt @@ -21,4 +21,4 @@ session_start(); // Re start the session, It will read and decrypt the non em var_dump($_SESSION); // Dump the session ?> --EXPECTF-- -Warning: [snuffleupagus][127.0.0.2][cookie_encryption] Something went wrong with the decryption of the session in %s/crypt_session_invalid.php on line %d +Warning: [snuffleupagus][127.0.0.2][cookie_encryption][log] Something went wrong with the decryption of the session in %s/crypt_session_invalid.php on line %d diff --git a/src/tests/unserialize/dump_unserialize.phpt b/src/tests/unserialize/dump_unserialize.phpt index d07fcbe..6a61297 100644 --- a/src/tests/unserialize/dump_unserialize.phpt +++ b/src/tests/unserialize/dump_unserialize.phpt @@ -36,4 +36,4 @@ if ($res[2] != "GET:get_a='data_get_a' get_b='data_get_b' \n") { --EXPECTF-- 1 -Fatal error: [snuffleupagus][0.0.0.0][unserialize] Invalid HMAC for s:1:"a";alyualskdufyhalkdjsfh in %a/dump_unserialize.php on line 8 +Fatal error: [snuffleupagus][0.0.0.0][unserialize][drop] Invalid HMAC for s:1:"a";alyualskdufyhalkdjsfh in %a/dump_unserialize.php on line 8 diff --git a/src/tests/unserialize/unserialize_fail.phpt b/src/tests/unserialize/unserialize_fail.phpt index 5e7912c..88dabda 100644 --- a/src/tests/unserialize/unserialize_fail.phpt +++ b/src/tests/unserialize/unserialize_fail.phpt @@ -12,4 +12,4 @@ var_dump(unserialize('s:1:"a";dslfjklfjfkjfdjffjfjads')); var_dump(unserialize(1,2,3,4)); ?> --EXPECTF-- -Fatal error: [snuffleupagus][0.0.0.0][unserialize] The serialized object is too small. in %a/unserialize_fail.php on line 2 \ No newline at end of file +Fatal error: [snuffleupagus][0.0.0.0][unserialize][drop] The serialized object is too small. in %a/unserialize_fail.php on line 2 \ No newline at end of file diff --git a/src/tests/unserialize/unserialize_sim.phpt b/src/tests/unserialize/unserialize_sim.phpt index cbc02a4..9bff2c1 100644 --- a/src/tests/unserialize/unserialize_sim.phpt +++ b/src/tests/unserialize/unserialize_sim.phpt @@ -14,5 +14,5 @@ var_dump(unserialize('s:1:"a";alyualskdufyhalkdjsfhalkjdhflaksjdfhlkasdhflkahdaw --EXPECTF-- s:1:"a";650609b417904d0d9bbf1fc44a975d13ecdf6b02b715c1a06271fb3b673f25b1string(1) "a" -Warning: [snuffleupagus][0.0.0.0][unserialize] Invalid HMAC for s:1:"a";alyualskdufyhalkdjsfh in %a/unserialize_sim.php on line 5 +Warning: [snuffleupagus][0.0.0.0][unserialize][simulation] Invalid HMAC for s:1:"a";alyualskdufyhalkdjsfh in %a/unserialize_sim.php on line 5 string(1) "a" diff --git a/src/tests/upload_validation/upload_validation.phpt b/src/tests/upload_validation/upload_validation.phpt index 4a45771..965d3aa 100644 --- a/src/tests/upload_validation/upload_validation.phpt +++ b/src/tests/upload_validation/upload_validation.phpt @@ -13,6 +13,6 @@ Content-Disposition: form-data; name="test"; filename="test.php" echo 1; ?> --EXPECTF-- -Fatal error: [snuffleupagus][0.0.0.0][config] Invalid configuration file in Unknown on line 0 +Fatal error: [snuffleupagus][0.0.0.0][config][log] Invalid configuration file in Unknown on line 0 -Fatal error: [snuffleupagus][0.0.0.0][config] A rule can't be enabled and disabled on line 1 in Unknown on line 0 +Fatal error: [snuffleupagus][0.0.0.0][config][log] A rule can't be enabled and disabled on line 1 in Unknown on line 0 diff --git a/src/tests/upload_validation/upload_validation_invalid.phpt b/src/tests/upload_validation/upload_validation_invalid.phpt index 5d64f57..242bcee 100644 --- a/src/tests/upload_validation/upload_validation_invalid.phpt +++ b/src/tests/upload_validation/upload_validation_invalid.phpt @@ -13,9 +13,9 @@ Content-Disposition: form-data; name="test"; filename="test.php" echo 1; ?> --EXPECTF-- -Warning: [snuffleupagus][0.0.0.0][upload_validation] Could not call './tests/data/upload_invalid.sh' : Exec format error in Unknown on line 0 +Warning: [snuffleupagus][0.0.0.0][upload_validation][log] Could not call './tests/data/upload_invalid.sh' : Exec format error in Unknown on line 0 X-Powered-By: PHP/%a Content-type: text/html; charset=UTF-8%a %a -Fatal error: [snuffleupagus][0.0.0.0][upload_validation] The upload of test.php on ? was rejected. in Unknown on line 0 +Fatal error: [snuffleupagus][0.0.0.0][upload_validation][drop] The upload of test.php on ? was rejected. in Unknown on line 0 diff --git a/src/tests/upload_validation/upload_validation_ko.phpt b/src/tests/upload_validation/upload_validation_ko.phpt index 54f384a..0877861 100644 --- a/src/tests/upload_validation/upload_validation_ko.phpt +++ b/src/tests/upload_validation/upload_validation_ko.phpt @@ -11,4 +11,4 @@ Content-Disposition: form-data; name="test"; filename="test.php" --blabla-- --FILE-- --EXPECTF-- -Fatal error: [snuffleupagus][0.0.0.0][upload_validation] The upload of test.php on ? was rejected. in Unknown on line 0 \ No newline at end of file +Fatal error: [snuffleupagus][0.0.0.0][upload_validation][drop] The upload of test.php on ? was rejected. in Unknown on line 0 \ No newline at end of file diff --git a/src/tests/upload_validation/upload_validation_ko_simulation.phpt b/src/tests/upload_validation/upload_validation_ko_simulation.phpt index 553874c..a099641 100644 --- a/src/tests/upload_validation/upload_validation_ko_simulation.phpt +++ b/src/tests/upload_validation/upload_validation_ko_simulation.phpt @@ -12,5 +12,5 @@ Content-Disposition: form-data; name="test"; filename="test.php" --FILE-- --EXPECTF-- -Warning: [snuffleupagus][0.0.0.0][upload_validation] The upload of test.php on ? was rejected. in Unknown on line 0 +Warning: [snuffleupagus][0.0.0.0][upload_validation][simulation] The upload of test.php on ? was rejected. in Unknown on line 0 1337 \ No newline at end of file diff --git a/src/tests/upload_validation/upload_validation_no_exec.phpt b/src/tests/upload_validation/upload_validation_no_exec.phpt index cf935fd..b198bda 100644 --- a/src/tests/upload_validation/upload_validation_no_exec.phpt +++ b/src/tests/upload_validation/upload_validation_no_exec.phpt @@ -14,6 +14,6 @@ Content-Disposition: form-data; name="test"; filename="test.php" var_dump($_FILES); ?> --EXPECTF-- -Fatal error: [snuffleupagus][0.0.0.0][config] Invalid configuration file in Unknown on line 0 +Fatal error: [snuffleupagus][0.0.0.0][config][log] Invalid configuration file in Unknown on line 0 -Fatal error: [snuffleupagus][0.0.0.0][config] The `script` (tests/data/upload_no_exec.sh) isn't executable on line 1 in Unknown on line 0 +Fatal error: [snuffleupagus][0.0.0.0][config][log] The `script` (tests/data/upload_no_exec.sh) isn't executable on line 1 in Unknown on line 0 diff --git a/src/tests/upload_validation/upload_validation_real.phpt b/src/tests/upload_validation/upload_validation_real.phpt index 47df3d1..7419209 100644 --- a/src/tests/upload_validation/upload_validation_real.phpt +++ b/src/tests/upload_validation/upload_validation_real.phpt @@ -41,4 +41,4 @@ Some random text again echo 1; ?> --EXPECTF-- -Fatal error: [snuffleupagus][0.0.0.0][upload_validation] The upload of test.php on ? was rejected. in Unknown on line 0 +Fatal error: [snuffleupagus][0.0.0.0][upload_validation][drop] The upload of test.php on ? was rejected. in Unknown on line 0 -- cgit v1.3 From 5a655dda1c3b666adf552fd50f5ebf5f4cbd3ce7 Mon Sep 17 00:00:00 2001 From: Giovanni Dante Grazioli Date: Tue, 21 Jul 2020 15:51:02 +0200 Subject: Fixed issue on impossible bailout. --- src/sp_utils.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'src') diff --git a/src/sp_utils.c b/src/sp_utils.c index b9078b4..146fe77 100644 --- a/src/sp_utils.c +++ b/src/sp_utils.c @@ -51,6 +51,7 @@ void sp_log_msg(char const* restrict feature, int type, const char* client_ip = get_ipaddr(); const char* logtype = NULL; + int bailout = type == SP_LOG_DROP; switch(type) { case SP_LOG_SIMULATION: logtype = "simulation"; @@ -74,7 +75,7 @@ void sp_log_msg(char const* restrict feature, int type, syslog(syslog_level, "[snuffleupagus][%s][%s][%s] %s in %s on line %d", client_ip, feature, logtype, msg, error_filename, error_lineno); closelog(); - if (type == SP_LOG_DROP) { + if (bailout) { zend_bailout(); } break; -- cgit v1.3 From e8d3cd9b26f0b4d660e424f2657f11bbc01eb171 Mon Sep 17 00:00:00 2001 From: Giovanni Date: Wed, 22 Jul 2020 09:28:42 +0200 Subject: refactoring sp_log_* (#340) Co-authored-by: Giovanni Dante Grazioli --- src/sp_crypt.c | 22 +++++++++++----------- src/sp_disabled_functions.c | 4 ++-- src/sp_execute.c | 12 ++++++------ src/sp_unserialize.c | 9 +++------ src/sp_upload_validation.c | 8 ++++---- src/sp_utils.c | 30 ++++++++++++++---------------- src/sp_utils.h | 21 +++++++++++++++------ 7 files changed, 55 insertions(+), 51 deletions(-) (limited to 'src') diff --git a/src/sp_crypt.c b/src/sp_crypt.c index 42c1510..b353ebe 100644 --- a/src/sp_crypt.c +++ b/src/sp_crypt.c @@ -49,16 +49,16 @@ int decrypt_zval(zval *pDest, bool simulation, zend_hash_key *hash_key) { if (ZSTR_LEN(debase64) < crypto_secretbox_NONCEBYTES) { if (true == simulation) { - sp_log_msg( - "cookie_encryption", SP_LOG_SIMULATION, + sp_log_simulation( + "cookie_encryption", "Buffer underflow tentative detected in cookie encryption handling " "for %s. Using the cookie 'as it' instead of decrypting it", hash_key ? ZSTR_VAL(hash_key->key) : "the session"); return ZEND_HASH_APPLY_KEEP; } else { // LCOV_EXCL_START - sp_log_msg( - "cookie_encryption", SP_LOG_DROP, + sp_log_drop( + "cookie_encryption", "Buffer underflow tentative detected in cookie encryption handling"); return ZEND_HASH_APPLY_REMOVE; // LCOV_EXCL_STOP @@ -69,15 +69,15 @@ int decrypt_zval(zval *pDest, bool simulation, zend_hash_key *hash_key) { if (ZSTR_LEN(debase64) + (size_t)crypto_secretbox_ZEROBYTES < ZSTR_LEN(debase64)) { if (true == simulation) { - sp_log_msg( - "cookie_encryption", SP_LOG_SIMULATION, + sp_log_simulation( + "cookie_encryption", "Integer overflow tentative detected in cookie encryption handling " "for %s. Using the cookie 'as it' instead of decrypting it.", hash_key ? ZSTR_VAL(hash_key->key) : "the session"); return ZEND_HASH_APPLY_KEEP; } else { - sp_log_msg( - "cookie_encryption", SP_LOG_DROP, + sp_log_drop( + "cookie_encryption", "Integer overflow tentative detected in cookie encryption handling."); return ZEND_HASH_APPLY_REMOVE; } @@ -98,8 +98,8 @@ int decrypt_zval(zval *pDest, bool simulation, zend_hash_key *hash_key) { if (-1 == ret) { if (true == simulation) { - sp_log_msg( - "cookie_encryption", SP_LOG_SIMULATION, + sp_log_simulation( + "cookie_encryption", "Something went wrong with the decryption of %s. Using the cookie " "'as it' instead of decrypting it", hash_key ? ZSTR_VAL(hash_key->key) : "the session"); @@ -107,7 +107,7 @@ int decrypt_zval(zval *pDest, bool simulation, zend_hash_key *hash_key) { efree(backup); return ZEND_HASH_APPLY_KEEP; } else { - sp_log_msg("cookie_encryption", SP_LOG_WARN, + sp_log_warn("cookie_encryption", "Something went wrong with the decryption of %s", hash_key ? ZSTR_VAL(hash_key->key) : "the session"); efree(backup); diff --git a/src/sp_disabled_functions.c b/src/sp_disabled_functions.c index f35f5ca..a7136df 100644 --- a/src/sp_disabled_functions.c +++ b/src/sp_disabled_functions.c @@ -574,11 +574,11 @@ ZEND_FUNCTION(eval_blacklist_callback) { SP_TOKEN_EVAL_BLACKLIST); } if (config_eval->simulation) { - sp_log_msg("eval", SP_LOG_SIMULATION, + sp_log_simulation("eval", "A call to %s was tried in eval, in %s:%d, logging it.", current_function_name, ZSTR_VAL(filename), line_number); } else { - sp_log_msg("eval", SP_LOG_DROP, + sp_log_drop("eval", "A call to %s was tried in eval, in %s:%d, dropping it.", current_function_name, ZSTR_VAL(filename), line_number); } diff --git a/src/sp_execute.c b/src/sp_execute.c index 4eae874..73cc560 100644 --- a/src/sp_execute.c +++ b/src/sp_execute.c @@ -18,10 +18,10 @@ ZEND_COLD static inline void terminate_if_writable(const char *filename) { SP_TOKEN_READONLY_EXEC); } if (true == config_ro_exec->simulation) { - sp_log_msg("readonly_exec", SP_LOG_SIMULATION, + sp_log_simulation("readonly_exec", "Attempted execution of a writable file (%s).", filename); } else { - sp_log_msg("readonly_exec", SP_LOG_DROP, + sp_log_drop("readonly_exec", "Attempted execution of a writable file (%s).", filename); zend_bailout(); } @@ -79,14 +79,14 @@ is_in_eval_and_whitelisted(const zend_execute_data *execute_data) { SP_TOKEN_EVAL_WHITELIST); } if (config_eval->simulation) { - sp_log_msg( - "Eval_whitelist", SP_LOG_SIMULATION, + sp_log_simulation( + "Eval_whitelist", "The function '%s' isn't in the eval whitelist, logging its call.", ZSTR_VAL(current_function)); return; } else { - sp_log_msg( - "Eval_whitelist", SP_LOG_DROP, + sp_log_drop( + "Eval_whitelist", "The function '%s' isn't in the eval whitelist, dropping its call.", ZSTR_VAL(current_function)); } diff --git a/src/sp_unserialize.c b/src/sp_unserialize.c index 29706c9..8977dd9 100644 --- a/src/sp_unserialize.c +++ b/src/sp_unserialize.c @@ -61,8 +61,7 @@ PHP_FUNCTION(sp_unserialize) { /* 64 is the length of HMAC-256 */ if (buf_len < 64) { - sp_log_msg("unserialize", SP_LOG_DROP, - "The serialized object is too small."); + sp_log_drop("unserialize", "The serialized object is too small."); } hmac = buf + buf_len - 64; @@ -99,16 +98,14 @@ PHP_FUNCTION(sp_unserialize) { SP_TOKEN_UNSERIALIZE_HMAC); } if (true == config_unserialize->simulation) { - sp_log_msg("unserialize", SP_LOG_SIMULATION, "Invalid HMAC for %s", - serialized_str); + sp_log_simulation("unserialize", "Invalid HMAC for %s", serialized_str); if ((orig_handler = zend_hash_str_find_ptr( SNUFFLEUPAGUS_G(sp_internal_functions_hook), "unserialize", sizeof("unserialize") - 1))) { orig_handler(INTERNAL_FUNCTION_PARAM_PASSTHRU); } } else { - sp_log_msg("unserialize", SP_LOG_DROP, "Invalid HMAC for %s", - serialized_str); + sp_log_drop("unserialize", "Invalid HMAC for %s", serialized_str); } } efree(serialized_str); diff --git a/src/sp_upload_validation.c b/src/sp_upload_validation.c index 54b0481..4ee7bd7 100644 --- a/src/sp_upload_validation.c +++ b/src/sp_upload_validation.c @@ -13,7 +13,7 @@ int sp_rfc1867_callback(unsigned int event, void *event_data, void **extra); int sp_rfc1867_callback_win(unsigned int event, void *event_data, void **extra) { - sp_log_msg("upload_validation", SP_LOG_SIMULATION, + sp_log_simulation("upload_validation", "The upload validation doesn't work for now on Windows yet, " "see https://github.com/jvoisin/snuffleupagus/issues/248 for " "details."); @@ -90,9 +90,9 @@ int sp_rfc1867_callback(unsigned int event, void *event_data, void **extra) { if (WEXITSTATUS(waitstatus) != 0) { // Nope char *uri = getenv("REQUEST_URI"); int sim = config_upload->simulation; - sp_log_msg("upload_validation", sim ? SP_LOG_SIMULATION : SP_LOG_DROP, - "The upload of %s on %s was rejected.", filename, - uri ? uri : "?"); + sp_log_auto("upload_validation", sim, + "The upload of %s on %s was rejected.", + filename, uri ? uri : "?"); } } ZEND_HASH_FOREACH_END(); diff --git a/src/sp_utils.c b/src/sp_utils.c index 146fe77..8032e0a 100644 --- a/src/sp_utils.c +++ b/src/sp_utils.c @@ -40,7 +40,7 @@ const char* get_ipaddr() { return default_ipaddr; } -void sp_log_msg(char const* restrict feature, int type, +void sp_log_msgf(char const* restrict feature, int level, int type, const char* restrict fmt, ...) { char* msg; va_list args; @@ -51,16 +51,14 @@ void sp_log_msg(char const* restrict feature, int type, const char* client_ip = get_ipaddr(); const char* logtype = NULL; - int bailout = type == SP_LOG_DROP; switch(type) { - case SP_LOG_SIMULATION: + case SP_TYPE_SIMULATION: logtype = "simulation"; - type = E_WARNING; break; - case SP_LOG_DROP: + case SP_TYPE_DROP: logtype = "drop"; - type = E_ERROR; break; + case SP_TYPE_LOG: default: logtype = "log"; break; @@ -69,20 +67,20 @@ void sp_log_msg(char const* restrict feature, int type, switch (SNUFFLEUPAGUS_G(config).log_media) { case SP_SYSLOG: { const char* error_filename = zend_get_executed_filename(); - int syslog_level = (type == E_ERROR) ? LOG_ERR : LOG_INFO; + int syslog_level = (level == E_ERROR) ? LOG_ERR : LOG_INFO; int error_lineno = zend_get_executed_lineno(TSRMLS_C); openlog(PHP_SNUFFLEUPAGUS_EXTNAME, LOG_PID, LOG_AUTH); syslog(syslog_level, "[snuffleupagus][%s][%s][%s] %s in %s on line %d", client_ip, feature, logtype, msg, error_filename, error_lineno); closelog(); - if (bailout) { + if (type == SP_TYPE_DROP) { zend_bailout(); } break; } case SP_ZEND: default: - zend_error(type, "[snuffleupagus][%s][%s][%s] %s", client_ip, feature, logtype, msg); + zend_error(level, "[snuffleupagus][%s][%s][%s] %s", client_ip, feature, logtype, msg); break; } } @@ -282,12 +280,12 @@ void sp_log_disable(const char* restrict path, const char* restrict arg_name, char_repr = zend_string_to_char(arg_value); } if (alias) { - sp_log_msg("disabled_function", sim ? SP_LOG_SIMULATION : SP_LOG_DROP, + sp_log_auto("disabled_function", sim, "Aborted execution on call of the function '%s', " "because its argument '%s' content (%s) matched the rule '%s'", path, arg_name, char_repr ? char_repr : "?", ZSTR_VAL(alias)); } else { - sp_log_msg("disabled_function", sim ? SP_LOG_SIMULATION : SP_LOG_DROP, + sp_log_auto("disabled_function", sim, "Aborted execution on call of the function '%s', " "because its argument '%s' content (%s) matched a rule", path, arg_name, char_repr ? char_repr : "?"); @@ -295,12 +293,12 @@ void sp_log_disable(const char* restrict path, const char* restrict arg_name, efree(char_repr); } else { if (alias) { - sp_log_msg("disabled_function", sim ? SP_LOG_SIMULATION : SP_LOG_DROP, + sp_log_auto("disabled_function", sim, "Aborted execution on call of the function '%s', " "because of the the rule '%s'", path, ZSTR_VAL(alias)); } else { - sp_log_msg("disabled_function", sim ? SP_LOG_SIMULATION : SP_LOG_DROP, + sp_log_auto("disabled_function", sim, "Aborted execution on call of the function '%s'", path); } } @@ -322,13 +320,13 @@ void sp_log_disable_ret(const char* restrict path, char_repr = zend_string_to_char(ret_value); } if (alias) { - sp_log_msg( - "disabled_function", sim ? SP_LOG_SIMULATION : SP_LOG_DROP, + sp_log_auto( + "disabled_function", sim, "Aborted execution on return of the function '%s', " "because the function returned '%s', which matched the rule '%s'", path, char_repr ? char_repr : "?", ZSTR_VAL(alias)); } else { - sp_log_msg("disabled_function", sim ? SP_LOG_SIMULATION : SP_LOG_DROP, + sp_log_auto("disabled_function", sim, "Aborted execution on return of the function '%s', " "because the function returned '%s', which matched a rule", path, char_repr ? char_repr : "?"); diff --git a/src/sp_utils.h b/src/sp_utils.h index 91a5a20..744bbff 100644 --- a/src/sp_utils.h +++ b/src/sp_utils.h @@ -28,16 +28,25 @@ #define HOOK_FUNCTION_BY_REGEXP(regexp, hook_table, new_function) \ hook_regexp(regexp, SNUFFLEUPAGUS_G(hook_table), new_function) -#define SP_LOG_SIMULATION 0x100000 -#define SP_LOG_DROP 0x200000 +#define SP_TYPE_LOG (0) +#define SP_TYPE_DROP (1) +#define SP_TYPE_SIMULATION (2) + #define SP_LOG_DEBUG E_NOTICE #define SP_LOG_ERROR E_ERROR #define SP_LOG_WARN E_WARNING -#define sp_log_err(feature, ...) sp_log_msg(feature, SP_LOG_ERROR, __VA_ARGS__) -#define sp_log_warn(feature, ...) sp_log_msg(feature, SP_LOG_WARN, __VA_ARGS__) +#define sp_log_msg(feature, level, ...) sp_log_msgf(feature, level, SP_TYPE_LOG, __VA_ARGS__) +#define sp_log_drop(feature, ...) sp_log_msgf(feature, SP_LOG_ERROR, SP_TYPE_DROP, __VA_ARGS__) +#define sp_log_simulation(feature, ...) sp_log_msgf(feature, SP_LOG_WARN, SP_TYPE_SIMULATION, __VA_ARGS__) +#define sp_log_auto(feature, is_simulation, ...) sp_log_msgf(feature, \ + (is_simulation ? SP_LOG_WARN : SP_LOG_ERROR), \ + (is_simulation ? SP_TYPE_SIMULATION : SP_TYPE_DROP), __VA_ARGS__) + +#define sp_log_err(feature, ...) sp_log_msgf(feature, SP_LOG_ERROR, SP_TYPE_LOG, __VA_ARGS__) +#define sp_log_warn(feature, ...) sp_log_msgf(feature, SP_LOG_WARN, SP_TYPE_LOG, __VA_ARGS__) #ifdef SP_DEBUG -#define sp_log_debug(...) sp_log_msg("DEBUG", SP_LOG_DEBUG, __VA_ARGS__) +#define sp_log_debug(...) sp_log_msgf("DEBUG", SP_LOG_DEBUG, SP_TYPE_LOG, __VA_ARGS__) #else #define sp_log_debug(...) #endif @@ -45,7 +54,7 @@ #define GET_SUFFIX(x) (x == 1) ? "st" : ((x == 2) ? "nd" : "th") const char *get_ipaddr(); -void sp_log_msg(char const *restrict feature, int type, +void sp_log_msgf(char const *restrict feature, int level, int type, const char *restrict fmt, ...); int compute_hash(const char *const restrict filename, char *restrict file_hash); const zend_string *sp_zval_to_zend_string(const zval *); -- cgit v1.3 From 71721a0c54c8932a9c7a396e0cbe5d7e19f040e9 Mon Sep 17 00:00:00 2001 From: jvoisin Date: Wed, 5 Aug 2020 20:02:09 +0200 Subject: Add a test for the syslog output of the logs --- src/tests/config/syslog.ini | 3 +++ src/tests/syslog.phpt | 11 +++++++++++ 2 files changed, 14 insertions(+) create mode 100644 src/tests/config/syslog.ini create mode 100644 src/tests/syslog.phpt (limited to 'src') diff --git a/src/tests/config/syslog.ini b/src/tests/config/syslog.ini new file mode 100644 index 0000000..17dce05 --- /dev/null +++ b/src/tests/config/syslog.ini @@ -0,0 +1,3 @@ +sp.global.secret_key("abcdef"); +sp.unserialize_hmac.enable(); +sp.log_media("syslog"); diff --git a/src/tests/syslog.phpt b/src/tests/syslog.phpt new file mode 100644 index 0000000..5585677 --- /dev/null +++ b/src/tests/syslog.phpt @@ -0,0 +1,11 @@ +--TEST-- +Check the syslog output +--SKIPIF-- + +--INI-- +sp.configuration_file={PWD}/config/syslog.ini +--FILE-- + +--EXPECTF-- -- cgit v1.3 From f3360c4de72b6735bc5f5873dd671c2e56292ce6 Mon Sep 17 00:00:00 2001 From: jvoisin Date: Fri, 7 Aug 2020 16:09:36 +0200 Subject: Move an include --- src/php_snuffleupagus.h | 4 ++++ src/snuffleupagus.c | 4 ---- 2 files changed, 4 insertions(+), 4 deletions(-) (limited to 'src') diff --git a/src/php_snuffleupagus.h b/src/php_snuffleupagus.h index b42c300..0849d36 100644 --- a/src/php_snuffleupagus.h +++ b/src/php_snuffleupagus.h @@ -7,6 +7,10 @@ #define PHP_SNUFFLEUPAGUS_URL "https://github.com/jvoisin/snuffleupagus" #define PHP_SNUFFLEUPAGUS_COPYRIGHT "LGPLv2" +#ifdef HAVE_CONFIG_H +#include "config.h" +#endif + #include #include #include diff --git a/src/snuffleupagus.c b/src/snuffleupagus.c index ff2d2b6..d62069c 100644 --- a/src/snuffleupagus.c +++ b/src/snuffleupagus.c @@ -4,10 +4,6 @@ #include #endif -#ifdef HAVE_CONFIG_H -#include "config.h" -#endif - #include "php_snuffleupagus.h" #ifndef ZEND_EXT_API -- cgit v1.3 From a0d21a189cf04bb963dce93dcbd0bd9694584a0b Mon Sep 17 00:00:00 2001 From: jvoisin Date: Wed, 12 Aug 2020 08:48:59 +0000 Subject: Allow empty configuration (#342) This commit allows php to run (with a warning) if there is no specified snuffleupagus configuration, instead of refusing to start.--- src/php_snuffleupagus.h | 6 +++- src/snuffleupagus.c | 34 ++++++++++++++------ src/sp_crypt.c | 4 +-- src/sp_disabled_functions.c | 8 ++--- src/sp_execute.c | 5 +-- src/sp_upload_validation.c | 13 ++++---- src/sp_utils.c | 36 ++++++++++++---------- .../broken_conf_no_file_specified.phpt | 4 +-- src/tests/loading.phpt | 4 +-- 9 files changed, 69 insertions(+), 45 deletions(-) (limited to 'src') diff --git a/src/php_snuffleupagus.h b/src/php_snuffleupagus.h index 0849d36..6b0e210 100644 --- a/src/php_snuffleupagus.h +++ b/src/php_snuffleupagus.h @@ -62,6 +62,10 @@ typedef void (*zif_handler)(INTERNAL_FUNCTION_PARAMETERS); #define TSRMLS_C #endif +#define SP_CONFIG_VALID 1 +#define SP_CONFIG_INVALID 0 +#define SP_CONFIG_NONE -1 + #include "sp_pcre_compat.h" #include "sp_list.h" #include "sp_tree.h" @@ -101,7 +105,7 @@ extern zend_module_entry snuffleupagus_module_entry; ZEND_BEGIN_MODULE_GLOBALS(snuffleupagus) size_t in_eval; sp_config config; -bool is_config_valid; +int is_config_valid; // 1 = valid, 0 = invalid, -1 = none bool allow_broken_configuration; HashTable *disabled_functions_hook; HashTable *sp_internal_functions_hook; diff --git a/src/snuffleupagus.c b/src/snuffleupagus.c index d62069c..7c69150 100644 --- a/src/snuffleupagus.c +++ b/src/snuffleupagus.c @@ -68,6 +68,7 @@ ZEND_DLEXPORT zend_extension zend_extension_entry = { STANDARD_ZEND_EXTENSION_PROPERTIES}; PHP_GINIT_FUNCTION(snuffleupagus) { + snuffleupagus_globals->is_config_valid = SP_CONFIG_NONE; snuffleupagus_globals->in_eval = 0; #define SP_INIT_HT(F) snuffleupagus_globals->F = \ @@ -186,8 +187,12 @@ PHP_RINIT_FUNCTION(snuffleupagus) { ZEND_TSRMLS_CACHE_UPDATE(); #endif - if (!SNUFFLEUPAGUS_G(allow_broken_configuration) && !SNUFFLEUPAGUS_G(is_config_valid)) { - sp_log_err("config", "Invalid configuration file"); + if (!SNUFFLEUPAGUS_G(allow_broken_configuration)) { + if (SNUFFLEUPAGUS_G(is_config_valid) == SP_CONFIG_INVALID ) { + sp_log_err("config", "Invalid configuration file"); + } else if (SNUFFLEUPAGUS_G(is_config_valid) == SP_CONFIG_NONE) { + sp_log_warn("config", "No configuration specificed via sp.configuration_file"); + } } // We need to disable wrappers loaded by extensions loaded after SNUFFLEUPAGUS. @@ -209,12 +214,23 @@ PHP_RINIT_FUNCTION(snuffleupagus) { PHP_RSHUTDOWN_FUNCTION(snuffleupagus) { return SUCCESS; } PHP_MINFO_FUNCTION(snuffleupagus) { + const char *valid_config; + switch(SNUFFLEUPAGUS_G(is_config_valid)) { + case SP_CONFIG_VALID: + valid_config = "yes"; + break; + case SP_CONFIG_INVALID: + valid_config = "invalid"; + break; + case SP_CONFIG_NONE: + default: + valid_config = "no"; + } php_info_print_table_start(); - php_info_print_table_row(2, "snuffleupagus support", "enabled"); + php_info_print_table_row(2, "snuffleupagus support", + SNUFFLEUPAGUS_G(is_config_valid)?"enabled":"disabled"); php_info_print_table_row(2, "Version", PHP_SNUFFLEUPAGUS_VERSION); - php_info_print_table_row( - 2, "Valid config", - (SNUFFLEUPAGUS_G(is_config_valid) == true) ? "yes" : "no"); + php_info_print_table_row( 2, "Valid config", valid_config); php_info_print_table_end(); DISPLAY_INI_ENTRIES(); } @@ -234,14 +250,14 @@ static PHP_INI_MH(OnUpdateConfiguration) { int ret = glob(config_file, GLOB_NOCHECK, NULL, &globbuf); if (ret != 0) { - SNUFFLEUPAGUS_G(is_config_valid) = false; + SNUFFLEUPAGUS_G(is_config_valid) = SP_CONFIG_INVALID; globfree(&globbuf); return FAILURE; } for (size_t i = 0; globbuf.gl_pathv[i]; i++) { if (sp_parse_config(globbuf.gl_pathv[i]) != SUCCESS) { - SNUFFLEUPAGUS_G(is_config_valid) = false; + SNUFFLEUPAGUS_G(is_config_valid) = SP_CONFIG_INVALID; globfree(&globbuf); return FAILURE; } @@ -249,7 +265,7 @@ static PHP_INI_MH(OnUpdateConfiguration) { globfree(&globbuf); } - SNUFFLEUPAGUS_G(is_config_valid) = true; + SNUFFLEUPAGUS_G(is_config_valid) = SP_CONFIG_VALID; if ((SNUFFLEUPAGUS_G(config).config_sloppy->enable)) { hook_sloppy(); diff --git a/src/sp_crypt.c b/src/sp_crypt.c index b353ebe..c57ac0b 100644 --- a/src/sp_crypt.c +++ b/src/sp_crypt.c @@ -108,8 +108,8 @@ int decrypt_zval(zval *pDest, bool simulation, zend_hash_key *hash_key) { return ZEND_HASH_APPLY_KEEP; } else { sp_log_warn("cookie_encryption", - "Something went wrong with the decryption of %s", - hash_key ? ZSTR_VAL(hash_key->key) : "the session"); + "Something went wrong with the decryption of %s", + hash_key ? ZSTR_VAL(hash_key->key) : "the session"); efree(backup); return ZEND_HASH_APPLY_REMOVE; } diff --git a/src/sp_disabled_functions.c b/src/sp_disabled_functions.c index a7136df..7be1c34 100644 --- a/src/sp_disabled_functions.c +++ b/src/sp_disabled_functions.c @@ -575,12 +575,12 @@ ZEND_FUNCTION(eval_blacklist_callback) { } if (config_eval->simulation) { sp_log_simulation("eval", - "A call to %s was tried in eval, in %s:%d, logging it.", - current_function_name, ZSTR_VAL(filename), line_number); + "A call to %s was tried in eval, in %s:%d, logging it.", + current_function_name, ZSTR_VAL(filename), line_number); } else { sp_log_drop("eval", - "A call to %s was tried in eval, in %s:%d, dropping it.", - current_function_name, ZSTR_VAL(filename), line_number); + "A call to %s was tried in eval, in %s:%d, dropping it.", + current_function_name, ZSTR_VAL(filename), line_number); } efree(filename); } diff --git a/src/sp_execute.c b/src/sp_execute.c index 73cc560..140e227 100644 --- a/src/sp_execute.c +++ b/src/sp_execute.c @@ -19,10 +19,11 @@ ZEND_COLD static inline void terminate_if_writable(const char *filename) { } if (true == config_ro_exec->simulation) { sp_log_simulation("readonly_exec", - "Attempted execution of a writable file (%s).", filename); + "Attempted execution of a writable file (%s).", + filename); } else { sp_log_drop("readonly_exec", - "Attempted execution of a writable file (%s).", filename); + "Attempted execution of a writable file (%s).", filename); zend_bailout(); } } else { diff --git a/src/sp_upload_validation.c b/src/sp_upload_validation.c index 4ee7bd7..f3ae311 100644 --- a/src/sp_upload_validation.c +++ b/src/sp_upload_validation.c @@ -13,10 +13,11 @@ int sp_rfc1867_callback(unsigned int event, void *event_data, void **extra); int sp_rfc1867_callback_win(unsigned int event, void *event_data, void **extra) { - sp_log_simulation("upload_validation", - "The upload validation doesn't work for now on Windows yet, " - "see https://github.com/jvoisin/snuffleupagus/issues/248 for " - "details."); + sp_log_simulation( + "upload_validation", + "The upload validation doesn't work for now on Windows yet, " + "see https://github.com/jvoisin/snuffleupagus/issues/248 for " + "details."); return SUCCESS; } @@ -91,8 +92,8 @@ int sp_rfc1867_callback(unsigned int event, void *event_data, void **extra) { char *uri = getenv("REQUEST_URI"); int sim = config_upload->simulation; sp_log_auto("upload_validation", sim, - "The upload of %s on %s was rejected.", - filename, uri ? uri : "?"); + "The upload of %s on %s was rejected.", filename, + uri ? uri : "?"); } } ZEND_HASH_FOREACH_END(); diff --git a/src/sp_utils.c b/src/sp_utils.c index 8032e0a..4c78ce5 100644 --- a/src/sp_utils.c +++ b/src/sp_utils.c @@ -41,7 +41,7 @@ const char* get_ipaddr() { } void sp_log_msgf(char const* restrict feature, int level, int type, - const char* restrict fmt, ...) { + const char* restrict fmt, ...) { char* msg; va_list args; @@ -51,7 +51,7 @@ void sp_log_msgf(char const* restrict feature, int level, int type, const char* client_ip = get_ipaddr(); const char* logtype = NULL; - switch(type) { + switch (type) { case SP_TYPE_SIMULATION: logtype = "simulation"; break; @@ -80,7 +80,8 @@ void sp_log_msgf(char const* restrict feature, int level, int type, } case SP_ZEND: default: - zend_error(level, "[snuffleupagus][%s][%s][%s] %s", client_ip, feature, logtype, msg); + zend_error(level, "[snuffleupagus][%s][%s][%s] %s", client_ip, feature, + logtype, msg); break; } } @@ -280,26 +281,27 @@ void sp_log_disable(const char* restrict path, const char* restrict arg_name, char_repr = zend_string_to_char(arg_value); } if (alias) { - sp_log_auto("disabled_function", sim, - "Aborted execution on call of the function '%s', " - "because its argument '%s' content (%s) matched the rule '%s'", - path, arg_name, char_repr ? char_repr : "?", ZSTR_VAL(alias)); + sp_log_auto( + "disabled_function", sim, + "Aborted execution on call of the function '%s', " + "because its argument '%s' content (%s) matched the rule '%s'", + path, arg_name, char_repr ? char_repr : "?", ZSTR_VAL(alias)); } else { sp_log_auto("disabled_function", sim, - "Aborted execution on call of the function '%s', " - "because its argument '%s' content (%s) matched a rule", - path, arg_name, char_repr ? char_repr : "?"); + "Aborted execution on call of the function '%s', " + "because its argument '%s' content (%s) matched a rule", + path, arg_name, char_repr ? char_repr : "?"); } efree(char_repr); } else { if (alias) { sp_log_auto("disabled_function", sim, - "Aborted execution on call of the function '%s', " - "because of the the rule '%s'", - path, ZSTR_VAL(alias)); + "Aborted execution on call of the function '%s', " + "because of the the rule '%s'", + path, ZSTR_VAL(alias)); } else { sp_log_auto("disabled_function", sim, - "Aborted execution on call of the function '%s'", path); + "Aborted execution on call of the function '%s'", path); } } } @@ -327,9 +329,9 @@ void sp_log_disable_ret(const char* restrict path, path, char_repr ? char_repr : "?", ZSTR_VAL(alias)); } else { sp_log_auto("disabled_function", sim, - "Aborted execution on return of the function '%s', " - "because the function returned '%s', which matched a rule", - path, char_repr ? char_repr : "?"); + "Aborted execution on return of the function '%s', " + "because the function returned '%s', which matched a rule", + path, char_repr ? char_repr : "?"); } efree(char_repr); } diff --git a/src/tests/broken_configuration/broken_conf_no_file_specified.phpt b/src/tests/broken_configuration/broken_conf_no_file_specified.phpt index 8b360d4..cb2d95f 100644 --- a/src/tests/broken_configuration/broken_conf_no_file_specified.phpt +++ b/src/tests/broken_configuration/broken_conf_no_file_specified.phpt @@ -6,5 +6,5 @@ Broken configuration - No configuration file specified --FILE-- --EXPECT-- -Fatal error: [snuffleupagus][0.0.0.0][config][log] Invalid configuration file in Unknown on line 0 -Could not startup. +Warning: [snuffleupagus][0.0.0.0][config][log] No configuration specificed via sp.configuration_file in Unknown on line 0 +1 diff --git a/src/tests/loading.phpt b/src/tests/loading.phpt index 761917a..2514ec5 100644 --- a/src/tests/loading.phpt +++ b/src/tests/loading.phpt @@ -7,5 +7,5 @@ Check for snuffleupagus presence echo "snuffleupagus extension is available"; ?> --EXPECT-- -Fatal error: [snuffleupagus][0.0.0.0][config][log] Invalid configuration file in Unknown on line 0 -Could not startup. +Warning: [snuffleupagus][0.0.0.0][config][log] No configuration specificed via sp.configuration_file in Unknown on line 0 +snuffleupagus extension is available -- cgit v1.3 From eb86001829188731044ca4e95b2cfabf305efa52 Mon Sep 17 00:00:00 2001 From: jvoisin Date: Sun, 16 Aug 2020 12:20:17 +0200 Subject: Add a test for the native logging --- src/tests/config/phplog.ini | 3 +++ src/tests/phplog.phpt | 13 +++++++++++++ 2 files changed, 16 insertions(+) create mode 100644 src/tests/config/phplog.ini create mode 100644 src/tests/phplog.phpt (limited to 'src') diff --git a/src/tests/config/phplog.ini b/src/tests/config/phplog.ini new file mode 100644 index 0000000..4eaa287 --- /dev/null +++ b/src/tests/config/phplog.ini @@ -0,0 +1,3 @@ +sp.global.secret_key("abcdef"); +sp.unserialize_hmac.enable(); +sp.log_media("php"); diff --git a/src/tests/phplog.phpt b/src/tests/phplog.phpt new file mode 100644 index 0000000..9c5600e --- /dev/null +++ b/src/tests/phplog.phpt @@ -0,0 +1,13 @@ +--TEST-- +Check the phplog output +--SKIPIF-- + +--INI-- +sp.configuration_file={PWD}/config/phplog.ini +--FILE-- + +--EXPECTF-- +Fatal error: [snuffleupagus][0.0.0.0][unserialize][drop] The serialized object is too small. in %s/tests/phplog.php on line 2 + -- cgit v1.3 From a59c3622848840f55a22ed91bf782775f43a40a1 Mon Sep 17 00:00:00 2001 From: jvoisin Date: Sun, 16 Aug 2020 13:14:46 +0200 Subject: Remove a useless line of code --- src/sp_execute.c | 1 - 1 file changed, 1 deletion(-) (limited to 'src') diff --git a/src/sp_execute.c b/src/sp_execute.c index 140e227..ab73972 100644 --- a/src/sp_execute.c +++ b/src/sp_execute.c @@ -24,7 +24,6 @@ ZEND_COLD static inline void terminate_if_writable(const char *filename) { } else { sp_log_drop("readonly_exec", "Attempted execution of a writable file (%s).", filename); - zend_bailout(); } } else { if (EACCES != errno) { -- cgit v1.3 From 326c6dbcd66b4911df3ad603ee0ae36b78999189 Mon Sep 17 00:00:00 2001 From: jvoisin Date: Sat, 3 Oct 2020 14:45:50 +0200 Subject: Fix the testsuite for php7.4 --- src/tests/stream_wrapper/stream_wrapper_restore.phpt | 11 ++++++----- 1 file changed, 6 insertions(+), 5 deletions(-) (limited to 'src') diff --git a/src/tests/stream_wrapper/stream_wrapper_restore.phpt b/src/tests/stream_wrapper/stream_wrapper_restore.phpt index b4a29c8..e1e9604 100644 --- a/src/tests/stream_wrapper/stream_wrapper_restore.phpt +++ b/src/tests/stream_wrapper/stream_wrapper_restore.phpt @@ -2,16 +2,17 @@ Stream wrapper --SKIPIF-- += 70400) { die("skip BROKEN with 7.4"); } ?> --INI-- sp.configuration_file={PWD}/config/config_stream_wrapper_register.ini --FILE-- --EXPECTF-- -Notice: stream_wrapper_restore(): file:// was never changed, nothing to restore in %a/stream_wrapper_restore.php on line %d +Notice: stream_wrapper_restore(): stdin:// was never changed, nothing to restore in %a/stream_wrapper_restore.php on line %d -Warning: fopen(): Unable to find the wrapper "file" - did you forget to enable it when you configured PHP? in %a/stream_wrapper_restore.php on line %d +Warning: fopen(): Unable to find the wrapper "stdin" - did you forget to enable it when you configured PHP? in %a/stream_wrapper_restore.php on line %d -Warning: fopen(file://asdasd): failed to open stream: No such file or directory in %a/stream_wrapper_restore.php on line %d +Warning: fopen(stdin://asdasd): failed to open stream: No such file or directory in %a/stream_wrapper_restore.php on line %d -- cgit v1.3 From 69459369754b07d3fa4379c2b60a5f8ba9fcd45d Mon Sep 17 00:00:00 2001 From: jvoisin Date: Fri, 6 Nov 2020 16:51:41 +0100 Subject: Use proper prototype declaration --- src/sp_cookie_encryption.h | 2 +- src/sp_disable_xxe.h | 2 +- src/sp_disabled_functions.h | 2 +- src/sp_harden_rand.h | 2 +- src/sp_session.h | 2 +- src/sp_sloppy.h | 2 +- src/sp_tree.h | 2 +- src/sp_upload_validation.h | 2 +- src/sp_utils.h | 2 +- src/sp_wrapper.h | 4 ++-- 10 files changed, 11 insertions(+), 11 deletions(-) (limited to 'src') diff --git a/src/sp_cookie_encryption.h b/src/sp_cookie_encryption.h index 6d204bb..aede479 100644 --- a/src/sp_cookie_encryption.h +++ b/src/sp_cookie_encryption.h @@ -13,7 +13,7 @@ #define SAMESITE_COOKIE_FORMAT "; samesite=" -int hook_cookies(); +int hook_cookies(void); int decrypt_cookie(zval *pDest, int num_args, va_list args, zend_hash_key *hash_key); diff --git a/src/sp_disable_xxe.h b/src/sp_disable_xxe.h index 274c169..bd7b28c 100644 --- a/src/sp_disable_xxe.h +++ b/src/sp_disable_xxe.h @@ -1,6 +1,6 @@ #ifndef __SP_DISABLE_XXE_H #define __SP_DISABLE_XXE_H -int hook_libxml_disable_entity_loader(); +int hook_libxml_disable_entity_loader(void); #endif /* __SP_DISABLE_XXE_H */ diff --git a/src/sp_disabled_functions.h b/src/sp_disabled_functions.h index 3999aec..baf40dd 100644 --- a/src/sp_disabled_functions.h +++ b/src/sp_disabled_functions.h @@ -3,7 +3,7 @@ extern zend_write_func_t zend_write_default; -int hook_disabled_functions(); +int hook_disabled_functions(void); int hook_echo(const char *, size_t); void should_disable_ht(zend_execute_data *, const char *, const zend_string *, const char *, const sp_list_node *, const HashTable *); diff --git a/src/sp_harden_rand.h b/src/sp_harden_rand.h index 53ebdd0..bbe9be4 100644 --- a/src/sp_harden_rand.h +++ b/src/sp_harden_rand.h @@ -5,6 +5,6 @@ #include "ext/standard/php_random.h" #include "zend_exceptions.h" -int hook_rand(); +int hook_rand(void); #endif /* __SP_HARDEN_RAND_H */ diff --git a/src/sp_session.h b/src/sp_session.h index 435e983..06a0ce7 100644 --- a/src/sp_session.h +++ b/src/sp_session.h @@ -7,4 +7,4 @@ #include "ext/hash/php_hash_sha.h" #include "ext/standard/base64.h" -void hook_session(); +void hook_session(void); diff --git a/src/sp_sloppy.h b/src/sp_sloppy.h index c01b77c..cd9f304 100644 --- a/src/sp_sloppy.h +++ b/src/sp_sloppy.h @@ -3,6 +3,6 @@ #include "php_snuffleupagus.h" #include "zend_vm.h" -void hook_sloppy(); +void hook_sloppy(void); #endif diff --git a/src/sp_tree.h b/src/sp_tree.h index d29d095..2659d56 100644 --- a/src/sp_tree.h +++ b/src/sp_tree.h @@ -21,7 +21,7 @@ typedef struct parser_s { struct parser_s *next; } sp_tree; -sp_tree *sp_tree_new(); +sp_tree *sp_tree_new(void); void sp_tree_free(sp_tree *); #endif diff --git a/src/sp_upload_validation.h b/src/sp_upload_validation.h index 53790fd..1b239a0 100644 --- a/src/sp_upload_validation.h +++ b/src/sp_upload_validation.h @@ -1,6 +1,6 @@ #ifndef __SP_UPLOAD_VALIDATION_H__ #define __SP_UPLOAD_VALIDATION_H__ -void hook_upload(); +void hook_upload(void); #endif diff --git a/src/sp_utils.h b/src/sp_utils.h index 744bbff..24571ee 100644 --- a/src/sp_utils.h +++ b/src/sp_utils.h @@ -53,7 +53,7 @@ #define GET_SUFFIX(x) (x == 1) ? "st" : ((x == 2) ? "nd" : "th") -const char *get_ipaddr(); +const char *get_ipaddr(void); void sp_log_msgf(char const *restrict feature, int level, int type, const char *restrict fmt, ...); int compute_hash(const char *const restrict filename, char *restrict file_hash); diff --git a/src/sp_wrapper.h b/src/sp_wrapper.h index f57513a..c4b17e0 100644 --- a/src/sp_wrapper.h +++ b/src/sp_wrapper.h @@ -2,7 +2,7 @@ #define SP_WRAPPER_H #include "php_snuffleupagus.h" -void sp_disable_wrapper(); -int hook_stream_wrappers(); +void sp_disable_wrapper(void); +int hook_stream_wrappers(void); #endif -- cgit v1.3 From e6e6728fd04d7cbaeee7f8ef4733a77557786a8b Mon Sep 17 00:00:00 2001 From: jvoisin Date: Fri, 6 Nov 2020 17:05:40 +0100 Subject: Constify a bit more --- src/sp_list.c | 3 ++- src/sp_list.h | 4 ++-- src/sp_var_parser.c | 3 ++- 3 files changed, 6 insertions(+), 4 deletions(-) (limited to 'src') diff --git a/src/sp_list.c b/src/sp_list.c index c798d6d..0f00371 100644 --- a/src/sp_list.c +++ b/src/sp_list.c @@ -10,7 +10,8 @@ void sp_list_free(sp_list_node *node) { // Thanks to https://en.wikipedia.org/wiki/Insertion_sort :> sp_list_node *sp_list_sort(sp_list_node *pList, - int (*cmp_func)(sp_list_node *, sp_list_node *)) { + int (*cmp_func)(sp_list_node const *const, + sp_list_node const *const)) { sp_list_node *head = NULL; if (pList == NULL || pList->next == NULL) { diff --git a/src/sp_list.h b/src/sp_list.h index 6b04486..2c91995 100644 --- a/src/sp_list.h +++ b/src/sp_list.h @@ -7,8 +7,8 @@ typedef struct sp_node_s { } sp_list_node; -sp_list_node *sp_list_sort(sp_list_node *, - int (*)(sp_list_node *, sp_list_node *)); +sp_list_node *sp_list_sort(sp_list_node *, int (*)(sp_list_node const *const, + sp_list_node const *const)); sp_list_node *sp_list_insert(sp_list_node *, void *); sp_list_node *sp_list_prepend(sp_list_node *, void *); void sp_list_free(sp_list_node *); diff --git a/src/sp_var_parser.c b/src/sp_var_parser.c index 72cbc12..1544030 100644 --- a/src/sp_var_parser.c +++ b/src/sp_var_parser.c @@ -85,7 +85,8 @@ static int create_var(sp_tree *tree, const char *restrict value, return 0; } -int cmp_tokens(sp_list_node *list1, sp_list_node *list2) { +int cmp_tokens(sp_list_node const *const list1, + sp_list_node const *const list2) { return (((sp_conf_token *)list1->data)->pos - ((sp_conf_token *)list2->data)->pos); } -- cgit v1.3 From a480d9f70a99143dd16416da150cee1c21fdde1d Mon Sep 17 00:00:00 2001 From: jvoisin Date: Fri, 6 Nov 2020 17:05:58 +0100 Subject: Clang-format again --- src/sp_utils.h | 27 +++++++++++++++++---------- 1 file changed, 17 insertions(+), 10 deletions(-) (limited to 'src') diff --git a/src/sp_utils.h b/src/sp_utils.h index 24571ee..24c74bf 100644 --- a/src/sp_utils.h +++ b/src/sp_utils.h @@ -36,17 +36,24 @@ #define SP_LOG_ERROR E_ERROR #define SP_LOG_WARN E_WARNING -#define sp_log_msg(feature, level, ...) sp_log_msgf(feature, level, SP_TYPE_LOG, __VA_ARGS__) -#define sp_log_drop(feature, ...) sp_log_msgf(feature, SP_LOG_ERROR, SP_TYPE_DROP, __VA_ARGS__) -#define sp_log_simulation(feature, ...) sp_log_msgf(feature, SP_LOG_WARN, SP_TYPE_SIMULATION, __VA_ARGS__) -#define sp_log_auto(feature, is_simulation, ...) sp_log_msgf(feature, \ - (is_simulation ? SP_LOG_WARN : SP_LOG_ERROR), \ - (is_simulation ? SP_TYPE_SIMULATION : SP_TYPE_DROP), __VA_ARGS__) +#define sp_log_msg(feature, level, ...) \ + sp_log_msgf(feature, level, SP_TYPE_LOG, __VA_ARGS__) +#define sp_log_drop(feature, ...) \ + sp_log_msgf(feature, SP_LOG_ERROR, SP_TYPE_DROP, __VA_ARGS__) +#define sp_log_simulation(feature, ...) \ + sp_log_msgf(feature, SP_LOG_WARN, SP_TYPE_SIMULATION, __VA_ARGS__) +#define sp_log_auto(feature, is_simulation, ...) \ + sp_log_msgf(feature, (is_simulation ? SP_LOG_WARN : SP_LOG_ERROR), \ + (is_simulation ? SP_TYPE_SIMULATION : SP_TYPE_DROP), \ + __VA_ARGS__) -#define sp_log_err(feature, ...) sp_log_msgf(feature, SP_LOG_ERROR, SP_TYPE_LOG, __VA_ARGS__) -#define sp_log_warn(feature, ...) sp_log_msgf(feature, SP_LOG_WARN, SP_TYPE_LOG, __VA_ARGS__) +#define sp_log_err(feature, ...) \ + sp_log_msgf(feature, SP_LOG_ERROR, SP_TYPE_LOG, __VA_ARGS__) +#define sp_log_warn(feature, ...) \ + sp_log_msgf(feature, SP_LOG_WARN, SP_TYPE_LOG, __VA_ARGS__) #ifdef SP_DEBUG -#define sp_log_debug(...) sp_log_msgf("DEBUG", SP_LOG_DEBUG, SP_TYPE_LOG, __VA_ARGS__) +#define sp_log_debug(...) \ + sp_log_msgf("DEBUG", SP_LOG_DEBUG, SP_TYPE_LOG, __VA_ARGS__) #else #define sp_log_debug(...) #endif @@ -55,7 +62,7 @@ const char *get_ipaddr(void); void sp_log_msgf(char const *restrict feature, int level, int type, - const char *restrict fmt, ...); + const char *restrict fmt, ...); int compute_hash(const char *const restrict filename, char *restrict file_hash); const zend_string *sp_zval_to_zend_string(const zval *); bool sp_match_value(const zend_string *, const zend_string *, const sp_pcre *); -- cgit v1.3 From 630ab2f9e451835bf6d343438ca781892e95d9e3 Mon Sep 17 00:00:00 2001 From: jvoisin Date: Fri, 6 Nov 2020 17:41:59 +0100 Subject: Bump the changelog --- debian/changelog | 24 +++++++++++++---- doc/source/changelog.rst | 69 ++++++++++++++++++++++++++++++------------------ src/php_snuffleupagus.h | 4 +-- 3 files changed, 64 insertions(+), 33 deletions(-) (limited to 'src') diff --git a/debian/changelog b/debian/changelog index fc9e0b0..3177034 100644 --- a/debian/changelog +++ b/debian/changelog @@ -1,3 +1,18 @@ +snuffleupagus (0.6.0) UNRELEASED; urgency=medium + + [ jvoisin ] + * More constification + * Snuffleupagus should now be able to get client's ip addresses in more cases + * Documented compatibility with Heroku + * Improved logging + * Added a couple of tests + + [ wargio ] + * allow empty configurations + + -- jvoisin Fri, 06 Nov 2020 17:45:00 +0200 + + snuffleupagus (0.5.1) UNRELEASED; urgency=medium [ jvoisin ] @@ -11,7 +26,6 @@ snuffleupagus (0.5.1) UNRELEASED; urgency=medium -- jvoisin Sat, 20 Jun 2020 12:30:00 +0200 - snuffleupagus (0.5.0) UNRELEASED; urgency=medium [ kkadosh ] @@ -37,7 +51,7 @@ snuffleupagus (0.4.1) UNRELEASED; urgency=medium * Improve and clarify the documentation * Add support for PHP7.3 * Improve the coverage, we have now reached 99% of coverage - * Improve the `mb_string` hooking logic + * Improve the `mb_string` hooking logic * The script that check uploaded file is now available in PHP * Fix segfault on 32-bit for PHP7.3 * Fix segfault when using `sloppy_comparison` feature with array @@ -67,11 +81,11 @@ snuffleupagus (0.3.1) UNRELEASED; urgency=medium * Disable XXE and harden PRNG by default * Use SameSite on PHP's session cookie in the default rules - * Relax a bit what files can be included in the default rules + * Relax a bit what files can be included in the default rules * Add the possibility to ignore files hashes when generating rules - * The filename filter is now accepting phar paths + * The filename filter is now accepting phar paths * The harden rand_feature is not ignoring parameters anymore in function calls - * Fix possible crashes/hangs when using php-fpm's pools + * Fix possible crashes/hangs when using php-fpm's pools * Fix an infinite loop on echo hook * Fix an issue with filename filter * Fix some documentation issues diff --git a/doc/source/changelog.rst b/doc/source/changelog.rst index a72b737..b4b87b8 100644 --- a/doc/source/changelog.rst +++ b/doc/source/changelog.rst @@ -1,8 +1,25 @@ Changelog ========= -0.5.1 - `Order of the Elephant `__ 2020/06/20 --------------------------------------------------------------------------------------------------------------- +0.6.0 - `Elephant in the room `__ 2020/11/06 +---------------------------------------------------------------------------------------------------------- + +New features +^^^^^^^^^^^^ +* Allow empty configurations + +Improvements +^^^^^^^^^^^^ + +* More constification +* Snuffleupagus should now be able to get client's ip addresses in more cases +* Documented compatibility with Heroku +* Improved logging +* Added a couple of tests + + +0.5.1 - `Order of the Elephant `__ 2020/06/20 +----------------------------------------------------------------------------------------------------------- New features ^^^^^^^^^^^^ @@ -19,8 +36,8 @@ Improvements * Improve the gitlab CI -0.5.0 - `Elephant Flats `__ 2019/06/12 --------------------------------------------------------------------------------------------------------------- +0.5.0 - `Elephant Flats `__ 2019/06/12 +---------------------------------------------------------------------------------------------------- Improvements ^^^^^^^^^^^^ @@ -45,8 +62,8 @@ Bug fixes -0.4.1 - `Loxodonta `__ 2018/12/21 --------------------------------------------------------------------------------------------------------------- +0.4.1 - `Loxodonta `__ 2018/12/21 +----------------------------------------------------------------------------------------------- Improvements ^^^^^^^^^^^^ @@ -66,8 +83,8 @@ Bug fixes -0.4.0 - `Oliphant Chuckerbutty `__ 2018/08/31 --------------------------------------------------------------------------------------------------------------- +0.4.0 - `Oliphant Chuckerbutty `__ 2018/08/31 +----------------------------------------------------------------------------------------------------------- New features ^^^^^^^^^^^^ @@ -105,8 +122,8 @@ Bug fixes -0.3.1 - `Elephant Arch `__ 2018/08/20 ------------------------------------------------------------------------------------------------------- +0.3.1 - `Elephant Arch `__ 2018/08/20 +--------------------------------------------------------------------------------------------------- Improvements ^^^^^^^^^^^^ @@ -128,21 +145,21 @@ Bug fixes - Fix the Arch Linux's PKGBUILD -0.3.0 - `Dentalium elephantinum `__ 2018/07/17 ---------------------------------------------------------------------------------------------------------------- +0.3.0 - `Dentalium elephantinum `__ 2018/07/17 +------------------------------------------------------------------------------------------------------------ New features ^^^^^^^^^^^^ -- Session cookies can now be `encrypted `__ -- Some occurrences of `type juggling `__ can now be eradicated -- It's `now possible `__ to hook `echo` and `print` +- Session cookies can now be `encrypted `__ +- Some occurrences of `type juggling `__ can now be eradicated +- It's `now possible `__ to hook `echo` and `print` Improvements ^^^^^^^^^^^^ -- The `.filename()` filter is `now matching `__ on the file where the function is called instead on the one where it's defined. -- Vastly `optimize `__ the way we hook native functions +- The `.filename()` filter is `now matching `__ on the file where the function is called instead on the one where it's defined. +- Vastly `optimize `__ the way we hook native functions - The format of the logs has been streamlined to ease their processing @@ -151,11 +168,11 @@ Bug fixes - Better handling of filters for built-in functions - Fix various possible integer overflows -- Fix an `annoying memory leak `__ impacting mostly `mod_php` +- Fix an `annoying memory leak `__ impacting mostly `mod_php` -0.2.2 - `Elephant Moraine `__ 2018/04/12 ---------------------------------------------------------------------------------------------------------- +0.2.2 - `Elephant Moraine `__ 2018/04/12 +------------------------------------------------------------------------------------------------------ New features ^^^^^^^^^^^^ @@ -177,8 +194,8 @@ Bug fixes - Fix a crash related to variadic functions -0.2.1 - `Elephant Point `__ 2018/02/07 -------------------------------------------------------------------------------------------------------- +0.2.1 - `Elephant Point `__ 2018/02/07 +---------------------------------------------------------------------------------------------------- Bug fixes ^^^^^^^^^ @@ -194,8 +211,8 @@ Improvements - Improve a bit the portability of the code - Minor code simplification -0.2.0 - `Elephant Rally `__ - 2018/01/18 ---------------------------------------------------------------------------------------------------------- +0.2.0 - `Elephant Rally `__ - 2018/01/18 +------------------------------------------------------------------------------------------------------ New features ^^^^^^^^^^^^ @@ -226,7 +243,7 @@ External contributions - Simplification and clean up of our linked-list implementation by `smagnin `__ -0.1.0 - `Mighty Mammoth `__ - 2017/12/21 ---------------------------------------------------------------------------------------------------------- +0.1.0 - `Mighty Mammoth `__ - 2017/12/21 +------------------------------------------------------------------------------------------------------ - Initial release diff --git a/src/php_snuffleupagus.h b/src/php_snuffleupagus.h index 6b0e210..213e27e 100644 --- a/src/php_snuffleupagus.h +++ b/src/php_snuffleupagus.h @@ -1,9 +1,9 @@ #ifndef PHP_SNUFFLEUPAGUS_H #define PHP_SNUFFLEUPAGUS_H -#define PHP_SNUFFLEUPAGUS_VERSION "0.5.1" +#define PHP_SNUFFLEUPAGUS_VERSION "0.6.0" #define PHP_SNUFFLEUPAGUS_EXTNAME "snuffleupagus" -#define PHP_SNUFFLEUPAGUS_AUTHOR "NBS System" +#define PHP_SNUFFLEUPAGUS_AUTHOR "NBS System & Julien (jvoisin) Voisin" #define PHP_SNUFFLEUPAGUS_URL "https://github.com/jvoisin/snuffleupagus" #define PHP_SNUFFLEUPAGUS_COPYRIGHT "LGPLv2" -- cgit v1.3 From c76c67ce7624bab488790a4843eb12348c6c044a Mon Sep 17 00:00:00 2001 From: jvoisin Date: Sun, 8 Nov 2020 19:12:43 +0100 Subject: Mark a test as broken --- src/tests/stream_wrapper/stream_wrapper_restore.phpt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'src') diff --git a/src/tests/stream_wrapper/stream_wrapper_restore.phpt b/src/tests/stream_wrapper/stream_wrapper_restore.phpt index e1e9604..3f547a1 100644 --- a/src/tests/stream_wrapper/stream_wrapper_restore.phpt +++ b/src/tests/stream_wrapper/stream_wrapper_restore.phpt @@ -2,7 +2,7 @@ Stream wrapper --SKIPIF-- -= 70400) { die("skip BROKEN with 7.4"); } ?> += 70300) { die("skip BROKEN with 7.3"); } ?> --INI-- sp.configuration_file={PWD}/config/config_stream_wrapper_register.ini --FILE-- -- cgit v1.3 From f4bc388f1e4adb1b9dde5f3af77785101ad19857 Mon Sep 17 00:00:00 2001 From: jvoisin Date: Thu, 12 Nov 2020 16:28:42 +0000 Subject: Snuffleupagus now uses pcre2 by default --- .travis.yml | 6 ++++++ src/config.m4 | 2 +- src/php_snuffleupagus.h | 3 +-- src/sp_pcre_compat.h | 8 +++++--- 4 files changed, 13 insertions(+), 6 deletions(-) (limited to 'src') diff --git a/.travis.yml b/.travis.yml index bcad3a7..de7febb 100644 --- a/.travis.yml +++ b/.travis.yml @@ -1,5 +1,11 @@ language: php +addons: + apt: + packages: + - libpcre2-dev + - libpcre2-8-0 + env: - secure: "fjx/arfcdoqWUIzlQXzQdW9gqXRG7Vpo8dTwJip0uJH8oFeTfYhw1V9EMS4JtKVGwQo3vaagehMflVr7swaoe9Nf4YoCjaEq8x6ZMJH3bLHNgtigfS03Uqop9FI/a/Jau/BL7ibIEkZRNfEIx8z+NyfY4bAeK35W/Ru5k2BHyp1GLKwBpizHdJsshG/ukM+4W8PY9BAeXVavqxQRywseQEsqmGruGLcYFuuh04D7cnNqyuYgbdaq7YMKZfVGxM7N5eeL5xSlw0Sl9yOutRzkxUmL1WSmYMFrkRLcc37hRTu67tCmP60tiGLGY2Ll8nUh6rkc3RwBgc1wOC7jRMrtoGvlgsLxz7kLOtpQ31PdJKefe99rQMkcYKLwCxXf7WQdOHY4YsTmjqlPyzfTKT3mNtGhUwp1rEvlcygZZK8osHtc46BUD6BKNRCvTyLNyLTx2IoA4WfrzWOaQ+A1gNRD5L9Jbqi0kY6teENCzzlHUe80mH7wBarCTRoDAD73w/EPgSn3+CeLALXXEu+r9Sm/e5YpaFfLdeKDC6fr1KwU69ddHUKWZqjFM8vEHjrIbmAdNwVsuCo8LeWdCCXdQlWrISQ4OUDBBEmnwlKoojSjIYP5SKoH1txZemGok1/TN/tvjlyrx2RYYxy7AdUulENKXXeqlwWsiwVZCZLR4tt+wEQ=" diff --git a/src/config.m4 b/src/config.m4 index 52b6d04..e4cc1f5 100644 --- a/src/config.m4 +++ b/src/config.m4 @@ -24,7 +24,7 @@ CFLAGS="$CFLAGS -Wall -Wextra -Wno-unused-parameter" CFLAGS="$CFLAGS -Wformat=2 -Wformat-security -D_FORTIFY_SOURCE=2" CFLAGS="$CFLAGS -fstack-protector" -LDFLAGS="$LDFLAGS -lpcre" +LDFLAGS="$LDFLAGS `pcre2-config --libs8`" if test "$PHP_DEBUG" = "yes"; then AC_DEFINE(SP_DEBUG, 1, [Wether you want to enable debug messages]) diff --git a/src/php_snuffleupagus.h b/src/php_snuffleupagus.h index 213e27e..532516f 100644 --- a/src/php_snuffleupagus.h +++ b/src/php_snuffleupagus.h @@ -14,7 +14,7 @@ #include #include #include -#include +#include "sp_pcre_compat.h" #include #include #include @@ -34,7 +34,6 @@ #include "ext/standard/info.h" #include "ext/standard/url.h" #include "ext/standard/php_var.h" -#include "ext/pcre/php_pcre.h" #include "ext/session/php_session.h" #include "php.h" #include "php_ini.h" diff --git a/src/sp_pcre_compat.h b/src/sp_pcre_compat.h index 093a9c3..b429683 100644 --- a/src/sp_pcre_compat.h +++ b/src/sp_pcre_compat.h @@ -7,17 +7,19 @@ #undef pcre_exec #undef pcre_compile -/* We're not supporting pcre2 when it's not bundled with php7, +/* We're not supporting pcre when it's not bundled with php7, * yet. Pull-requests are welcome. */ #if HAVE_BUNDLED_PCRE #if PHP_VERSION_ID >= 70300 #define SP_HAS_PCRE2 -#include "ext/pcre/pcre2lib/pcre2.h" +#include "ext/pcre/php_pcre.h" #else #include "ext/pcre/pcrelib/pcre.h" #endif #else -#include "pcre.h" +#define SP_HAS_PCRE2 +#define PCRE2_CODE_UNIT_WIDTH 8 +#include "pcre2.h" #endif #ifdef SP_HAS_PCRE2 -- cgit v1.3 From 56376c73c6896ea581b10d5041822eafeb6010c1 Mon Sep 17 00:00:00 2001 From: jvoisin Date: Thu, 12 Nov 2020 19:21:37 +0100 Subject: Simplify a bit a function --- src/sp_execute.c | 24 +++++++++++++----------- 1 file changed, 13 insertions(+), 11 deletions(-) (limited to 'src') diff --git a/src/sp_execute.c b/src/sp_execute.c index ab73972..de83a2a 100644 --- a/src/sp_execute.c +++ b/src/sp_execute.c @@ -156,6 +156,7 @@ static void sp_execute_ex(zend_execute_data *execute_data) { return; } + // If we're at an internal function if (!execute_data->prev_execute_data || !execute_data->prev_execute_data->func || !ZEND_USER_CODE(execute_data->prev_execute_data->func->type) || @@ -163,17 +164,18 @@ static void sp_execute_ex(zend_execute_data *execute_data) { should_disable_ht(execute_data, function_name, NULL, NULL, config_disabled_functions_reg, config_disabled_functions); - } else if ((execute_data->prev_execute_data->opline->opcode == - ZEND_DO_FCALL || - execute_data->prev_execute_data->opline->opcode == - ZEND_DO_UCALL || - execute_data->prev_execute_data->opline->opcode == - ZEND_DO_ICALL || - execute_data->prev_execute_data->opline->opcode == - ZEND_DO_FCALL_BY_NAME)) { - should_disable_ht(execute_data, function_name, NULL, NULL, - config_disabled_functions_reg, - config_disabled_functions); + } else { // If we're at a userland function call + switch (execute_data->prev_execute_data->opline->opcode) { + case ZEND_DO_FCALL: + case ZEND_DO_FCALL_BY_NAME: + case ZEND_DO_ICALL: + case ZEND_DO_UCALL: + should_disable_ht(execute_data, function_name, NULL, NULL, + config_disabled_functions_reg, + config_disabled_functions); + default: + break; + } } // When a function's return value isn't used, php doesn't store it in the -- cgit v1.3 From a9301f4836a4bf22d18283103cfcd446eaaec1eb Mon Sep 17 00:00:00 2001 From: jvoisin Date: Thu, 12 Nov 2020 19:42:33 +0100 Subject: Harmonize a bit the configuration parsing and fix a typo --- src/sp_config_keywords.c | 8 ++++---- .../broken_configuration/broken_conf_mutually_exclusive.phpt | 4 ++-- 2 files changed, 6 insertions(+), 6 deletions(-) (limited to 'src') diff --git a/src/sp_config_keywords.c b/src/sp_config_keywords.c index c3a9c19..7d9fbdf 100644 --- a/src/sp_config_keywords.c +++ b/src/sp_config_keywords.c @@ -378,11 +378,11 @@ int parse_disabled_functions(char *line) { return 1; \ } - MUTUALLY_EXCLUSIVE(df->value, df->r_value, "value", "regexp"); + MUTUALLY_EXCLUSIVE(df->r_value, df->value, "r_value", "value"); MUTUALLY_EXCLUSIVE(df->r_function, df->function, "r_function", "function"); - MUTUALLY_EXCLUSIVE(df->filename, df->r_filename, "r_filename", "filename"); - MUTUALLY_EXCLUSIVE(df->ret, df->r_ret, "r_ret", "ret"); - MUTUALLY_EXCLUSIVE(df->key, df->r_key, "r_key", "key"); + MUTUALLY_EXCLUSIVE(df->r_filename, df->filename, "r_filename", "filename"); + MUTUALLY_EXCLUSIVE(df->r_ret, df->ret, "r_ret", "ret"); + MUTUALLY_EXCLUSIVE(df->r_key, df->key, "r_key", "key"); #undef MUTUALLY_EXCLUSIVE if (1 < diff --git a/src/tests/broken_configuration/broken_conf_mutually_exclusive.phpt b/src/tests/broken_configuration/broken_conf_mutually_exclusive.phpt index ccbcc6e..44ef0aa 100644 --- a/src/tests/broken_configuration/broken_conf_mutually_exclusive.phpt +++ b/src/tests/broken_configuration/broken_conf_mutually_exclusive.phpt @@ -6,6 +6,6 @@ Broken configuration sp.configuration_file={PWD}/config/broken_conf_mutually_exclusive.ini --FILE-- --EXPECT-- -PHP Fatal error: [snuffleupagus][0.0.0.0][config][log] Invalid configuration line: 'sp.disabled_functions.function("system").param("id").value("42").value_r("^id$").drop();': '.value' and '.regexp' are mutually exclusive on line 1 in Unknown on line 0 +PHP Fatal error: [snuffleupagus][0.0.0.0][config][log] Invalid configuration line: 'sp.disabled_functions.function("system").param("id").value("42").value_r("^id$").drop();': '.r_value' and '.value' are mutually exclusive on line 1 in Unknown on line 0 -Fatal error: [snuffleupagus][0.0.0.0][config][log] Invalid configuration line: 'sp.disabled_functions.function("system").param("id").value("42").value_r("^id$").drop();': '.value' and '.regexp' are mutually exclusive on line 1 in Unknown on line 0 \ No newline at end of file +Fatal error: [snuffleupagus][0.0.0.0][config][log] Invalid configuration line: 'sp.disabled_functions.function("system").param("id").value("42").value_r("^id$").drop();': '.r_value' and '.value' are mutually exclusive on line 1 in Unknown on line 0 -- cgit v1.3 From 4d4aa88392eb4ff482409b7d3434032769c6160a Mon Sep 17 00:00:00 2001 From: jvoisin Date: Thu, 12 Nov 2020 19:45:01 +0100 Subject: Invalid configurations with mutually exclusive keywords now aborts --- src/sp_config_keywords.c | 2 +- src/tests/broken_configuration/broken_conf_mutually_exclusive.phpt | 3 +++ src/tests/broken_configuration/broken_conf_mutually_exclusive2.phpt | 5 ++++- src/tests/broken_configuration/broken_conf_mutually_exclusive3.phpt | 5 ++++- src/tests/broken_configuration/broken_conf_mutually_exclusive5.phpt | 5 ++++- 5 files changed, 16 insertions(+), 4 deletions(-) (limited to 'src') diff --git a/src/sp_config_keywords.c b/src/sp_config_keywords.c index 7d9fbdf..550900f 100644 --- a/src/sp_config_keywords.c +++ b/src/sp_config_keywords.c @@ -375,7 +375,7 @@ int parse_disabled_functions(char *line) { "Invalid configuration line: 'sp.disabled_functions%s': " \ "'.%s' and '.%s' are mutually exclusive on line %zu", \ line, STR1, STR2, sp_line_no); \ - return 1; \ + return -1; \ } MUTUALLY_EXCLUSIVE(df->r_value, df->value, "r_value", "value"); diff --git a/src/tests/broken_configuration/broken_conf_mutually_exclusive.phpt b/src/tests/broken_configuration/broken_conf_mutually_exclusive.phpt index 44ef0aa..b1d86f1 100644 --- a/src/tests/broken_configuration/broken_conf_mutually_exclusive.phpt +++ b/src/tests/broken_configuration/broken_conf_mutually_exclusive.phpt @@ -9,3 +9,6 @@ sp.configuration_file={PWD}/config/broken_conf_mutually_exclusive.ini PHP Fatal error: [snuffleupagus][0.0.0.0][config][log] Invalid configuration line: 'sp.disabled_functions.function("system").param("id").value("42").value_r("^id$").drop();': '.r_value' and '.value' are mutually exclusive on line 1 in Unknown on line 0 Fatal error: [snuffleupagus][0.0.0.0][config][log] Invalid configuration line: 'sp.disabled_functions.function("system").param("id").value("42").value_r("^id$").drop();': '.r_value' and '.value' are mutually exclusive on line 1 in Unknown on line 0 + +Fatal error: [snuffleupagus][0.0.0.0][config][log] Invalid configuration file in Unknown on line 0 +Could not startup. diff --git a/src/tests/broken_configuration/broken_conf_mutually_exclusive2.phpt b/src/tests/broken_configuration/broken_conf_mutually_exclusive2.phpt index 9e8e8ab..64c6c3e 100644 --- a/src/tests/broken_configuration/broken_conf_mutually_exclusive2.phpt +++ b/src/tests/broken_configuration/broken_conf_mutually_exclusive2.phpt @@ -8,4 +8,7 @@ sp.configuration_file={PWD}/config/broken_conf_mutually_exclusive2.ini --EXPECT-- PHP Fatal error: [snuffleupagus][0.0.0.0][config][log] Invalid configuration line: 'sp.disabled_functions.function("system").function_r("system").param("id").value("42").drop();': '.r_function' and '.function' are mutually exclusive on line 1 in Unknown on line 0 -Fatal error: [snuffleupagus][0.0.0.0][config][log] Invalid configuration line: 'sp.disabled_functions.function("system").function_r("system").param("id").value("42").drop();': '.r_function' and '.function' are mutually exclusive on line 1 in Unknown on line 0 \ No newline at end of file +Fatal error: [snuffleupagus][0.0.0.0][config][log] Invalid configuration line: 'sp.disabled_functions.function("system").function_r("system").param("id").value("42").drop();': '.r_function' and '.function' are mutually exclusive on line 1 in Unknown on line 0 + +Fatal error: [snuffleupagus][0.0.0.0][config][log] Invalid configuration file in Unknown on line 0 +Could not startup. diff --git a/src/tests/broken_configuration/broken_conf_mutually_exclusive3.phpt b/src/tests/broken_configuration/broken_conf_mutually_exclusive3.phpt index a4189f9..384c82a 100644 --- a/src/tests/broken_configuration/broken_conf_mutually_exclusive3.phpt +++ b/src/tests/broken_configuration/broken_conf_mutually_exclusive3.phpt @@ -8,4 +8,7 @@ sp.configuration_file={PWD}/config/broken_conf_mutually_exclusive3.ini --EXPECT-- PHP Fatal error: [snuffleupagus][0.0.0.0][config][log] Invalid configuration line: 'sp.disabled_functions.function("system").param("id").value("42").filename_r("^id$").filename("pouet.txt").drop();': '.r_filename' and '.filename' are mutually exclusive on line 1 in Unknown on line 0 -Fatal error: [snuffleupagus][0.0.0.0][config][log] Invalid configuration line: 'sp.disabled_functions.function("system").param("id").value("42").filename_r("^id$").filename("pouet.txt").drop();': '.r_filename' and '.filename' are mutually exclusive on line 1 in Unknown on line 0 \ No newline at end of file +Fatal error: [snuffleupagus][0.0.0.0][config][log] Invalid configuration line: 'sp.disabled_functions.function("system").param("id").value("42").filename_r("^id$").filename("pouet.txt").drop();': '.r_filename' and '.filename' are mutually exclusive on line 1 in Unknown on line 0 + +Fatal error: [snuffleupagus][0.0.0.0][config][log] Invalid configuration file in Unknown on line 0 +Could not startup. diff --git a/src/tests/broken_configuration/broken_conf_mutually_exclusive5.phpt b/src/tests/broken_configuration/broken_conf_mutually_exclusive5.phpt index cfbddfb..de82f3a 100644 --- a/src/tests/broken_configuration/broken_conf_mutually_exclusive5.phpt +++ b/src/tests/broken_configuration/broken_conf_mutually_exclusive5.phpt @@ -8,4 +8,7 @@ sp.configuration_file={PWD}/config/broken_conf_mutually_exclusive5.ini --EXPECT-- PHP Fatal error: [snuffleupagus][0.0.0.0][config][log] Invalid configuration line: 'sp.disabled_functions.function("system").ret("0").drop().ret_r("^0$");': '.r_ret' and '.ret' are mutually exclusive on line 1 in Unknown on line 0 -Fatal error: [snuffleupagus][0.0.0.0][config][log] Invalid configuration line: 'sp.disabled_functions.function("system").ret("0").drop().ret_r("^0$");': '.r_ret' and '.ret' are mutually exclusive on line 1 in Unknown on line 0 \ No newline at end of file +Fatal error: [snuffleupagus][0.0.0.0][config][log] Invalid configuration line: 'sp.disabled_functions.function("system").ret("0").drop().ret_r("^0$");': '.r_ret' and '.ret' are mutually exclusive on line 1 in Unknown on line 0 + +Fatal error: [snuffleupagus][0.0.0.0][config][log] Invalid configuration file in Unknown on line 0 +Could not startup. -- cgit v1.3 From cd79edf97f26d667f7c6ca88fef47f4eda14722a Mon Sep 17 00:00:00 2001 From: jvoisin Date: Thu, 12 Nov 2020 20:01:03 +0100 Subject: Add a test --- src/tests/config/syslog_simulation.ini | 3 +++ src/tests/syslog_simulation.phpt | 11 +++++++++++ 2 files changed, 14 insertions(+) create mode 100644 src/tests/config/syslog_simulation.ini create mode 100644 src/tests/syslog_simulation.phpt (limited to 'src') diff --git a/src/tests/config/syslog_simulation.ini b/src/tests/config/syslog_simulation.ini new file mode 100644 index 0000000..bb52850 --- /dev/null +++ b/src/tests/config/syslog_simulation.ini @@ -0,0 +1,3 @@ +sp.global.secret_key("abcdef"); +sp.unserialize_hmac.enable().simulation(); +sp.log_media("syslog"); diff --git a/src/tests/syslog_simulation.phpt b/src/tests/syslog_simulation.phpt new file mode 100644 index 0000000..4b12f58 --- /dev/null +++ b/src/tests/syslog_simulation.phpt @@ -0,0 +1,11 @@ +--TEST-- +Check the syslog output, in simulation mode. +--SKIPIF-- + +--INI-- +sp.configuration_file={PWD}/config/syslog_simulation.ini +--FILE-- + +--EXPECTF-- -- cgit v1.3 From e134c87a9a7850d1db30cfe10eb0f521b27953a5 Mon Sep 17 00:00:00 2001 From: jvoisin Date: Wed, 18 Nov 2020 20:13:12 +0100 Subject: Make the strict mode disableable The global strict mode was enabled by default without any means to disable it, in certain cases. Bug reported by wedi. --- src/snuffleupagus.c | 11 +++++++---- 1 file changed, 7 insertions(+), 4 deletions(-) (limited to 'src') diff --git a/src/snuffleupagus.c b/src/snuffleupagus.c index 7c69150..9a5ac90 100644 --- a/src/snuffleupagus.c +++ b/src/snuffleupagus.c @@ -22,10 +22,13 @@ ZEND_DLEXPORT int sp_zend_startup(zend_extension *extension) { // LCOV_EXCL_END static inline void sp_op_array_handler(zend_op_array *op) { - if (NULL == op->filename) { + // We need a filename, and strict mode not already enabled on this op + if (NULL == op->filename || op->fn_flags & ZEND_ACC_STRICT_TYPES) { return; } else { - op->fn_flags |= ZEND_ACC_STRICT_TYPES; + if (true == SNUFFLEUPAGUS_G(config).config_global_strict->enable) { + op->fn_flags |= ZEND_ACC_STRICT_TYPES; + } } } @@ -59,7 +62,7 @@ ZEND_DLEXPORT zend_extension zend_extension_entry = { NULL, /* activate_func_t */ NULL, /* deactivate_func_t */ NULL, /* message_handler_func_t */ - sp_op_array_handler, // zend_global_strict, /* op_array_handler_func_t */ + sp_op_array_handler, /* op_array_handler_func_t */ NULL, /* statement_handler_func_t */ NULL, /* fcall_begin_handler_func_t */ NULL, /* fcall_end_handler_func_t */ @@ -222,7 +225,7 @@ PHP_MINFO_FUNCTION(snuffleupagus) { case SP_CONFIG_INVALID: valid_config = "invalid"; break; - case SP_CONFIG_NONE: + case SP_CONFIG_NONE: default: valid_config = "no"; } -- cgit v1.3 From 1cb80ae6a095d360bc2988a82468f3d38a876218 Mon Sep 17 00:00:00 2001 From: jvoisin Date: Thu, 19 Nov 2020 18:53:57 +0100 Subject: Add some tests for the strict mode --- .../strict_mode/config/config_strict_mode_disabled.ini | 1 + .../strict_mode/config/config_strict_mode_enabled.ini | 1 + src/tests/strict_mode/strict_mode_disabled.phpt | 13 +++++++++++++ src/tests/strict_mode/strict_mode_enabled.phpt | 18 ++++++++++++++++++ 4 files changed, 33 insertions(+) create mode 100644 src/tests/strict_mode/config/config_strict_mode_disabled.ini create mode 100644 src/tests/strict_mode/config/config_strict_mode_enabled.ini create mode 100644 src/tests/strict_mode/strict_mode_disabled.phpt create mode 100644 src/tests/strict_mode/strict_mode_enabled.phpt (limited to 'src') diff --git a/src/tests/strict_mode/config/config_strict_mode_disabled.ini b/src/tests/strict_mode/config/config_strict_mode_disabled.ini new file mode 100644 index 0000000..2e68471 --- /dev/null +++ b/src/tests/strict_mode/config/config_strict_mode_disabled.ini @@ -0,0 +1 @@ +sp.global_strict.disable(); diff --git a/src/tests/strict_mode/config/config_strict_mode_enabled.ini b/src/tests/strict_mode/config/config_strict_mode_enabled.ini new file mode 100644 index 0000000..2dc11fc --- /dev/null +++ b/src/tests/strict_mode/config/config_strict_mode_enabled.ini @@ -0,0 +1 @@ +sp.global_strict.enable(); diff --git a/src/tests/strict_mode/strict_mode_disabled.phpt b/src/tests/strict_mode/strict_mode_disabled.phpt new file mode 100644 index 0000000..105f43c --- /dev/null +++ b/src/tests/strict_mode/strict_mode_disabled.phpt @@ -0,0 +1,13 @@ +--TEST-- +Strict mode disabled +--SKIPIF-- + +--INI-- +sp.configuration_file={PWD}/config/config_strict_mode_disabled.ini +--FILE-- + +--EXPECTF-- diff --git a/src/tests/strict_mode/strict_mode_enabled.phpt b/src/tests/strict_mode/strict_mode_enabled.phpt new file mode 100644 index 0000000..c511f9a --- /dev/null +++ b/src/tests/strict_mode/strict_mode_enabled.phpt @@ -0,0 +1,18 @@ +--TEST-- +Strict mode enabled +--SKIPIF-- + +--INI-- +sp.configuration_file={PWD}/config/config_strict_mode_enabled.ini +--FILE-- + +--EXPECTF-- +Fatal error: Uncaught TypeError: ini_set() expects parameter 2 to be string, %s given in %s/tests/strict_mode/strict_mode_enabled.php:%d +Stack trace: +#0 %s/tests/strict_mode/strict_mode_enabled.php(2): ini_set('display_errors', 1) +#1 {main} + thrown in %s/tests/strict_mode/strict_mode_enabled.php on line 2 -- cgit v1.3 From 5be9082f148ab546a0317a28ef5267bb797feb53 Mon Sep 17 00:00:00 2001 From: jvoisin Date: Sun, 29 Nov 2020 19:37:49 +0100 Subject: Make the `>` operator skip over functions --- doc/source/config.rst | 3 ++- src/sp_disabled_functions.c | 8 +++--- .../config_disabled_functions_chain_call_skip.ini | 1 + .../disabled_functions_chain_call_skip.phpt | 29 ++++++++++++++++++++++ 4 files changed, 35 insertions(+), 6 deletions(-) create mode 100644 src/tests/disable_function/config/config_disabled_functions_chain_call_skip.ini create mode 100644 src/tests/disable_function/disabled_functions_chain_call_skip.phpt (limited to 'src') diff --git a/doc/source/config.rst b/doc/source/config.rst index dd30723..258b1ab 100644 --- a/doc/source/config.rst +++ b/doc/source/config.rst @@ -328,7 +328,8 @@ The ``function`` filter is able to do various dereferencing: - ``function("AwesomeNamespace\\my_function")`` will match the function ``my_function`` in the namespace ``AwesomeNamespace`` It's also able to have calltrace constrains: ``function(func1>func2)`` will -match only if ``func2`` is called **inside** of ``func1``. +match only if ``func2`` is called **inside** of ``func1``. Do note that their +might be other functions called between them. The ``param`` filter is able to do some dereferencing as well: diff --git a/src/sp_disabled_functions.c b/src/sp_disabled_functions.c index 7be1c34..7e6ca6a 100644 --- a/src/sp_disabled_functions.c +++ b/src/sp_disabled_functions.c @@ -40,7 +40,7 @@ static bool is_functions_list_matching(zend_execute_data* execute_data, sp_list_node* functions_list) { zend_execute_data *orig_execute_data, *current; orig_execute_data = current = execute_data; - sp_list_node* it = functions_list; + sp_list_node const * it = functions_list; while (current) { if (it == NULL) { // every function in the list matched, we've got a match! @@ -50,7 +50,7 @@ static bool is_functions_list_matching(zend_execute_data* execute_data, EG(current_execute_data) = current; - char* complete_path_function = get_complete_function_path(current); + char* const complete_path_function = get_complete_function_path(current); if (!complete_path_function) { break; } @@ -59,10 +59,8 @@ static bool is_functions_list_matching(zend_execute_data* execute_data, if (0 == match) { it = it->next; - current = current->prev_execute_data; - } else { - break; } + current = current->prev_execute_data; } EG(current_execute_data) = orig_execute_data; diff --git a/src/tests/disable_function/config/config_disabled_functions_chain_call_skip.ini b/src/tests/disable_function/config/config_disabled_functions_chain_call_skip.ini new file mode 100644 index 0000000..4d2f68d --- /dev/null +++ b/src/tests/disable_function/config/config_disabled_functions_chain_call_skip.ini @@ -0,0 +1 @@ +sp.disable_function.function("a>c").simulation().drop(); diff --git a/src/tests/disable_function/disabled_functions_chain_call_skip.phpt b/src/tests/disable_function/disabled_functions_chain_call_skip.phpt new file mode 100644 index 0000000..9ff84b9 --- /dev/null +++ b/src/tests/disable_function/disabled_functions_chain_call_skip.phpt @@ -0,0 +1,29 @@ +--TEST-- +Disable functions by matching the calltrace, with a superfluous function in between +--SKIPIF-- + +--INI-- +sp.configuration_file={PWD}/config/config_disabled_functions_chain_call_skip.ini +--FILE-- + +--EXPECTF-- +I'm in the `a` function! +I'm in the `b` function! + +Warning: [snuffleupagus][0.0.0.0][disabled_function][simulation] Aborted execution on call of the function 'a>c' in %s/tests/disable_function/disabled_functions_chain_call_skip.php on line 12 +I'm in the `c` function! -- cgit v1.3 From ea7c76bce6a4704db867210acfad7cab73106ef2 Mon Sep 17 00:00:00 2001 From: jvoisin Date: Sun, 29 Nov 2020 19:38:13 +0100 Subject: Don't call libxml_disable_entity_loader for php8+ This functions is deprecated, but since PHP8+ requires libxml 2.9.0 where XXE are disabled by default, there is no need to call it anymore.--- src/sp_disable_xxe.c | 3 +++ 1 file changed, 3 insertions(+) (limited to 'src') diff --git a/src/sp_disable_xxe.c b/src/sp_disable_xxe.c index 53148c8..9ebcbad 100644 --- a/src/sp_disable_xxe.c +++ b/src/sp_disable_xxe.c @@ -9,12 +9,15 @@ int hook_libxml_disable_entity_loader() { TSRMLS_FETCH(); +// External entities are disabled by default in PHP8+ +#if PHP_VERSION_ID < 80000 /* Call the php function here instead of re-implementing it is a bit * ugly, but we do not want to introduce compile-time dependencies against * libxml. */ ZVAL_STRING(&func_name, "libxml_disable_entity_loader"); ZVAL_STRING(¶ms[0], "true"); call_user_function(CG(function_table), NULL, &func_name, &hmac, 1, params); +#endif HOOK_FUNCTION("libxml_disable_entity_loader", sp_internal_functions_hook, PHP_FN(sp_libxml_disable_entity_loader)); -- cgit v1.3 From 69719e42994c0e42ae45124acef7835955a5272d Mon Sep 17 00:00:00 2001 From: jvoisin Date: Sun, 29 Nov 2020 20:46:48 +0100 Subject: Fix zend_write booking type The signature was changed in PHP8: https://github.com/php/php-src/commit/e15409b43cacf711608189c299191f2969ea331c --- src/sp_disabled_functions.c | 4 ++++ src/sp_disabled_functions.h | 6 +++++- 2 files changed, 9 insertions(+), 1 deletion(-) (limited to 'src') diff --git a/src/sp_disabled_functions.c b/src/sp_disabled_functions.c index 7e6ca6a..c5ea437 100644 --- a/src/sp_disabled_functions.c +++ b/src/sp_disabled_functions.c @@ -626,7 +626,11 @@ int hook_disabled_functions(void) { zend_write_func_t zend_write_default = NULL; +#if PHP_VERSION_ID >= 80000 +size_t hook_echo(const char* str, size_t str_length) { +#else int hook_echo(const char* str, size_t str_length) { +#endif zend_string* zs = zend_string_init(str, str_length, 0); should_disable_ht( diff --git a/src/sp_disabled_functions.h b/src/sp_disabled_functions.h index baf40dd..fd9b9b9 100644 --- a/src/sp_disabled_functions.h +++ b/src/sp_disabled_functions.h @@ -3,8 +3,12 @@ extern zend_write_func_t zend_write_default; -int hook_disabled_functions(void); +#if PHP_VERSION_ID >= 80000 +size_t hook_echo(const char *, size_t); +#else int hook_echo(const char *, size_t); +#endif +int hook_disabled_functions(void); void should_disable_ht(zend_execute_data *, const char *, const zend_string *, const char *, const sp_list_node *, const HashTable *); void should_drop_on_ret_ht(const zval *, const char *, -- cgit v1.3 From e0d613408a2f770bc467815bdd7273986b3da70b Mon Sep 17 00:00:00 2001 From: jvoisin Date: Sun, 29 Nov 2020 21:02:25 +0100 Subject: Fix some unused variables warnings introduced in ea7c76b --- src/sp_disable_xxe.c | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) (limited to 'src') diff --git a/src/sp_disable_xxe.c b/src/sp_disable_xxe.c index 9ebcbad..113d84b 100644 --- a/src/sp_disable_xxe.c +++ b/src/sp_disable_xxe.c @@ -3,10 +3,6 @@ PHP_FUNCTION(sp_libxml_disable_entity_loader) { RETURN_TRUE; } int hook_libxml_disable_entity_loader() { - zval func_name; - zval hmac; - zval params[1]; - TSRMLS_FETCH(); // External entities are disabled by default in PHP8+ @@ -14,6 +10,10 @@ int hook_libxml_disable_entity_loader() { /* Call the php function here instead of re-implementing it is a bit * ugly, but we do not want to introduce compile-time dependencies against * libxml. */ + zval func_name; + zval hmac; + zval params[1]; + ZVAL_STRING(&func_name, "libxml_disable_entity_loader"); ZVAL_STRING(¶ms[0], "true"); call_user_function(CG(function_table), NULL, &func_name, &hmac, 1, params); -- cgit v1.3 From 95ee1fa689c335233df3345ce1fd0780b79ed2bc Mon Sep 17 00:00:00 2001 From: jvoisin Date: Mon, 30 Nov 2020 10:15:57 +0100 Subject: Fix the type of zend_compile_string (#357) This was changed in https://github.com/php/php-src/commit/f5dbebd82e642b1d1af462b486fc392ecff2c67a--- src/sp_sloppy.c | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) (limited to 'src') diff --git a/src/sp_sloppy.c b/src/sp_sloppy.c index b4212ca..a2d6b43 100644 --- a/src/sp_sloppy.c +++ b/src/sp_sloppy.c @@ -4,7 +4,7 @@ ZEND_API zend_op_array* (*orig_zend_compile_file)(zend_file_handle* file_handle, int type) = NULL; #if PHP_VERSION_ID >= 80000 ZEND_API zend_op_array* (*orig_zend_compile_string)( - zval* source_string, const char* filename) = NULL; + zend_string* source_string, const char* filename) = NULL; #else ZEND_API zend_op_array* (*orig_zend_compile_string)(zval* source_string, char* filename) = NULL; @@ -25,7 +25,11 @@ static void modify_opcode(zend_op_array* opline) { } } +#if PHP_VERSION_ID >= 80000 +ZEND_API zend_op_array* sp_compile_string(zend_string* source_string, char* filename) { +#else ZEND_API zend_op_array* sp_compile_string(zval* source_string, char* filename) { +#endif zend_op_array* opline = orig_zend_compile_string(source_string, filename); modify_opcode(opline); return opline; -- cgit v1.3 From a60798c68db2dd627987e1429b169dbcd460bf2a Mon Sep 17 00:00:00 2001 From: jvoisin Date: Mon, 30 Nov 2020 17:01:28 +0100 Subject: Fix an other type mismatch in zend_compile_string --- src/sp_sloppy.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'src') diff --git a/src/sp_sloppy.c b/src/sp_sloppy.c index a2d6b43..d9c9e8d 100644 --- a/src/sp_sloppy.c +++ b/src/sp_sloppy.c @@ -26,7 +26,7 @@ static void modify_opcode(zend_op_array* opline) { } #if PHP_VERSION_ID >= 80000 -ZEND_API zend_op_array* sp_compile_string(zend_string* source_string, char* filename) { +ZEND_API zend_op_array* sp_compile_string(zend_string* source_string, const char* filename) { #else ZEND_API zend_op_array* sp_compile_string(zval* source_string, char* filename) { #endif -- cgit v1.3 From 3b68dad2122d7e4a87a60f7161b7bc35d7c9b708 Mon Sep 17 00:00:00 2001 From: jvoisin Date: Tue, 1 Dec 2020 09:47:51 +0100 Subject: In tests, don't `die("skip")` but `print "skip"` instead (#358) This is required since the `die` is making php8 choke--- src/tests/broken_configuration/broken_conf_invalid_filename.phpt | 2 +- src/tests/broken_configuration/broken_conf_invalid_log_media.phpt | 2 +- src/tests/broken_configuration/broken_conf_invalid_type.phpt | 2 +- src/tests/broken_configuration/broken_conf_wrong_type.phpt | 4 ++-- src/tests/broken_configuration/broken_invalid_client_ip4.phpt | 2 +- src/tests/broken_configuration/broken_regexp.phpt | 2 +- src/tests/broken_configuration/broken_unmatching_brackets.phpt | 2 +- src/tests/broken_configuration/encrypt_regexp_cookies_bad_regexp.phpt | 2 +- src/tests/config_typo3.phpt | 2 +- src/tests/cookies_encryption/encrypt_cookies.phpt | 2 +- src/tests/cookies_encryption/encrypt_cookies2.phpt | 2 +- src/tests/cookies_encryption/encrypt_cookies3.phpt | 2 +- src/tests/cookies_encryption/encrypt_cookies4.phpt | 2 +- src/tests/cookies_encryption/encrypt_cookies_empty_env.phpt | 2 +- src/tests/cookies_encryption/encrypt_cookies_invalid_decryption.phpt | 2 +- src/tests/cookies_encryption/encrypt_cookies_invalid_decryption2.phpt | 2 +- src/tests/cookies_encryption/encrypt_cookies_invalid_decryption3.phpt | 2 +- .../encrypt_cookies_invalid_decryption_short_cookie.phpt | 2 +- .../encrypt_cookies_invalid_decryption_simulation.phpt | 2 +- src/tests/cookies_encryption/encrypt_regexp_cookies.phpt | 2 +- src/tests/cookies_encryption/encrypt_regexp_cookies2.phpt | 2 +- src/tests/cookies_encryption/encrypt_regexp_cookies3.phpt | 2 +- src/tests/cookies_encryption/encrypt_regexp_cookies4.phpt | 2 +- src/tests/cookies_encryption/encrypt_regexp_cookies_empty_env.phpt | 2 +- .../cookies_encryption/encrypt_regexp_cookies_invalid_decryption.phpt | 2 +- .../encrypt_regexp_cookies_invalid_decryption2.phpt | 2 +- .../encrypt_regexp_cookies_invalid_decryption3.phpt | 2 +- src/tests/cookies_encryption/setcookie.phpt | 2 +- src/tests/cookies_encryption_warning/encrypt_cookies_no_env.phpt | 2 +- src/tests/cookies_encryption_warning/encrypt_cookies_no_key.phpt | 2 +- .../cookies_encryption_warning/encrypt_regexp_cookies_no_env.phpt | 2 +- .../cookies_encryption_warning/encrypt_regexp_cookies_no_key.phpt | 2 +- src/tests/disable_function/disabled_function_echo.phpt | 2 +- src/tests/disable_function/disabled_function_echo_2.phpt | 2 +- src/tests/disable_function/disabled_function_echo_local_var.phpt | 2 +- .../disable_function/disabled_function_ensure_client_valid_certs.phpt | 4 ++-- ...disabled_function_ensure_client_valid_certs_curl_multi_setopt.phpt | 4 ++-- ...disabled_function_ensure_client_valid_certs_curl_setopt_array.phpt | 4 ++-- .../disable_function/disabled_function_ensure_server_valid_certs.phpt | 4 ++-- ...disabled_function_ensure_server_valid_certs_curl_multi_setopt.phpt | 4 ++-- src/tests/disable_function/disabled_function_local_var.phpt | 2 +- src/tests/disable_function/disabled_function_local_var_10.phpt | 2 +- src/tests/disable_function/disabled_function_local_var_2.phpt | 2 +- src/tests/disable_function/disabled_function_local_var_3.phpt | 2 +- src/tests/disable_function/disabled_function_local_var_4.phpt | 2 +- src/tests/disable_function/disabled_function_local_var_5.phpt | 2 +- src/tests/disable_function/disabled_function_local_var_6.phpt | 2 +- src/tests/disable_function/disabled_function_local_var_7.phpt | 2 +- src/tests/disable_function/disabled_function_local_var_8.phpt | 2 +- src/tests/disable_function/disabled_function_local_var_9.phpt | 2 +- src/tests/disable_function/disabled_function_local_var_const.phpt | 2 +- src/tests/disable_function/disabled_function_local_var_crash.phpt | 2 +- src/tests/disable_function/disabled_function_local_var_obj.phpt | 2 +- src/tests/disable_function/disabled_function_param.phpt | 2 +- src/tests/disable_function/disabled_function_print.phpt | 2 +- src/tests/disable_function/disabled_function_super_global_var.phpt | 2 +- src/tests/disable_function/disabled_functions.phpt | 2 +- .../disable_function/disabled_functions_callback_called_file_r.phpt | 2 +- src/tests/disable_function/disabled_functions_called_file_r.phpt | 2 +- src/tests/disable_function/disabled_functions_chain.phpt | 2 +- src/tests/disable_function/disabled_functions_chain_call_skip.phpt | 2 +- .../disable_function/disabled_functions_chain_call_user_func.phpt | 2 +- .../disable_function/disabled_functions_chain_call_user_func_ret.phpt | 2 +- src/tests/disable_function/disabled_functions_chain_not_matching.phpt | 2 +- src/tests/disable_function/disabled_functions_cidr.phpt | 2 +- src/tests/disable_function/disabled_functions_cidr_6.phpt | 2 +- src/tests/disable_function/disabled_functions_cidr_x_fwd_for.phpt | 2 +- .../disabled_functions_cidr_x_fwd_for_remote_addr.phpt | 2 +- src/tests/disable_function/disabled_functions_die.phpt | 2 +- src/tests/disable_function/disabled_functions_drop_include.phpt | 2 +- .../disable_function/disabled_functions_drop_include_simulation.phpt | 2 +- src/tests/disable_function/disabled_functions_eval.phpt | 2 +- src/tests/disable_function/disabled_functions_eval_filename.phpt | 2 +- src/tests/disable_function/disabled_functions_eval_simulation.phpt | 2 +- src/tests/disable_function/disabled_functions_eval_user.phpt | 2 +- src/tests/disable_function/disabled_functions_exit.phpt | 2 +- src/tests/disable_function/disabled_functions_filename_r.phpt | 2 +- src/tests/disable_function/disabled_functions_include_once.phpt | 2 +- src/tests/disable_function/disabled_functions_include_simulation.phpt | 2 +- src/tests/disable_function/disabled_functions_local_var_array.phpt | 2 +- .../disable_function/disabled_functions_local_var_array_key.phpt | 2 +- .../disabled_functions_local_var_array_not_array.phpt | 2 +- src/tests/disable_function/disabled_functions_mb.phpt | 2 +- src/tests/disable_function/disabled_functions_method.phpt | 2 +- src/tests/disable_function/disabled_functions_name_r.phpt | 2 +- src/tests/disable_function/disabled_functions_name_regexp_type.phpt | 2 +- src/tests/disable_function/disabled_functions_name_type.phpt | 2 +- src/tests/disable_function/disabled_functions_namespace.phpt | 2 +- src/tests/disable_function/disabled_functions_noconf.phpt | 2 +- src/tests/disable_function/disabled_functions_nul_byte.phpt | 2 +- src/tests/disable_function/disabled_functions_param.phpt | 2 +- src/tests/disable_function/disabled_functions_param_alias.phpt | 2 +- src/tests/disable_function/disabled_functions_param_allow.phpt | 2 +- src/tests/disable_function/disabled_functions_param_array.phpt | 2 +- src/tests/disable_function/disabled_functions_param_array_deref.phpt | 2 +- .../disable_function/disabled_functions_param_array_no_value.phpt | 2 +- src/tests/disable_function/disabled_functions_param_array_r.phpt | 2 +- src/tests/disable_function/disabled_functions_param_array_r_keys.phpt | 2 +- .../disabled_functions_param_array_several_levels.phpt | 2 +- .../disabled_functions_param_array_several_levels_int.phpt | 2 +- .../disabled_functions_param_array_several_levels_keys.phpt | 2 +- .../disabled_functions_param_array_several_levels_keys_int.phpt | 2 +- src/tests/disable_function/disabled_functions_param_broken_line.phpt | 2 +- src/tests/disable_function/disabled_functions_param_int.phpt | 2 +- src/tests/disable_function/disabled_functions_param_invalid_pos.phpt | 2 +- src/tests/disable_function/disabled_functions_param_line.phpt | 2 +- src/tests/disable_function/disabled_functions_param_pos.phpt | 2 +- src/tests/disable_function/disabled_functions_param_pos2.phpt | 2 +- src/tests/disable_function/disabled_functions_param_r.phpt | 2 +- .../disable_function/disabled_functions_param_str_representation.phpt | 2 +- src/tests/disable_function/disabled_functions_parse_class.phpt | 2 +- src/tests/disable_function/disabled_functions_pos_type.phpt | 2 +- src/tests/disable_function/disabled_functions_regexp_multiple.phpt | 2 +- .../disabled_functions_register_shutdown_function.phpt | 2 +- .../disable_function/disabled_functions_register_tick_function.phpt | 2 +- src/tests/disable_function/disabled_functions_require.phpt | 2 +- src/tests/disable_function/disabled_functions_require_allow.phpt | 2 +- src/tests/disable_function/disabled_functions_require_once.phpt | 2 +- src/tests/disable_function/disabled_functions_require_simulation.phpt | 2 +- src/tests/disable_function/disabled_functions_ret.phpt | 2 +- src/tests/disable_function/disabled_functions_ret2.phpt | 2 +- src/tests/disable_function/disabled_functions_ret3.phpt | 2 +- src/tests/disable_function/disabled_functions_ret_allow.phpt | 2 +- src/tests/disable_function/disabled_functions_ret_allow_value.phpt | 2 +- src/tests/disable_function/disabled_functions_ret_right_hash.phpt | 2 +- src/tests/disable_function/disabled_functions_ret_simulation.phpt | 2 +- src/tests/disable_function/disabled_functions_ret_type.phpt | 2 +- src/tests/disable_function/disabled_functions_ret_type_array.phpt | 2 +- src/tests/disable_function/disabled_functions_ret_type_double.phpt | 2 +- src/tests/disable_function/disabled_functions_ret_type_long.phpt | 2 +- src/tests/disable_function/disabled_functions_ret_type_null.phpt | 2 +- src/tests/disable_function/disabled_functions_ret_type_object.phpt | 2 +- src/tests/disable_function/disabled_functions_ret_type_resource.phpt | 2 +- src/tests/disable_function/disabled_functions_ret_type_str.phpt | 2 +- src/tests/disable_function/disabled_functions_ret_type_true.phpt | 2 +- src/tests/disable_function/disabled_functions_ret_user.phpt | 2 +- src/tests/disable_function/disabled_functions_ret_user_used.phpt | 2 +- src/tests/disable_function/disabled_functions_ret_val.phpt | 2 +- src/tests/disable_function/disabled_functions_ret_val_dump.phpt | 2 +- src/tests/disable_function/disabled_functions_ret_val_rx.phpt | 2 +- src/tests/disable_function/disabled_functions_right_hash.phpt | 2 +- src/tests/disable_function/disabled_functions_runtime.phpt | 2 +- src/tests/disable_function/disabled_functions_upper.phpt | 2 +- src/tests/disable_function/disabled_functions_variadic.phpt | 2 +- src/tests/disable_function/disabled_functions_zero_cidr.phpt | 2 +- src/tests/disable_function/disabled_native_functions_indirect.phpt | 2 +- src/tests/disable_function/disabled_user_functions.phpt | 2 +- src/tests/disable_function/disabled_user_functions_indirect.phpt | 2 +- src/tests/dump_request/dump_eval_blacklist.phpt | 2 +- src/tests/dump_request/dump_eval_whitelist.phpt | 2 +- src/tests/dump_request/dump_segfault1.phpt | 2 +- src/tests/eval_blacklist/eval_backlist.phpt | 2 +- src/tests/eval_blacklist/eval_backlist_call_user_func.phpt | 2 +- src/tests/eval_blacklist/eval_backlist_chained.phpt | 2 +- src/tests/eval_blacklist/eval_backlist_list.phpt | 2 +- src/tests/eval_blacklist/eval_backlist_simulation.phpt | 2 +- src/tests/eval_blacklist/eval_backlist_whitelist.phpt | 2 +- src/tests/eval_blacklist/eval_backlist_whitelist_builtin.phpt | 2 +- src/tests/eval_blacklist/eval_whitelist.phpt | 2 +- src/tests/eval_blacklist/eval_whitelist_builtin.phpt | 2 +- src/tests/eval_blacklist/eval_whitelist_include_then_user.phpt | 2 +- src/tests/eval_blacklist/eval_whitelist_simulation.phpt | 2 +- src/tests/eval_blacklist/eval_whitelist_user_then_builtin.phpt | 2 +- src/tests/eval_blacklist/nested_eval_blacklist.phpt | 2 +- src/tests/eval_blacklist/nested_eval_blacklist2.phpt | 2 +- src/tests/glob_config.phpt | 2 +- src/tests/multi_config.phpt | 2 +- src/tests/rips_configuration.phpt | 2 +- src/tests/samesite_cookies.phpt | 2 +- src/tests/session_encryption/crypt_session_corrupted_session.phpt | 2 +- src/tests/session_encryption/crypt_session_invalid.phpt | 2 +- src/tests/session_encryption/crypt_session_invalid_simul.phpt | 2 +- src/tests/session_encryption/crypt_session_read_uncrypt.phpt | 2 +- src/tests/session_encryption/crypt_session_valid.phpt | 2 +- src/tests/session_encryption/crypt_session_valid_simul.phpt | 2 +- src/tests/session_encryption/set_custom_session_handler.phpt | 2 +- src/tests/session_encryption/set_custom_session_handler2.phpt | 2 +- src/tests/session_encryption/set_custom_session_handler_ini.phpt | 2 +- src/tests/shipped_configuration.phpt | 2 +- src/tests/stream_wrapper/stream_wrapper_restore.phpt | 2 +- src/tests/upload_validation/upload_validation_real.phpt | 2 +- 181 files changed, 187 insertions(+), 187 deletions(-) (limited to 'src') diff --git a/src/tests/broken_configuration/broken_conf_invalid_filename.phpt b/src/tests/broken_configuration/broken_conf_invalid_filename.phpt index aed30c8..8f4c501 100644 --- a/src/tests/broken_configuration/broken_conf_invalid_filename.phpt +++ b/src/tests/broken_configuration/broken_conf_invalid_filename.phpt @@ -1,7 +1,7 @@ --TEST-- Broken configuration filename without absolute path --SKIPIF-- - + --INI-- sp.configuration_file={PWD}/config/broken_conf_invalid_filename.ini --FILE-- diff --git a/src/tests/broken_configuration/broken_conf_invalid_log_media.phpt b/src/tests/broken_configuration/broken_conf_invalid_log_media.phpt index 9c516bc..bc048b3 100644 --- a/src/tests/broken_configuration/broken_conf_invalid_log_media.phpt +++ b/src/tests/broken_configuration/broken_conf_invalid_log_media.phpt @@ -1,7 +1,7 @@ --TEST-- Broken configuration filename with improper log media --SKIPIF-- - + --INI-- sp.configuration_file={PWD}/config/broken_conf_invalid_log_media.ini --FILE-- diff --git a/src/tests/broken_configuration/broken_conf_invalid_type.phpt b/src/tests/broken_configuration/broken_conf_invalid_type.phpt index f5b0ce5..b73cdd0 100644 --- a/src/tests/broken_configuration/broken_conf_invalid_type.phpt +++ b/src/tests/broken_configuration/broken_conf_invalid_type.phpt @@ -1,7 +1,7 @@ --TEST-- Broken conf with wrong type --SKIPIF-- - + --INI-- sp.configuration_file={PWD}/config/broken_conf_invalid_type.ini --FILE-- diff --git a/src/tests/broken_configuration/broken_conf_wrong_type.phpt b/src/tests/broken_configuration/broken_conf_wrong_type.phpt index 150cda0..32e8499 100644 --- a/src/tests/broken_configuration/broken_conf_wrong_type.phpt +++ b/src/tests/broken_configuration/broken_conf_wrong_type.phpt @@ -1,7 +1,7 @@ --TEST-- Broken conf with wrong type --SKIPIF-- - + --INI-- sp.configuration_file={PWD}/config/broken_conf_wrong_type.ini --FILE-- @@ -11,4 +11,4 @@ PHP Fatal error: [snuffleupagus][0.0.0.0][error][log] .ret_type() is expecting Fatal error: [snuffleupagus][0.0.0.0][error][log] .ret_type() is expecting a valid php type ('false', 'true', 'array'. 'object', 'long', 'double', 'null', 'resource', 'reference', 'undef') on line 5 in Unknown on line 0 Fatal error: [snuffleupagus][0.0.0.0][config][log] Invalid configuration file in Unknown on line 0 -Could not startup. \ No newline at end of file +Could not startup. diff --git a/src/tests/broken_configuration/broken_invalid_client_ip4.phpt b/src/tests/broken_configuration/broken_invalid_client_ip4.phpt index cbc17e7..a96b059 100644 --- a/src/tests/broken_configuration/broken_invalid_client_ip4.phpt +++ b/src/tests/broken_configuration/broken_invalid_client_ip4.phpt @@ -1,7 +1,7 @@ --TEST-- Invalid client IP --SKIPIF-- - + --ENV-- return << + --INI-- sp.configuration_file={PWD}/config/broken_regexp.ini --FILE-- diff --git a/src/tests/broken_configuration/broken_unmatching_brackets.phpt b/src/tests/broken_configuration/broken_unmatching_brackets.phpt index bba8e0c..46c81f9 100644 --- a/src/tests/broken_configuration/broken_unmatching_brackets.phpt +++ b/src/tests/broken_configuration/broken_unmatching_brackets.phpt @@ -1,7 +1,7 @@ --TEST-- Broken configuration - unmatching brackets --SKIPIF-- - + --INI-- sp.configuration_file={PWD}/config/config_unmatching_brackets.ini --FILE-- diff --git a/src/tests/broken_configuration/encrypt_regexp_cookies_bad_regexp.phpt b/src/tests/broken_configuration/encrypt_regexp_cookies_bad_regexp.phpt index 0b98e73..7a8c909 100644 --- a/src/tests/broken_configuration/encrypt_regexp_cookies_bad_regexp.phpt +++ b/src/tests/broken_configuration/encrypt_regexp_cookies_bad_regexp.phpt @@ -1,7 +1,7 @@ --TEST-- Cookie decryption in ipv4 --SKIPIF-- - + --INI-- sp.configuration_file={PWD}/config/config_encrypted_regexp_cookies_bad_regexp.ini error_reporting=1 diff --git a/src/tests/config_typo3.phpt b/src/tests/config_typo3.phpt index 1b678ca..6545d07 100644 --- a/src/tests/config_typo3.phpt +++ b/src/tests/config_typo3.phpt @@ -1,7 +1,7 @@ --TEST-- Rules for Typo3 --SKIPIF-- - + --INI-- sp.configuration_file={PWD}/../../config/typo3.rules --FILE-- diff --git a/src/tests/cookies_encryption/encrypt_cookies.phpt b/src/tests/cookies_encryption/encrypt_cookies.phpt index d581dbc..49587b7 100644 --- a/src/tests/cookies_encryption/encrypt_cookies.phpt +++ b/src/tests/cookies_encryption/encrypt_cookies.phpt @@ -1,7 +1,7 @@ --TEST-- Cookie decryption in ipv4 --SKIPIF-- - + --INI-- sp.configuration_file={PWD}/config/config_encrypted_cookies.ini --COOKIE-- diff --git a/src/tests/cookies_encryption/encrypt_cookies2.phpt b/src/tests/cookies_encryption/encrypt_cookies2.phpt index 195cb24..18c6b41 100644 --- a/src/tests/cookies_encryption/encrypt_cookies2.phpt +++ b/src/tests/cookies_encryption/encrypt_cookies2.phpt @@ -1,7 +1,7 @@ --TEST-- Cookie encryption in ipv4 --SKIPIF-- - + --INI-- sp.configuration_file={PWD}/config/config_encrypted_regexp_cookies.ini --COOKIE-- diff --git a/src/tests/cookies_encryption/encrypt_cookies3.phpt b/src/tests/cookies_encryption/encrypt_cookies3.phpt index ceb364c..beb4efb 100644 --- a/src/tests/cookies_encryption/encrypt_cookies3.phpt +++ b/src/tests/cookies_encryption/encrypt_cookies3.phpt @@ -1,7 +1,7 @@ --TEST-- Cookie decryption with ipv6 --SKIPIF-- - + --INI-- sp.configuration_file={PWD}/config/config_encrypted_regexp_cookies.ini --COOKIE-- diff --git a/src/tests/cookies_encryption/encrypt_cookies4.phpt b/src/tests/cookies_encryption/encrypt_cookies4.phpt index b644680..da694e5 100644 --- a/src/tests/cookies_encryption/encrypt_cookies4.phpt +++ b/src/tests/cookies_encryption/encrypt_cookies4.phpt @@ -1,7 +1,7 @@ --TEST-- Cookie encryption in ipv6 --SKIPIF-- - + --INI-- sp.configuration_file={PWD}/config/config_encrypted_cookies.ini --COOKIE-- diff --git a/src/tests/cookies_encryption/encrypt_cookies_empty_env.phpt b/src/tests/cookies_encryption/encrypt_cookies_empty_env.phpt index 0cd4460..aeec708 100644 --- a/src/tests/cookies_encryption/encrypt_cookies_empty_env.phpt +++ b/src/tests/cookies_encryption/encrypt_cookies_empty_env.phpt @@ -1,7 +1,7 @@ --TEST-- Cookie encryption - empty environment variable specified --SKIPIF-- - + --INI-- sp.configuration_file={PWD}/config/config_encrypted_cookies_empty_env.ini display_errors=1 diff --git a/src/tests/cookies_encryption/encrypt_cookies_invalid_decryption.phpt b/src/tests/cookies_encryption/encrypt_cookies_invalid_decryption.phpt index 2833819..cc988ce 100644 --- a/src/tests/cookies_encryption/encrypt_cookies_invalid_decryption.phpt +++ b/src/tests/cookies_encryption/encrypt_cookies_invalid_decryption.phpt @@ -1,7 +1,7 @@ --TEST-- Cookie encryption - invalid decryption --SKIPIF-- - + --INI-- sp.configuration_file={PWD}/config/config_encrypted_cookies.ini display_errors=1 diff --git a/src/tests/cookies_encryption/encrypt_cookies_invalid_decryption2.phpt b/src/tests/cookies_encryption/encrypt_cookies_invalid_decryption2.phpt index 5a76999..5ec6af5 100644 --- a/src/tests/cookies_encryption/encrypt_cookies_invalid_decryption2.phpt +++ b/src/tests/cookies_encryption/encrypt_cookies_invalid_decryption2.phpt @@ -1,7 +1,7 @@ --TEST-- Cookie encryption --SKIPIF-- - + --INI-- sp.configuration_file={PWD}/config/config_encrypted_cookies.ini display_errors=1 diff --git a/src/tests/cookies_encryption/encrypt_cookies_invalid_decryption3.phpt b/src/tests/cookies_encryption/encrypt_cookies_invalid_decryption3.phpt index f4afc32..a6afdbe 100644 --- a/src/tests/cookies_encryption/encrypt_cookies_invalid_decryption3.phpt +++ b/src/tests/cookies_encryption/encrypt_cookies_invalid_decryption3.phpt @@ -1,7 +1,7 @@ --TEST-- Cookie encryption --SKIPIF-- - + --INI-- sp.configuration_file={PWD}/config/config_encrypted_cookies.ini --COOKIE-- diff --git a/src/tests/cookies_encryption/encrypt_cookies_invalid_decryption_short_cookie.phpt b/src/tests/cookies_encryption/encrypt_cookies_invalid_decryption_short_cookie.phpt index feb3688..00a2cec 100644 --- a/src/tests/cookies_encryption/encrypt_cookies_invalid_decryption_short_cookie.phpt +++ b/src/tests/cookies_encryption/encrypt_cookies_invalid_decryption_short_cookie.phpt @@ -1,7 +1,7 @@ --TEST-- Cookie encryption - invalid decryption in simulation mode with a short cookie --SKIPIF-- - + --INI-- sp.configuration_file={PWD}/config/config_encrypted_cookies_simulation.ini display_errors=1 diff --git a/src/tests/cookies_encryption/encrypt_cookies_invalid_decryption_simulation.phpt b/src/tests/cookies_encryption/encrypt_cookies_invalid_decryption_simulation.phpt index 3cb13d4..4d8e18d 100644 --- a/src/tests/cookies_encryption/encrypt_cookies_invalid_decryption_simulation.phpt +++ b/src/tests/cookies_encryption/encrypt_cookies_invalid_decryption_simulation.phpt @@ -1,7 +1,7 @@ --TEST-- Cookie encryption - invalid decryption in simulation mode --SKIPIF-- - + --INI-- sp.configuration_file={PWD}/config/config_encrypted_cookies_simulation.ini display_errors=1 diff --git a/src/tests/cookies_encryption/encrypt_regexp_cookies.phpt b/src/tests/cookies_encryption/encrypt_regexp_cookies.phpt index 6bc187a..da44855 100644 --- a/src/tests/cookies_encryption/encrypt_regexp_cookies.phpt +++ b/src/tests/cookies_encryption/encrypt_regexp_cookies.phpt @@ -1,7 +1,7 @@ --TEST-- Cookie decryption in ipv4 --SKIPIF-- - + --INI-- sp.configuration_file={PWD}/config/config_encrypted_regexp_cookies.ini --COOKIE-- diff --git a/src/tests/cookies_encryption/encrypt_regexp_cookies2.phpt b/src/tests/cookies_encryption/encrypt_regexp_cookies2.phpt index 195cb24..18c6b41 100644 --- a/src/tests/cookies_encryption/encrypt_regexp_cookies2.phpt +++ b/src/tests/cookies_encryption/encrypt_regexp_cookies2.phpt @@ -1,7 +1,7 @@ --TEST-- Cookie encryption in ipv4 --SKIPIF-- - + --INI-- sp.configuration_file={PWD}/config/config_encrypted_regexp_cookies.ini --COOKIE-- diff --git a/src/tests/cookies_encryption/encrypt_regexp_cookies3.phpt b/src/tests/cookies_encryption/encrypt_regexp_cookies3.phpt index ceb364c..beb4efb 100644 --- a/src/tests/cookies_encryption/encrypt_regexp_cookies3.phpt +++ b/src/tests/cookies_encryption/encrypt_regexp_cookies3.phpt @@ -1,7 +1,7 @@ --TEST-- Cookie decryption with ipv6 --SKIPIF-- - + --INI-- sp.configuration_file={PWD}/config/config_encrypted_regexp_cookies.ini --COOKIE-- diff --git a/src/tests/cookies_encryption/encrypt_regexp_cookies4.phpt b/src/tests/cookies_encryption/encrypt_regexp_cookies4.phpt index 14d737a..09184a8 100644 --- a/src/tests/cookies_encryption/encrypt_regexp_cookies4.phpt +++ b/src/tests/cookies_encryption/encrypt_regexp_cookies4.phpt @@ -1,7 +1,7 @@ --TEST-- Cookie encryption in ipv6 --SKIPIF-- - + --INI-- sp.configuration_file={PWD}/config/config_encrypted_cookies.ini --COOKIE-- diff --git a/src/tests/cookies_encryption/encrypt_regexp_cookies_empty_env.phpt b/src/tests/cookies_encryption/encrypt_regexp_cookies_empty_env.phpt index 2d8de76..53f2eba 100644 --- a/src/tests/cookies_encryption/encrypt_regexp_cookies_empty_env.phpt +++ b/src/tests/cookies_encryption/encrypt_regexp_cookies_empty_env.phpt @@ -1,7 +1,7 @@ --TEST-- Cookie encryption - empty environment variable specified --SKIPIF-- - + --INI-- sp.configuration_file={PWD}/config/config_encrypted_regexp_cookies_empty_env.ini display_errors=1 diff --git a/src/tests/cookies_encryption/encrypt_regexp_cookies_invalid_decryption.phpt b/src/tests/cookies_encryption/encrypt_regexp_cookies_invalid_decryption.phpt index 20914f3..b101042 100644 --- a/src/tests/cookies_encryption/encrypt_regexp_cookies_invalid_decryption.phpt +++ b/src/tests/cookies_encryption/encrypt_regexp_cookies_invalid_decryption.phpt @@ -1,7 +1,7 @@ --TEST-- Cookie encryption --SKIPIF-- - + --INI-- sp.configuration_file={PWD}/config/config_encrypted_regexp_cookies.ini display_errors=1 diff --git a/src/tests/cookies_encryption/encrypt_regexp_cookies_invalid_decryption2.phpt b/src/tests/cookies_encryption/encrypt_regexp_cookies_invalid_decryption2.phpt index 9a6bc9c..29444dc 100644 --- a/src/tests/cookies_encryption/encrypt_regexp_cookies_invalid_decryption2.phpt +++ b/src/tests/cookies_encryption/encrypt_regexp_cookies_invalid_decryption2.phpt @@ -1,7 +1,7 @@ --TEST-- Cookie encryption --SKIPIF-- - + --INI-- sp.configuration_file={PWD}/config/config_encrypted_regexp_cookies.ini display_errors=1 diff --git a/src/tests/cookies_encryption/encrypt_regexp_cookies_invalid_decryption3.phpt b/src/tests/cookies_encryption/encrypt_regexp_cookies_invalid_decryption3.phpt index 28ffaad..ea26b00 100644 --- a/src/tests/cookies_encryption/encrypt_regexp_cookies_invalid_decryption3.phpt +++ b/src/tests/cookies_encryption/encrypt_regexp_cookies_invalid_decryption3.phpt @@ -1,7 +1,7 @@ --TEST-- Cookie encryption --SKIPIF-- - + --INI-- sp.configuration_file={PWD}/config/config_encrypted_regexp_cookies.ini --COOKIE-- diff --git a/src/tests/cookies_encryption/setcookie.phpt b/src/tests/cookies_encryption/setcookie.phpt index ba1d1c1..87a72c6 100644 --- a/src/tests/cookies_encryption/setcookie.phpt +++ b/src/tests/cookies_encryption/setcookie.phpt @@ -1,7 +1,7 @@ --TEST-- Set cookies. --SKIPIF-- - + --INI-- sp.configuration_file={PWD}/config/config_encrypted_cookies.ini --COOKIE-- diff --git a/src/tests/cookies_encryption_warning/encrypt_cookies_no_env.phpt b/src/tests/cookies_encryption_warning/encrypt_cookies_no_env.phpt index 7ef193a..015c159 100644 --- a/src/tests/cookies_encryption_warning/encrypt_cookies_no_env.phpt +++ b/src/tests/cookies_encryption_warning/encrypt_cookies_no_env.phpt @@ -1,7 +1,7 @@ --TEST-- Cookie encryption - no environment variable specified --SKIPIF-- - + --INI-- sp.configuration_file={PWD}/config/encrypt_cookies_no_env.ini display_errors=1 diff --git a/src/tests/cookies_encryption_warning/encrypt_cookies_no_key.phpt b/src/tests/cookies_encryption_warning/encrypt_cookies_no_key.phpt index a633652..42f5509 100644 --- a/src/tests/cookies_encryption_warning/encrypt_cookies_no_key.phpt +++ b/src/tests/cookies_encryption_warning/encrypt_cookies_no_key.phpt @@ -1,7 +1,7 @@ --TEST-- Cookie encryption - no encryption key specified --SKIPIF-- - + --INI-- sp.configuration_file={PWD}/config/encrypt_cookies_no_key.ini display_errors=1 diff --git a/src/tests/cookies_encryption_warning/encrypt_regexp_cookies_no_env.phpt b/src/tests/cookies_encryption_warning/encrypt_regexp_cookies_no_env.phpt index d40b9a9..163cb26 100644 --- a/src/tests/cookies_encryption_warning/encrypt_regexp_cookies_no_env.phpt +++ b/src/tests/cookies_encryption_warning/encrypt_regexp_cookies_no_env.phpt @@ -1,7 +1,7 @@ --TEST-- Cookie encryption - no environment variable specified --SKIPIF-- - + --INI-- sp.configuration_file={PWD}/config/encrypt_regexp_cookies_no_env.ini display_errors=1 diff --git a/src/tests/cookies_encryption_warning/encrypt_regexp_cookies_no_key.phpt b/src/tests/cookies_encryption_warning/encrypt_regexp_cookies_no_key.phpt index d03f28f..df31f2e 100644 --- a/src/tests/cookies_encryption_warning/encrypt_regexp_cookies_no_key.phpt +++ b/src/tests/cookies_encryption_warning/encrypt_regexp_cookies_no_key.phpt @@ -1,7 +1,7 @@ --TEST-- Cookie encryption - no encryption key specified --SKIPIF-- - + --INI-- sp.configuration_file={PWD}/config/encrypt_regexp_cookies_no_key.ini display_errors=1 diff --git a/src/tests/disable_function/disabled_function_echo.phpt b/src/tests/disable_function/disabled_function_echo.phpt index 9e5d3e0..5b66880 100644 --- a/src/tests/disable_function/disabled_function_echo.phpt +++ b/src/tests/disable_function/disabled_function_echo.phpt @@ -1,7 +1,7 @@ --TEST-- Echo hooking --SKIPIF-- - + --INI-- sp.configuration_file={PWD}/config/disabled_function_echo.ini --FILE-- diff --git a/src/tests/disable_function/disabled_function_echo_2.phpt b/src/tests/disable_function/disabled_function_echo_2.phpt index 55a7abe..60cc2f7 100644 --- a/src/tests/disable_function/disabled_function_echo_2.phpt +++ b/src/tests/disable_function/disabled_function_echo_2.phpt @@ -1,7 +1,7 @@ --TEST-- Echo hooking --SKIPIF-- - + --INI-- sp.configuration_file={PWD}/config/disabled_function_echo.ini --FILE-- diff --git a/src/tests/disable_function/disabled_function_echo_local_var.phpt b/src/tests/disable_function/disabled_function_echo_local_var.phpt index dbc7f4e..3a886f2 100644 --- a/src/tests/disable_function/disabled_function_echo_local_var.phpt +++ b/src/tests/disable_function/disabled_function_echo_local_var.phpt @@ -1,7 +1,7 @@ --TEST-- Echo hooking --SKIPIF-- - + --INI-- sp.configuration_file={PWD}/config/disabled_function_echo.ini --FILE-- diff --git a/src/tests/disable_function/disabled_function_ensure_client_valid_certs.phpt b/src/tests/disable_function/disabled_function_ensure_client_valid_certs.phpt index 0cca9d1..9872374 100644 --- a/src/tests/disable_function/disabled_function_ensure_client_valid_certs.phpt +++ b/src/tests/disable_function/disabled_function_ensure_client_valid_certs.phpt @@ -2,8 +2,8 @@ Disable functions - Ensure that client certificates validation can't be disabled --SKIPIF-- --EXTENSIONS-- curl diff --git a/src/tests/disable_function/disabled_function_ensure_client_valid_certs_curl_multi_setopt.phpt b/src/tests/disable_function/disabled_function_ensure_client_valid_certs_curl_multi_setopt.phpt index 6470181..45ae95e 100644 --- a/src/tests/disable_function/disabled_function_ensure_client_valid_certs_curl_multi_setopt.phpt +++ b/src/tests/disable_function/disabled_function_ensure_client_valid_certs_curl_multi_setopt.phpt @@ -2,8 +2,8 @@ Disable functions - Ensure that client certificates validation can't be disabled via `curl_multi_setopt` --SKIPIF-- --EXTENSIONS-- curl diff --git a/src/tests/disable_function/disabled_function_ensure_client_valid_certs_curl_setopt_array.phpt b/src/tests/disable_function/disabled_function_ensure_client_valid_certs_curl_setopt_array.phpt index bae19e6..93ed020 100644 --- a/src/tests/disable_function/disabled_function_ensure_client_valid_certs_curl_setopt_array.phpt +++ b/src/tests/disable_function/disabled_function_ensure_client_valid_certs_curl_setopt_array.phpt @@ -2,8 +2,8 @@ Disable functions - Ensure that client certificates validation can't be disabled via `curl_setopt_array` --SKIPIF-- --EXTENSIONS-- curl diff --git a/src/tests/disable_function/disabled_function_ensure_server_valid_certs.phpt b/src/tests/disable_function/disabled_function_ensure_server_valid_certs.phpt index dc3ee33..6e027de 100644 --- a/src/tests/disable_function/disabled_function_ensure_server_valid_certs.phpt +++ b/src/tests/disable_function/disabled_function_ensure_server_valid_certs.phpt @@ -2,8 +2,8 @@ Disable functions - Ensure that server certificates validation can't be disabled --SKIPIF-- --EXTENSIONS-- curl diff --git a/src/tests/disable_function/disabled_function_ensure_server_valid_certs_curl_multi_setopt.phpt b/src/tests/disable_function/disabled_function_ensure_server_valid_certs_curl_multi_setopt.phpt index 65b9020..32013b5 100644 --- a/src/tests/disable_function/disabled_function_ensure_server_valid_certs_curl_multi_setopt.phpt +++ b/src/tests/disable_function/disabled_function_ensure_server_valid_certs_curl_multi_setopt.phpt @@ -2,8 +2,8 @@ Disable functions - Ensure that server certificates validation can't be disabled via `curl_multi_setopt` --SKIPIF-- --EXTENSIONS-- curl diff --git a/src/tests/disable_function/disabled_function_local_var.phpt b/src/tests/disable_function/disabled_function_local_var.phpt index 58a5b77..c28fd8c 100644 --- a/src/tests/disable_function/disabled_function_local_var.phpt +++ b/src/tests/disable_function/disabled_function_local_var.phpt @@ -1,7 +1,7 @@ --TEST-- Disable functions - match on a local variable --SKIPIF-- - + --INI-- sp.configuration_file={PWD}/config/disabled_function_local_var.ini --FILE-- diff --git a/src/tests/disable_function/disabled_function_local_var_10.phpt b/src/tests/disable_function/disabled_function_local_var_10.phpt index 7f10740..eefb161 100644 --- a/src/tests/disable_function/disabled_function_local_var_10.phpt +++ b/src/tests/disable_function/disabled_function_local_var_10.phpt @@ -1,7 +1,7 @@ --TEST-- Disable functions - match on a local variable --SKIPIF-- - + --INI-- sp.configuration_file={PWD}/config/disabled_function_local_var.ini --FILE-- diff --git a/src/tests/disable_function/disabled_function_local_var_2.phpt b/src/tests/disable_function/disabled_function_local_var_2.phpt index d216bd2..076c3c5 100644 --- a/src/tests/disable_function/disabled_function_local_var_2.phpt +++ b/src/tests/disable_function/disabled_function_local_var_2.phpt @@ -1,7 +1,7 @@ --TEST-- Disable functions - match on a local variable --SKIPIF-- - + --INI-- sp.configuration_file={PWD}/config/disabled_function_local_var.ini --FILE-- diff --git a/src/tests/disable_function/disabled_function_local_var_3.phpt b/src/tests/disable_function/disabled_function_local_var_3.phpt index 7fb6c07..f404682 100644 --- a/src/tests/disable_function/disabled_function_local_var_3.phpt +++ b/src/tests/disable_function/disabled_function_local_var_3.phpt @@ -1,7 +1,7 @@ --TEST-- Disable functions - match on a local variable --SKIPIF-- - + --INI-- sp.configuration_file={PWD}/config/disabled_function_local_var.ini --FILE-- diff --git a/src/tests/disable_function/disabled_function_local_var_4.phpt b/src/tests/disable_function/disabled_function_local_var_4.phpt index 101ed38..f290a8b 100644 --- a/src/tests/disable_function/disabled_function_local_var_4.phpt +++ b/src/tests/disable_function/disabled_function_local_var_4.phpt @@ -1,7 +1,7 @@ --TEST-- Disable functions - match on a local variable --SKIPIF-- - + --INI-- sp.configuration_file={PWD}/config/disabled_function_local_var_2.ini --FILE-- diff --git a/src/tests/disable_function/disabled_function_local_var_5.phpt b/src/tests/disable_function/disabled_function_local_var_5.phpt index 64c3e78..7e592cd 100644 --- a/src/tests/disable_function/disabled_function_local_var_5.phpt +++ b/src/tests/disable_function/disabled_function_local_var_5.phpt @@ -1,7 +1,7 @@ --TEST-- Disable functions - match on a local variable --SKIPIF-- - + --INI-- sp.configuration_file={PWD}/config/disabled_function_local_var.ini --FILE-- diff --git a/src/tests/disable_function/disabled_function_local_var_6.phpt b/src/tests/disable_function/disabled_function_local_var_6.phpt index 7cc6515..b2a16bf 100644 --- a/src/tests/disable_function/disabled_function_local_var_6.phpt +++ b/src/tests/disable_function/disabled_function_local_var_6.phpt @@ -1,7 +1,7 @@ --TEST-- Disable functions - match on a local variable --SKIPIF-- - + --INI-- sp.configuration_file={PWD}/config/disabled_function_local_var.ini --FILE-- diff --git a/src/tests/disable_function/disabled_function_local_var_7.phpt b/src/tests/disable_function/disabled_function_local_var_7.phpt index 5b19070..e15a430 100644 --- a/src/tests/disable_function/disabled_function_local_var_7.phpt +++ b/src/tests/disable_function/disabled_function_local_var_7.phpt @@ -1,7 +1,7 @@ --TEST-- Disable functions - match on a local variable --SKIPIF-- - + --INI-- sp.configuration_file={PWD}/config/disabled_function_local_var.ini --FILE-- diff --git a/src/tests/disable_function/disabled_function_local_var_8.phpt b/src/tests/disable_function/disabled_function_local_var_8.phpt index a80ac04..4f1b4c5 100644 --- a/src/tests/disable_function/disabled_function_local_var_8.phpt +++ b/src/tests/disable_function/disabled_function_local_var_8.phpt @@ -1,7 +1,7 @@ --TEST-- Disable functions - match on a local variable --SKIPIF-- - + --INI-- sp.configuration_file={PWD}/config/disabled_function_local_var.ini --FILE-- diff --git a/src/tests/disable_function/disabled_function_local_var_9.phpt b/src/tests/disable_function/disabled_function_local_var_9.phpt index 390f046..eddb1ea 100644 --- a/src/tests/disable_function/disabled_function_local_var_9.phpt +++ b/src/tests/disable_function/disabled_function_local_var_9.phpt @@ -1,7 +1,7 @@ --TEST-- Disable functions - match on a local variable --SKIPIF-- - + --INI-- sp.configuration_file={PWD}/config/disabled_function_local_var.ini --FILE-- diff --git a/src/tests/disable_function/disabled_function_local_var_const.phpt b/src/tests/disable_function/disabled_function_local_var_const.phpt index 7f275a1..a0912d9 100644 --- a/src/tests/disable_function/disabled_function_local_var_const.phpt +++ b/src/tests/disable_function/disabled_function_local_var_const.phpt @@ -1,7 +1,7 @@ --TEST-- Disable functions - match on a constant --SKIPIF-- - + --INI-- sp.configuration_file={PWD}/config/disabled_function_local_var_const.ini --FILE-- diff --git a/src/tests/disable_function/disabled_function_local_var_crash.phpt b/src/tests/disable_function/disabled_function_local_var_crash.phpt index 3381b6c..f36b2c7 100644 --- a/src/tests/disable_function/disabled_function_local_var_crash.phpt +++ b/src/tests/disable_function/disabled_function_local_var_crash.phpt @@ -1,7 +1,7 @@ --TEST-- Disable functions - match on a local variable --SKIPIF-- - + --INI-- sp.configuration_file={PWD}/config/disabled_function_local_var.ini --FILE-- diff --git a/src/tests/disable_function/disabled_function_local_var_obj.phpt b/src/tests/disable_function/disabled_function_local_var_obj.phpt index 90a192d..684933a 100644 --- a/src/tests/disable_function/disabled_function_local_var_obj.phpt +++ b/src/tests/disable_function/disabled_function_local_var_obj.phpt @@ -1,7 +1,7 @@ --TEST-- Disable functions - match on a local variable --SKIPIF-- - + --INI-- sp.configuration_file={PWD}/config/disabled_function_local_var_obj.ini --FILE-- diff --git a/src/tests/disable_function/disabled_function_param.phpt b/src/tests/disable_function/disabled_function_param.phpt index 4c3c2e8..bbf05f0 100644 --- a/src/tests/disable_function/disabled_function_param.phpt +++ b/src/tests/disable_function/disabled_function_param.phpt @@ -1,7 +1,7 @@ --TEST-- Disable functions - match on a param --SKIPIF-- - + --INI-- sp.configuration_file={PWD}/config/disabled_function_param.ini --FILE-- diff --git a/src/tests/disable_function/disabled_function_print.phpt b/src/tests/disable_function/disabled_function_print.phpt index 8b61542..ec1b04f 100644 --- a/src/tests/disable_function/disabled_function_print.phpt +++ b/src/tests/disable_function/disabled_function_print.phpt @@ -1,7 +1,7 @@ --TEST-- Echo hooking --SKIPIF-- - + --INI-- sp.configuration_file={PWD}/config/disabled_function_print.ini --FILE-- diff --git a/src/tests/disable_function/disabled_function_super_global_var.phpt b/src/tests/disable_function/disabled_function_super_global_var.phpt index f5385b6..6232e19 100644 --- a/src/tests/disable_function/disabled_function_super_global_var.phpt +++ b/src/tests/disable_function/disabled_function_super_global_var.phpt @@ -1,7 +1,7 @@ --TEST-- Disable functions - match on a super global --SKIPIF-- - + --INI-- sp.configuration_file={PWD}/config/disabled_function_super_global_var.ini --GET-- diff --git a/src/tests/disable_function/disabled_functions.phpt b/src/tests/disable_function/disabled_functions.phpt index 00e2827..cda7c20 100644 --- a/src/tests/disable_function/disabled_functions.phpt +++ b/src/tests/disable_function/disabled_functions.phpt @@ -1,7 +1,7 @@ --TEST-- Disable functions --SKIPIF-- - + --INI-- sp.configuration_file={PWD}/config/disabled_functions.ini --FILE-- diff --git a/src/tests/disable_function/disabled_functions_callback_called_file_r.phpt b/src/tests/disable_function/disabled_functions_callback_called_file_r.phpt index 41c76bb..ec75d74 100644 --- a/src/tests/disable_function/disabled_functions_callback_called_file_r.phpt +++ b/src/tests/disable_function/disabled_functions_callback_called_file_r.phpt @@ -1,7 +1,7 @@ --TEST-- Disable functions by matching on the filename_r where the callback function is called, and not defined --SKIPIF-- - + --INI-- sp.configuration_file={PWD}/config/config_disabled_functions_callback_called_file_r.ini --FILE-- diff --git a/src/tests/disable_function/disabled_functions_called_file_r.phpt b/src/tests/disable_function/disabled_functions_called_file_r.phpt index 58d2f5a..dde26f7 100644 --- a/src/tests/disable_function/disabled_functions_called_file_r.phpt +++ b/src/tests/disable_function/disabled_functions_called_file_r.phpt @@ -1,7 +1,7 @@ --TEST-- Disable functions by matching on the filename_r where the function is called, and not defined --SKIPIF-- - + --INI-- sp.configuration_file={PWD}/config/config_disabled_functions_called_file_r.ini --FILE-- diff --git a/src/tests/disable_function/disabled_functions_chain.phpt b/src/tests/disable_function/disabled_functions_chain.phpt index 757eccf..7edf863 100644 --- a/src/tests/disable_function/disabled_functions_chain.phpt +++ b/src/tests/disable_function/disabled_functions_chain.phpt @@ -1,7 +1,7 @@ --TEST-- Disable functions by matching the calltrace --SKIPIF-- - + --INI-- sp.configuration_file={PWD}/config/config_disabled_functions_chain.ini --FILE-- diff --git a/src/tests/disable_function/disabled_functions_chain_call_skip.phpt b/src/tests/disable_function/disabled_functions_chain_call_skip.phpt index 9ff84b9..267b691 100644 --- a/src/tests/disable_function/disabled_functions_chain_call_skip.phpt +++ b/src/tests/disable_function/disabled_functions_chain_call_skip.phpt @@ -1,7 +1,7 @@ --TEST-- Disable functions by matching the calltrace, with a superfluous function in between --SKIPIF-- - + --INI-- sp.configuration_file={PWD}/config/config_disabled_functions_chain_call_skip.ini --FILE-- diff --git a/src/tests/disable_function/disabled_functions_chain_call_user_func.phpt b/src/tests/disable_function/disabled_functions_chain_call_user_func.phpt index f3f6498..c7a1f88 100644 --- a/src/tests/disable_function/disabled_functions_chain_call_user_func.phpt +++ b/src/tests/disable_function/disabled_functions_chain_call_user_func.phpt @@ -1,7 +1,7 @@ --TEST-- Disable functions by matching the calltrace, with call_user_func involved --SKIPIF-- - + --INI-- sp.configuration_file={PWD}/config/config_disabled_functions_chain_call_user_func.ini --FILE-- diff --git a/src/tests/disable_function/disabled_functions_chain_call_user_func_ret.phpt b/src/tests/disable_function/disabled_functions_chain_call_user_func_ret.phpt index 2898f73..1a77205 100644 --- a/src/tests/disable_function/disabled_functions_chain_call_user_func_ret.phpt +++ b/src/tests/disable_function/disabled_functions_chain_call_user_func_ret.phpt @@ -1,7 +1,7 @@ --TEST-- Disable functions by matching the calltrace, on the return value --SKIPIF-- - + --INI-- sp.configuration_file={PWD}/config/config_disabled_functions_chain_call_user_func_ret.ini --FILE-- diff --git a/src/tests/disable_function/disabled_functions_chain_not_matching.phpt b/src/tests/disable_function/disabled_functions_chain_not_matching.phpt index 3a0400a..91b4154 100644 --- a/src/tests/disable_function/disabled_functions_chain_not_matching.phpt +++ b/src/tests/disable_function/disabled_functions_chain_not_matching.phpt @@ -1,7 +1,7 @@ --TEST-- Disable functions by matching the calltrace --SKIPIF-- - + --INI-- sp.configuration_file={PWD}/config/config_disabled_functions_chain.ini --FILE-- diff --git a/src/tests/disable_function/disabled_functions_cidr.phpt b/src/tests/disable_function/disabled_functions_cidr.phpt index b26533f..ef82957 100644 --- a/src/tests/disable_function/disabled_functions_cidr.phpt +++ b/src/tests/disable_function/disabled_functions_cidr.phpt @@ -1,7 +1,7 @@ --TEST-- Disable functions --SKIPIF-- - + --ENV-- return << + --ENV-- return << + --ENV-- return << + --ENV-- return << + --INI-- sp.configuration_file={PWD}/config/disabled_functions_die.ini --FILE-- diff --git a/src/tests/disable_function/disabled_functions_drop_include.phpt b/src/tests/disable_function/disabled_functions_drop_include.phpt index ba1c955..975168e 100644 --- a/src/tests/disable_function/disabled_functions_drop_include.phpt +++ b/src/tests/disable_function/disabled_functions_drop_include.phpt @@ -1,7 +1,7 @@ --TEST-- Disable function, bug : https://github.com/jvoisin/snuffleupagus/issues/181 --SKIPIF-- - + --INI-- sp.configuration_file={PWD}/config/disabled_functions_drop_include.ini --FILE-- diff --git a/src/tests/disable_function/disabled_functions_drop_include_simulation.phpt b/src/tests/disable_function/disabled_functions_drop_include_simulation.phpt index 1b13915..0a693be 100644 --- a/src/tests/disable_function/disabled_functions_drop_include_simulation.phpt +++ b/src/tests/disable_function/disabled_functions_drop_include_simulation.phpt @@ -1,7 +1,7 @@ --TEST-- Disable function, bug : https://github.com/jvoisin/snuffleupagus/issues/181 --SKIPIF-- - + --INI-- sp.configuration_file={PWD}/config/disabled_functions_drop_include_simulation.ini --FILE-- diff --git a/src/tests/disable_function/disabled_functions_eval.phpt b/src/tests/disable_function/disabled_functions_eval.phpt index 7297213..78156e1 100644 --- a/src/tests/disable_function/disabled_functions_eval.phpt +++ b/src/tests/disable_function/disabled_functions_eval.phpt @@ -1,7 +1,7 @@ --TEST-- Disable functions - eval --SKIPIF-- - + --INI-- sp.configuration_file={PWD}/config/disabled_functions_eval.ini --FILE-- diff --git a/src/tests/disable_function/disabled_functions_eval_filename.phpt b/src/tests/disable_function/disabled_functions_eval_filename.phpt index e58c449..61757a3 100644 --- a/src/tests/disable_function/disabled_functions_eval_filename.phpt +++ b/src/tests/disable_function/disabled_functions_eval_filename.phpt @@ -1,7 +1,7 @@ --TEST-- Disable functions - eval --SKIPIF-- - + --INI-- sp.configuration_file={PWD}/config/config_disabled_functions_eval_filename.ini --FILE-- diff --git a/src/tests/disable_function/disabled_functions_eval_simulation.phpt b/src/tests/disable_function/disabled_functions_eval_simulation.phpt index d757b73..9e36006 100644 --- a/src/tests/disable_function/disabled_functions_eval_simulation.phpt +++ b/src/tests/disable_function/disabled_functions_eval_simulation.phpt @@ -1,7 +1,7 @@ --TEST-- Disable functions - eval (simulation) --SKIPIF-- - + --INI-- sp.configuration_file={PWD}/config/disabled_functions_eval_simulation.ini --FILE-- diff --git a/src/tests/disable_function/disabled_functions_eval_user.phpt b/src/tests/disable_function/disabled_functions_eval_user.phpt index 46918d6..84643f6 100644 --- a/src/tests/disable_function/disabled_functions_eval_user.phpt +++ b/src/tests/disable_function/disabled_functions_eval_user.phpt @@ -1,7 +1,7 @@ --TEST-- Disable functions - eval with a disabled user func --SKIPIF-- - + --INI-- sp.configuration_file={PWD}/config/config_disabled_functions_eval_user_func.ini --FILE-- diff --git a/src/tests/disable_function/disabled_functions_exit.phpt b/src/tests/disable_function/disabled_functions_exit.phpt index 80ffbca..2aa013b 100644 --- a/src/tests/disable_function/disabled_functions_exit.phpt +++ b/src/tests/disable_function/disabled_functions_exit.phpt @@ -1,7 +1,7 @@ --TEST-- Disable functions - exit --SKIPIF-- - + --INI-- sp.configuration_file={PWD}/config/disabled_functions_exit.ini --FILE-- diff --git a/src/tests/disable_function/disabled_functions_filename_r.phpt b/src/tests/disable_function/disabled_functions_filename_r.phpt index 8b1c98e..f6b1538 100644 --- a/src/tests/disable_function/disabled_functions_filename_r.phpt +++ b/src/tests/disable_function/disabled_functions_filename_r.phpt @@ -1,7 +1,7 @@ --TEST-- Disable functions - filename regexp --SKIPIF-- - + --INI-- sp.configuration_file={PWD}/config/config_disabled_functions_filename_r.ini --FILE-- diff --git a/src/tests/disable_function/disabled_functions_include_once.phpt b/src/tests/disable_function/disabled_functions_include_once.phpt index 0018744..57cb5a1 100644 --- a/src/tests/disable_function/disabled_functions_include_once.phpt +++ b/src/tests/disable_function/disabled_functions_include_once.phpt @@ -1,7 +1,7 @@ --TEST-- Disable functions - include_once --SKIPIF-- - + --INI-- sp.configuration_file={PWD}/config/config_disabled_functions_include.ini --FILE-- diff --git a/src/tests/disable_function/disabled_functions_include_simulation.phpt b/src/tests/disable_function/disabled_functions_include_simulation.phpt index 1e9b944..53ea2a4 100644 --- a/src/tests/disable_function/disabled_functions_include_simulation.phpt +++ b/src/tests/disable_function/disabled_functions_include_simulation.phpt @@ -1,7 +1,7 @@ --TEST-- Disable functions - Include (simulation) --SKIPIF-- - + --INI-- sp.configuration_file={PWD}/config/config_disabled_functions_include.ini --FILE-- diff --git a/src/tests/disable_function/disabled_functions_local_var_array.phpt b/src/tests/disable_function/disabled_functions_local_var_array.phpt index 3bb0928..f9f2d36 100644 --- a/src/tests/disable_function/disabled_functions_local_var_array.phpt +++ b/src/tests/disable_function/disabled_functions_local_var_array.phpt @@ -1,7 +1,7 @@ --TEST-- Disable functions - match on an array value buried in several levels --SKIPIF-- - + --INI-- sp.configuration_file={PWD}/config/config_disabled_functions_local_var_array.ini --FILE-- diff --git a/src/tests/disable_function/disabled_functions_local_var_array_key.phpt b/src/tests/disable_function/disabled_functions_local_var_array_key.phpt index dbf038b..c585ab3 100644 --- a/src/tests/disable_function/disabled_functions_local_var_array_key.phpt +++ b/src/tests/disable_function/disabled_functions_local_var_array_key.phpt @@ -1,7 +1,7 @@ --TEST-- Disable functions - match on an array value buried in several levels --SKIPIF-- - + --INI-- sp.configuration_file={PWD}/config/config_disabled_functions_local_var_array_key.ini --FILE-- diff --git a/src/tests/disable_function/disabled_functions_local_var_array_not_array.phpt b/src/tests/disable_function/disabled_functions_local_var_array_not_array.phpt index 54e8719..6a62074 100644 --- a/src/tests/disable_function/disabled_functions_local_var_array_not_array.phpt +++ b/src/tests/disable_function/disabled_functions_local_var_array_not_array.phpt @@ -1,7 +1,7 @@ --TEST-- Disable functions --SKIPIF-- - + --INI-- sp.configuration_file={PWD}/config/disabled_function_local_var_array_not_array.ini --FILE-- diff --git a/src/tests/disable_function/disabled_functions_mb.phpt b/src/tests/disable_function/disabled_functions_mb.phpt index b283787..3640679 100644 --- a/src/tests/disable_function/disabled_functions_mb.phpt +++ b/src/tests/disable_function/disabled_functions_mb.phpt @@ -1,7 +1,7 @@ --TEST-- Disable functions --SKIPIF-- - + --INI-- sp.configuration_file={PWD}/config/disabled_functions_mb.ini --FILE-- diff --git a/src/tests/disable_function/disabled_functions_method.phpt b/src/tests/disable_function/disabled_functions_method.phpt index fe9b22d..5f287ad 100644 --- a/src/tests/disable_function/disabled_functions_method.phpt +++ b/src/tests/disable_function/disabled_functions_method.phpt @@ -1,7 +1,7 @@ --TEST-- Disable functions --SKIPIF-- - + --INI-- sp.configuration_file={PWD}/config/config_disabled_functions_method.ini --FILE-- diff --git a/src/tests/disable_function/disabled_functions_name_r.phpt b/src/tests/disable_function/disabled_functions_name_r.phpt index 5759679..db2efbf 100644 --- a/src/tests/disable_function/disabled_functions_name_r.phpt +++ b/src/tests/disable_function/disabled_functions_name_r.phpt @@ -1,7 +1,7 @@ --TEST-- Disable functions --SKIPIF-- - + --INI-- sp.configuration_file={PWD}/config/config_disabled_functions_name_r.ini --FILE-- diff --git a/src/tests/disable_function/disabled_functions_name_regexp_type.phpt b/src/tests/disable_function/disabled_functions_name_regexp_type.phpt index ce24d76..bf916d2 100644 --- a/src/tests/disable_function/disabled_functions_name_regexp_type.phpt +++ b/src/tests/disable_function/disabled_functions_name_regexp_type.phpt @@ -1,7 +1,7 @@ --TEST-- Disable functions --SKIPIF-- - + --INI-- sp.configuration_file={PWD}/config/config_disabled_functions_name_regexp_type.ini --FILE-- diff --git a/src/tests/disable_function/disabled_functions_name_type.phpt b/src/tests/disable_function/disabled_functions_name_type.phpt index 3816ef6..c7971ee 100644 --- a/src/tests/disable_function/disabled_functions_name_type.phpt +++ b/src/tests/disable_function/disabled_functions_name_type.phpt @@ -1,7 +1,7 @@ --TEST-- Disable functions --SKIPIF-- - + --INI-- sp.configuration_file={PWD}/config/config_disabled_functions_name_type.ini --FILE-- diff --git a/src/tests/disable_function/disabled_functions_namespace.phpt b/src/tests/disable_function/disabled_functions_namespace.phpt index a51c788..c169487 100644 --- a/src/tests/disable_function/disabled_functions_namespace.phpt +++ b/src/tests/disable_function/disabled_functions_namespace.phpt @@ -1,7 +1,7 @@ --TEST-- Disable functions in namespaces --SKIPIF-- - + --INI-- sp.configuration_file={PWD}/config/config_disabled_functions_namespace.ini --FILE-- diff --git a/src/tests/disable_function/disabled_functions_noconf.phpt b/src/tests/disable_function/disabled_functions_noconf.phpt index cb13413..8e2306a 100644 --- a/src/tests/disable_function/disabled_functions_noconf.phpt +++ b/src/tests/disable_function/disabled_functions_noconf.phpt @@ -1,7 +1,7 @@ --TEST-- Disable functions --SKIPIF-- - + --INI-- sp.configuration_file={PWD}/config/empty.ini --FILE-- diff --git a/src/tests/disable_function/disabled_functions_nul_byte.phpt b/src/tests/disable_function/disabled_functions_nul_byte.phpt index 53ce25b..ae9ead2 100644 --- a/src/tests/disable_function/disabled_functions_nul_byte.phpt +++ b/src/tests/disable_function/disabled_functions_nul_byte.phpt @@ -1,7 +1,7 @@ --TEST-- Disable functions with nul byte --SKIPIF-- - + --INI-- sp.configuration_file={PWD}/config/config_disabled_functions_nul_byte.ini --FILE-- diff --git a/src/tests/disable_function/disabled_functions_param.phpt b/src/tests/disable_function/disabled_functions_param.phpt index 52f3acb..aa661e2 100644 --- a/src/tests/disable_function/disabled_functions_param.phpt +++ b/src/tests/disable_function/disabled_functions_param.phpt @@ -1,7 +1,7 @@ --TEST-- Disable functions --SKIPIF-- - + --INI-- sp.configuration_file={PWD}/config/config_disabled_functions_param.ini --FILE-- diff --git a/src/tests/disable_function/disabled_functions_param_alias.phpt b/src/tests/disable_function/disabled_functions_param_alias.phpt index 42a6fb7..334570b 100644 --- a/src/tests/disable_function/disabled_functions_param_alias.phpt +++ b/src/tests/disable_function/disabled_functions_param_alias.phpt @@ -1,7 +1,7 @@ --TEST-- Disable functions - alias --SKIPIF-- - + --INI-- sp.configuration_file={PWD}/config/config_disabled_functions_param_alias.ini --FILE-- diff --git a/src/tests/disable_function/disabled_functions_param_allow.phpt b/src/tests/disable_function/disabled_functions_param_allow.phpt index 1913754..cba8455 100644 --- a/src/tests/disable_function/disabled_functions_param_allow.phpt +++ b/src/tests/disable_function/disabled_functions_param_allow.phpt @@ -1,7 +1,7 @@ --TEST-- Disable functions - allow --SKIPIF-- - + --INI-- sp.configuration_file={PWD}/config/config_disabled_functions_param_allow.ini --FILE-- diff --git a/src/tests/disable_function/disabled_functions_param_array.phpt b/src/tests/disable_function/disabled_functions_param_array.phpt index 47123bd..30b11c1 100644 --- a/src/tests/disable_function/disabled_functions_param_array.phpt +++ b/src/tests/disable_function/disabled_functions_param_array.phpt @@ -1,7 +1,7 @@ --TEST-- Disable functions --SKIPIF-- - + --INI-- sp.configuration_file={PWD}/config/config_disabled_functions_param_array.ini --FILE-- diff --git a/src/tests/disable_function/disabled_functions_param_array_deref.phpt b/src/tests/disable_function/disabled_functions_param_array_deref.phpt index 795f5eb..a10c648 100644 --- a/src/tests/disable_function/disabled_functions_param_array_deref.phpt +++ b/src/tests/disable_function/disabled_functions_param_array_deref.phpt @@ -1,7 +1,7 @@ --TEST-- Disable functions --SKIPIF-- - + --INI-- sp.configuration_file={PWD}/config/config_disabled_functions_param_array.ini --FILE-- diff --git a/src/tests/disable_function/disabled_functions_param_array_no_value.phpt b/src/tests/disable_function/disabled_functions_param_array_no_value.phpt index 5f6a59b..778ec24 100644 --- a/src/tests/disable_function/disabled_functions_param_array_no_value.phpt +++ b/src/tests/disable_function/disabled_functions_param_array_no_value.phpt @@ -1,7 +1,7 @@ --TEST-- Disable functions - matching on an array's variable only --SKIPIF-- - + --INI-- sp.configuration_file={PWD}/config/config_disabled_functions_param_array.ini --FILE-- diff --git a/src/tests/disable_function/disabled_functions_param_array_r.phpt b/src/tests/disable_function/disabled_functions_param_array_r.phpt index b3bf286..ceace9c 100644 --- a/src/tests/disable_function/disabled_functions_param_array_r.phpt +++ b/src/tests/disable_function/disabled_functions_param_array_r.phpt @@ -1,7 +1,7 @@ --TEST-- Disable functions - match on an array using regexp --SKIPIF-- - + --INI-- sp.configuration_file={PWD}/config/config_disabled_functions_param_r_array.ini --FILE-- diff --git a/src/tests/disable_function/disabled_functions_param_array_r_keys.phpt b/src/tests/disable_function/disabled_functions_param_array_r_keys.phpt index 7f68633..e4912df 100644 --- a/src/tests/disable_function/disabled_functions_param_array_r_keys.phpt +++ b/src/tests/disable_function/disabled_functions_param_array_r_keys.phpt @@ -1,7 +1,7 @@ --TEST-- Disable functions - match on an array using regexp --SKIPIF-- - + --INI-- sp.configuration_file={PWD}/config/config_disabled_functions_param_r_array.ini --FILE-- diff --git a/src/tests/disable_function/disabled_functions_param_array_several_levels.phpt b/src/tests/disable_function/disabled_functions_param_array_several_levels.phpt index 68026e1..3f713ad 100644 --- a/src/tests/disable_function/disabled_functions_param_array_several_levels.phpt +++ b/src/tests/disable_function/disabled_functions_param_array_several_levels.phpt @@ -1,7 +1,7 @@ --TEST-- Disable functions - match on an array value buried in several levels --SKIPIF-- - + --INI-- sp.configuration_file={PWD}/config/config_disabled_functions_param_array.ini --FILE-- diff --git a/src/tests/disable_function/disabled_functions_param_array_several_levels_int.phpt b/src/tests/disable_function/disabled_functions_param_array_several_levels_int.phpt index c869c4f..3f35444 100644 --- a/src/tests/disable_function/disabled_functions_param_array_several_levels_int.phpt +++ b/src/tests/disable_function/disabled_functions_param_array_several_levels_int.phpt @@ -1,7 +1,7 @@ --TEST-- Disable functions - match on an array value buried in several levels --SKIPIF-- - + --INI-- sp.configuration_file={PWD}/config/config_disabled_functions_param_array.ini --FILE-- diff --git a/src/tests/disable_function/disabled_functions_param_array_several_levels_keys.phpt b/src/tests/disable_function/disabled_functions_param_array_several_levels_keys.phpt index 0b1bd23..af6731b 100644 --- a/src/tests/disable_function/disabled_functions_param_array_several_levels_keys.phpt +++ b/src/tests/disable_function/disabled_functions_param_array_several_levels_keys.phpt @@ -1,7 +1,7 @@ --TEST-- Disable functions - match on an array value buried in several levels --SKIPIF-- - + --INI-- sp.configuration_file={PWD}/config/config_disabled_functions_param_array.ini --FILE-- diff --git a/src/tests/disable_function/disabled_functions_param_array_several_levels_keys_int.phpt b/src/tests/disable_function/disabled_functions_param_array_several_levels_keys_int.phpt index 5641ce7..7e9627e 100644 --- a/src/tests/disable_function/disabled_functions_param_array_several_levels_keys_int.phpt +++ b/src/tests/disable_function/disabled_functions_param_array_several_levels_keys_int.phpt @@ -1,7 +1,7 @@ --TEST-- Disable functions - match on an array value buried in several levels --SKIPIF-- - + --INI-- sp.configuration_file={PWD}/config/config_disabled_functions_param_array.ini --FILE-- diff --git a/src/tests/disable_function/disabled_functions_param_broken_line.phpt b/src/tests/disable_function/disabled_functions_param_broken_line.phpt index 2dfab6a..a372314 100644 --- a/src/tests/disable_function/disabled_functions_param_broken_line.phpt +++ b/src/tests/disable_function/disabled_functions_param_broken_line.phpt @@ -1,7 +1,7 @@ --TEST-- Disable functions - match on a specific line - broken configuration --SKIPIF-- - + --INI-- sp.configuration_file={PWD}/config/disabled_functions_broken_line.ini --FILE-- diff --git a/src/tests/disable_function/disabled_functions_param_int.phpt b/src/tests/disable_function/disabled_functions_param_int.phpt index 482bea8..c49e25e 100644 --- a/src/tests/disable_function/disabled_functions_param_int.phpt +++ b/src/tests/disable_function/disabled_functions_param_int.phpt @@ -1,7 +1,7 @@ --TEST-- Disable functions --SKIPIF-- - + --INI-- sp.configuration_file={PWD}/config/config_disabled_functions_param_int.ini --FILE-- diff --git a/src/tests/disable_function/disabled_functions_param_invalid_pos.phpt b/src/tests/disable_function/disabled_functions_param_invalid_pos.phpt index 4c5b824..bafe50a 100644 --- a/src/tests/disable_function/disabled_functions_param_invalid_pos.phpt +++ b/src/tests/disable_function/disabled_functions_param_invalid_pos.phpt @@ -1,7 +1,7 @@ --TEST-- Disable functions - match on argument's position --SKIPIF-- - + --INI-- sp.configuration_file={PWD}/config/disabled_functions_invalid_pos.ini --FILE-- diff --git a/src/tests/disable_function/disabled_functions_param_line.phpt b/src/tests/disable_function/disabled_functions_param_line.phpt index 2172d4b..bbd8a9a 100644 --- a/src/tests/disable_function/disabled_functions_param_line.phpt +++ b/src/tests/disable_function/disabled_functions_param_line.phpt @@ -1,7 +1,7 @@ --TEST-- Disable functions - match on a specific line --SKIPIF-- - + --INI-- sp.configuration_file={PWD}/config/disabled_functions_line.ini --FILE-- diff --git a/src/tests/disable_function/disabled_functions_param_pos.phpt b/src/tests/disable_function/disabled_functions_param_pos.phpt index 8d5f93f..bacca62 100644 --- a/src/tests/disable_function/disabled_functions_param_pos.phpt +++ b/src/tests/disable_function/disabled_functions_param_pos.phpt @@ -1,7 +1,7 @@ --TEST-- Disable functions - match on argument's position --SKIPIF-- - + --INI-- sp.configuration_file={PWD}/config/disabled_functions_pos.ini --FILE-- diff --git a/src/tests/disable_function/disabled_functions_param_pos2.phpt b/src/tests/disable_function/disabled_functions_param_pos2.phpt index c8f7893..6854147 100644 --- a/src/tests/disable_function/disabled_functions_param_pos2.phpt +++ b/src/tests/disable_function/disabled_functions_param_pos2.phpt @@ -1,7 +1,7 @@ --TEST-- Disable functions - match on argument's position, not the first time --SKIPIF-- - + --INI-- sp.configuration_file={PWD}/config/disabled_functions_pos.ini --FILE-- diff --git a/src/tests/disable_function/disabled_functions_param_r.phpt b/src/tests/disable_function/disabled_functions_param_r.phpt index 4d34701..f919581 100644 --- a/src/tests/disable_function/disabled_functions_param_r.phpt +++ b/src/tests/disable_function/disabled_functions_param_r.phpt @@ -1,7 +1,7 @@ --TEST-- Disable functions --SKIPIF-- - + --INI-- sp.configuration_file={PWD}/config/config_disabled_functions_param_r.ini --FILE-- diff --git a/src/tests/disable_function/disabled_functions_param_str_representation.phpt b/src/tests/disable_function/disabled_functions_param_str_representation.phpt index 7cbdc0f..f56c457 100644 --- a/src/tests/disable_function/disabled_functions_param_str_representation.phpt +++ b/src/tests/disable_function/disabled_functions_param_str_representation.phpt @@ -1,7 +1,7 @@ --TEST-- Disable functions - casting various types to string internally --SKIPIF-- - + --INI-- sp.configuration_file={PWD}/config/config_disabled_functions_param_str_representation.ini --FILE-- diff --git a/src/tests/disable_function/disabled_functions_parse_class.phpt b/src/tests/disable_function/disabled_functions_parse_class.phpt index af9ed88..e62fe40 100644 --- a/src/tests/disable_function/disabled_functions_parse_class.phpt +++ b/src/tests/disable_function/disabled_functions_parse_class.phpt @@ -1,7 +1,7 @@ --TEST-- Disable functions - Parsing of an Object as a return value of a function --SKIPIF-- - + --INI-- sp.configuration_file={PWD}/config/disabled_functions_ret.ini --FILE-- diff --git a/src/tests/disable_function/disabled_functions_pos_type.phpt b/src/tests/disable_function/disabled_functions_pos_type.phpt index 74d5e08..ba134ad 100644 --- a/src/tests/disable_function/disabled_functions_pos_type.phpt +++ b/src/tests/disable_function/disabled_functions_pos_type.phpt @@ -1,7 +1,7 @@ --TEST-- Disable functions - match on argument's position --SKIPIF-- - + --INI-- sp.configuration_file={PWD}/config/disabled_functions_pos.ini --FILE-- diff --git a/src/tests/disable_function/disabled_functions_regexp_multiple.phpt b/src/tests/disable_function/disabled_functions_regexp_multiple.phpt index f78e0f5..5f8b151 100644 --- a/src/tests/disable_function/disabled_functions_regexp_multiple.phpt +++ b/src/tests/disable_function/disabled_functions_regexp_multiple.phpt @@ -1,7 +1,7 @@ --TEST-- Disable functions --SKIPIF-- - + --INI-- sp.configuration_file={PWD}/config/disabled_functions_regexp.ini --FILE-- diff --git a/src/tests/disable_function/disabled_functions_register_shutdown_function.phpt b/src/tests/disable_function/disabled_functions_register_shutdown_function.phpt index b0d04ad..f33bb42 100644 --- a/src/tests/disable_function/disabled_functions_register_shutdown_function.phpt +++ b/src/tests/disable_function/disabled_functions_register_shutdown_function.phpt @@ -1,7 +1,7 @@ --TEST-- Disable functions - Called with register_shutdown_function --SKIPIF-- - + --INI-- sp.configuration_file={PWD}/config/config_disabled_user_functions.ini --FILE-- diff --git a/src/tests/disable_function/disabled_functions_register_tick_function.phpt b/src/tests/disable_function/disabled_functions_register_tick_function.phpt index c74f3c7..623e424 100644 --- a/src/tests/disable_function/disabled_functions_register_tick_function.phpt +++ b/src/tests/disable_function/disabled_functions_register_tick_function.phpt @@ -1,7 +1,7 @@ --TEST-- Disable functions - Called with register_tick_function --SKIPIF-- - + --INI-- sp.configuration_file={PWD}/config/config_disabled_user_functions.ini --FILE-- diff --git a/src/tests/disable_function/disabled_functions_require.phpt b/src/tests/disable_function/disabled_functions_require.phpt index d05ab04..df2b2f0 100644 --- a/src/tests/disable_function/disabled_functions_require.phpt +++ b/src/tests/disable_function/disabled_functions_require.phpt @@ -1,7 +1,7 @@ --TEST-- Disable functions - Require --SKIPIF-- - + --INI-- sp.configuration_file={PWD}/config/config_disabled_functions_require.ini --FILE-- diff --git a/src/tests/disable_function/disabled_functions_require_allow.phpt b/src/tests/disable_function/disabled_functions_require_allow.phpt index 1e3bc56..7ab29aa 100644 --- a/src/tests/disable_function/disabled_functions_require_allow.phpt +++ b/src/tests/disable_function/disabled_functions_require_allow.phpt @@ -1,7 +1,7 @@ --TEST-- Disable functions - Require (allow) --SKIPIF-- - + --INI-- sp.configuration_file={PWD}/config/config_disabled_functions_require_allow.ini --FILE-- diff --git a/src/tests/disable_function/disabled_functions_require_once.phpt b/src/tests/disable_function/disabled_functions_require_once.phpt index b9e64f2..7356c08 100644 --- a/src/tests/disable_function/disabled_functions_require_once.phpt +++ b/src/tests/disable_function/disabled_functions_require_once.phpt @@ -1,7 +1,7 @@ --TEST-- Disable functions - require_once --SKIPIF-- - + --INI-- sp.configuration_file={PWD}/config/config_disabled_functions_require.ini --FILE-- diff --git a/src/tests/disable_function/disabled_functions_require_simulation.phpt b/src/tests/disable_function/disabled_functions_require_simulation.phpt index b23fdec..fa1523c 100644 --- a/src/tests/disable_function/disabled_functions_require_simulation.phpt +++ b/src/tests/disable_function/disabled_functions_require_simulation.phpt @@ -1,7 +1,7 @@ --TEST-- Disable functions - Require (simulation) --SKIPIF-- - + --INI-- sp.configuration_file={PWD}/config/config_disabled_functions_require.ini --FILE-- diff --git a/src/tests/disable_function/disabled_functions_ret.phpt b/src/tests/disable_function/disabled_functions_ret.phpt index f8a20c7..be5e946 100644 --- a/src/tests/disable_function/disabled_functions_ret.phpt +++ b/src/tests/disable_function/disabled_functions_ret.phpt @@ -1,7 +1,7 @@ --TEST-- Disable functions check on `ret`. --SKIPIF-- - + --INI-- sp.configuration_file={PWD}/config/disabled_functions_ret.ini --FILE-- diff --git a/src/tests/disable_function/disabled_functions_ret2.phpt b/src/tests/disable_function/disabled_functions_ret2.phpt index 93af2d1..8070b08 100644 --- a/src/tests/disable_function/disabled_functions_ret2.phpt +++ b/src/tests/disable_function/disabled_functions_ret2.phpt @@ -1,7 +1,7 @@ --TEST-- Disable functions check on `ret`. --SKIPIF-- - + --INI-- sp.configuration_file={PWD}/config/disabled_functions_ret.ini --FILE-- diff --git a/src/tests/disable_function/disabled_functions_ret3.phpt b/src/tests/disable_function/disabled_functions_ret3.phpt index 21edb94..744ec78 100644 --- a/src/tests/disable_function/disabled_functions_ret3.phpt +++ b/src/tests/disable_function/disabled_functions_ret3.phpt @@ -1,7 +1,7 @@ --TEST-- Disable functions check on `ret`. --SKIPIF-- - + --INI-- sp.configuration_file={PWD}/config/disabled_functions_ret.ini memory_limit=-1 diff --git a/src/tests/disable_function/disabled_functions_ret_allow.phpt b/src/tests/disable_function/disabled_functions_ret_allow.phpt index 1690995..90fe4c7 100644 --- a/src/tests/disable_function/disabled_functions_ret_allow.phpt +++ b/src/tests/disable_function/disabled_functions_ret_allow.phpt @@ -1,7 +1,7 @@ --TEST-- Disable functions check on `ret`. --SKIPIF-- - + --INI-- sp.configuration_file={PWD}/config/config_disabled_functions_ret_allow.ini --FILE-- diff --git a/src/tests/disable_function/disabled_functions_ret_allow_value.phpt b/src/tests/disable_function/disabled_functions_ret_allow_value.phpt index 881a006..c7785fd 100644 --- a/src/tests/disable_function/disabled_functions_ret_allow_value.phpt +++ b/src/tests/disable_function/disabled_functions_ret_allow_value.phpt @@ -1,7 +1,7 @@ --TEST-- Disable functions check on `ret` allowed --SKIPIF-- - + --INI-- sp.configuration_file={PWD}/config/config_disabled_functions_ret_allow_value.ini --FILE-- diff --git a/src/tests/disable_function/disabled_functions_ret_right_hash.phpt b/src/tests/disable_function/disabled_functions_ret_right_hash.phpt index 68d89a5..f434e25 100644 --- a/src/tests/disable_function/disabled_functions_ret_right_hash.phpt +++ b/src/tests/disable_function/disabled_functions_ret_right_hash.phpt @@ -1,7 +1,7 @@ --TEST-- Disable functions --SKIPIF-- - + --INI-- sp.configuration_file={PWD}/config/config_disabled_functions_ret_right_hash.ini --FILE-- diff --git a/src/tests/disable_function/disabled_functions_ret_simulation.phpt b/src/tests/disable_function/disabled_functions_ret_simulation.phpt index 4085215..ca9dc7f 100644 --- a/src/tests/disable_function/disabled_functions_ret_simulation.phpt +++ b/src/tests/disable_function/disabled_functions_ret_simulation.phpt @@ -1,7 +1,7 @@ --TEST-- Disable functions check on `ret` simulation --SKIPIF-- - + --INI-- sp.configuration_file={PWD}/config/config_disabled_functions_ret_simulation.ini --FILE-- diff --git a/src/tests/disable_function/disabled_functions_ret_type.phpt b/src/tests/disable_function/disabled_functions_ret_type.phpt index ffcc590..3a9a230 100644 --- a/src/tests/disable_function/disabled_functions_ret_type.phpt +++ b/src/tests/disable_function/disabled_functions_ret_type.phpt @@ -1,7 +1,7 @@ --TEST-- Disable functions check on `ret` by type matching (false) --SKIPIF-- - + --INI-- sp.configuration_file={PWD}/config/disabled_functions_ret_type.ini --FILE-- diff --git a/src/tests/disable_function/disabled_functions_ret_type_array.phpt b/src/tests/disable_function/disabled_functions_ret_type_array.phpt index 85e1ce9..3dcb0f2 100644 --- a/src/tests/disable_function/disabled_functions_ret_type_array.phpt +++ b/src/tests/disable_function/disabled_functions_ret_type_array.phpt @@ -1,7 +1,7 @@ --TEST-- Disable functions check on `ret` by type matching (array). --SKIPIF-- - + --INI-- sp.configuration_file={PWD}/config/disabled_functions_ret_type_array.ini --FILE-- diff --git a/src/tests/disable_function/disabled_functions_ret_type_double.phpt b/src/tests/disable_function/disabled_functions_ret_type_double.phpt index 6291d60..df5b1ae 100644 --- a/src/tests/disable_function/disabled_functions_ret_type_double.phpt +++ b/src/tests/disable_function/disabled_functions_ret_type_double.phpt @@ -1,7 +1,7 @@ --TEST-- Disable functions check on `ret` by type matching (double). --SKIPIF-- - + --INI-- sp.configuration_file={PWD}/config/disabled_functions_ret_type_double.ini --FILE-- diff --git a/src/tests/disable_function/disabled_functions_ret_type_long.phpt b/src/tests/disable_function/disabled_functions_ret_type_long.phpt index 694b6c5..5da1103 100644 --- a/src/tests/disable_function/disabled_functions_ret_type_long.phpt +++ b/src/tests/disable_function/disabled_functions_ret_type_long.phpt @@ -1,7 +1,7 @@ --TEST-- Disable functions check on `ret` by type matching (long). --SKIPIF-- - + --INI-- sp.configuration_file={PWD}/config/disabled_functions_ret_type_long.ini --FILE-- diff --git a/src/tests/disable_function/disabled_functions_ret_type_null.phpt b/src/tests/disable_function/disabled_functions_ret_type_null.phpt index e946ea9..c2c6880 100644 --- a/src/tests/disable_function/disabled_functions_ret_type_null.phpt +++ b/src/tests/disable_function/disabled_functions_ret_type_null.phpt @@ -1,7 +1,7 @@ --TEST-- Disable functions check on `ret` by type matching (null). --SKIPIF-- - + --INI-- sp.configuration_file={PWD}/config/disabled_functions_ret_type_null.ini --FILE-- diff --git a/src/tests/disable_function/disabled_functions_ret_type_object.phpt b/src/tests/disable_function/disabled_functions_ret_type_object.phpt index f8ee6a8..a6a3519 100644 --- a/src/tests/disable_function/disabled_functions_ret_type_object.phpt +++ b/src/tests/disable_function/disabled_functions_ret_type_object.phpt @@ -1,7 +1,7 @@ --TEST-- Disable functions check on `ret` by type matching (object). --SKIPIF-- - + --INI-- sp.configuration_file={PWD}/config/disabled_functions_ret_type_object.ini --FILE-- diff --git a/src/tests/disable_function/disabled_functions_ret_type_resource.phpt b/src/tests/disable_function/disabled_functions_ret_type_resource.phpt index 6a3e940..cf30d95 100644 --- a/src/tests/disable_function/disabled_functions_ret_type_resource.phpt +++ b/src/tests/disable_function/disabled_functions_ret_type_resource.phpt @@ -1,7 +1,7 @@ --TEST-- Disable functions check on `ret` by type matching (resource). --SKIPIF-- - + --INI-- sp.configuration_file={PWD}/config/disabled_functions_ret_type_resource.ini --FILE-- diff --git a/src/tests/disable_function/disabled_functions_ret_type_str.phpt b/src/tests/disable_function/disabled_functions_ret_type_str.phpt index c4750b4..48a0c04 100644 --- a/src/tests/disable_function/disabled_functions_ret_type_str.phpt +++ b/src/tests/disable_function/disabled_functions_ret_type_str.phpt @@ -1,7 +1,7 @@ --TEST-- Disable functions check on `ret` by type matching (string). --SKIPIF-- - + --INI-- sp.configuration_file={PWD}/config/disabled_functions_ret_type_str.ini --FILE-- diff --git a/src/tests/disable_function/disabled_functions_ret_type_true.phpt b/src/tests/disable_function/disabled_functions_ret_type_true.phpt index 5b2dacb..7cc1e38 100644 --- a/src/tests/disable_function/disabled_functions_ret_type_true.phpt +++ b/src/tests/disable_function/disabled_functions_ret_type_true.phpt @@ -1,7 +1,7 @@ --TEST-- Disable functions check on `ret` by type matching (true). --SKIPIF-- - + --INI-- sp.configuration_file={PWD}/config/disabled_functions_ret_type_true.ini --FILE-- diff --git a/src/tests/disable_function/disabled_functions_ret_user.phpt b/src/tests/disable_function/disabled_functions_ret_user.phpt index 71f1375..040756c 100644 --- a/src/tests/disable_function/disabled_functions_ret_user.phpt +++ b/src/tests/disable_function/disabled_functions_ret_user.phpt @@ -1,7 +1,7 @@ --TEST-- Check NULL return value for user func --SKIPIF-- - + --INI-- sp.configuration_file={PWD}/config/config_disabled_functions_ret_user.ini --FILE-- diff --git a/src/tests/disable_function/disabled_functions_ret_user_used.phpt b/src/tests/disable_function/disabled_functions_ret_user_used.phpt index 9640329..7499e1c 100644 --- a/src/tests/disable_function/disabled_functions_ret_user_used.phpt +++ b/src/tests/disable_function/disabled_functions_ret_user_used.phpt @@ -1,7 +1,7 @@ --TEST-- Check return value for user func --SKIPIF-- - + --INI-- sp.configuration_file={PWD}/config/config_disabled_functions_ret_user.ini --FILE-- diff --git a/src/tests/disable_function/disabled_functions_ret_val.phpt b/src/tests/disable_function/disabled_functions_ret_val.phpt index 12ce715..0bf39bb 100644 --- a/src/tests/disable_function/disabled_functions_ret_val.phpt +++ b/src/tests/disable_function/disabled_functions_ret_val.phpt @@ -1,7 +1,7 @@ --TEST-- Disable functions ret val --SKIPIF-- - + --INI-- sp.configuration_file={PWD}/config/disabled_functions_retval.ini --FILE-- diff --git a/src/tests/disable_function/disabled_functions_ret_val_dump.phpt b/src/tests/disable_function/disabled_functions_ret_val_dump.phpt index 95b2639..5e36900 100644 --- a/src/tests/disable_function/disabled_functions_ret_val_dump.phpt +++ b/src/tests/disable_function/disabled_functions_ret_val_dump.phpt @@ -1,7 +1,7 @@ --TEST-- Disable functions ret val - dump --SKIPIF-- - + --INI-- sp.configuration_file={PWD}/config/disabled_functions_retval_dump.ini --ENV-- diff --git a/src/tests/disable_function/disabled_functions_ret_val_rx.phpt b/src/tests/disable_function/disabled_functions_ret_val_rx.phpt index 01eceac..e756d30 100644 --- a/src/tests/disable_function/disabled_functions_ret_val_rx.phpt +++ b/src/tests/disable_function/disabled_functions_ret_val_rx.phpt @@ -1,7 +1,7 @@ --TEST-- Disable functions ret val rx --SKIPIF-- - + --INI-- sp.configuration_file={PWD}/config/disabled_functions_retval_rx.ini --FILE-- diff --git a/src/tests/disable_function/disabled_functions_right_hash.phpt b/src/tests/disable_function/disabled_functions_right_hash.phpt index f3c5fb3..1c6e3d1 100644 --- a/src/tests/disable_function/disabled_functions_right_hash.phpt +++ b/src/tests/disable_function/disabled_functions_right_hash.phpt @@ -1,7 +1,7 @@ --TEST-- Disable functions --SKIPIF-- - + --INI-- sp.configuration_file={PWD}/config/config_disabled_functions_right_hash.ini --FILE-- diff --git a/src/tests/disable_function/disabled_functions_runtime.phpt b/src/tests/disable_function/disabled_functions_runtime.phpt index 41fa297..3d74b40 100644 --- a/src/tests/disable_function/disabled_functions_runtime.phpt +++ b/src/tests/disable_function/disabled_functions_runtime.phpt @@ -1,7 +1,7 @@ --TEST-- Disable functions - runtime inclusion --SKIPIF-- - + --INI-- sp.configuration_file={PWD}/config/config_disabled_functions_param_runtime.ini --FILE-- diff --git a/src/tests/disable_function/disabled_functions_upper.phpt b/src/tests/disable_function/disabled_functions_upper.phpt index cdeb1b9..e3878f0 100644 --- a/src/tests/disable_function/disabled_functions_upper.phpt +++ b/src/tests/disable_function/disabled_functions_upper.phpt @@ -1,7 +1,7 @@ --TEST-- Disable functions - uppercase --SKIPIF-- - + --INI-- sp.configuration_file={PWD}/config/disabled_functions.ini --FILE-- diff --git a/src/tests/disable_function/disabled_functions_variadic.phpt b/src/tests/disable_function/disabled_functions_variadic.phpt index e20fa41..7658ec8 100644 --- a/src/tests/disable_function/disabled_functions_variadic.phpt +++ b/src/tests/disable_function/disabled_functions_variadic.phpt @@ -1,7 +1,7 @@ --TEST-- Disable functions - support for variadic functions --SKIPIF-- - + --INI-- sp.configuration_file={PWD}/config/config_disabled_functions_variadic.ini --FILE-- diff --git a/src/tests/disable_function/disabled_functions_zero_cidr.phpt b/src/tests/disable_function/disabled_functions_zero_cidr.phpt index a0bc95c..4fd0bb9 100644 --- a/src/tests/disable_function/disabled_functions_zero_cidr.phpt +++ b/src/tests/disable_function/disabled_functions_zero_cidr.phpt @@ -1,7 +1,7 @@ --TEST-- Disable functions --SKIPIF-- - + --ENV-- return << + --INI-- sp.configuration_file={PWD}/config/disabled_functions.ini --FILE-- diff --git a/src/tests/disable_function/disabled_user_functions.phpt b/src/tests/disable_function/disabled_user_functions.phpt index 629d1df..62c357b 100644 --- a/src/tests/disable_function/disabled_user_functions.phpt +++ b/src/tests/disable_function/disabled_user_functions.phpt @@ -1,7 +1,7 @@ --TEST-- Disabled user-created functions --SKIPIF-- - + --INI-- sp.configuration_file={PWD}/config/config_disabled_user_functions.ini --FILE-- diff --git a/src/tests/disable_function/disabled_user_functions_indirect.phpt b/src/tests/disable_function/disabled_user_functions_indirect.phpt index 9231bb9..bc57871 100644 --- a/src/tests/disable_function/disabled_user_functions_indirect.phpt +++ b/src/tests/disable_function/disabled_user_functions_indirect.phpt @@ -1,7 +1,7 @@ --TEST-- Disabled user-created functions, called indirectly --SKIPIF-- - + --INI-- sp.configuration_file={PWD}/config/config_disabled_user_functions.ini --FILE-- diff --git a/src/tests/dump_request/dump_eval_blacklist.phpt b/src/tests/dump_request/dump_eval_blacklist.phpt index c4981a3..4a209f6 100644 --- a/src/tests/dump_request/dump_eval_blacklist.phpt +++ b/src/tests/dump_request/dump_eval_blacklist.phpt @@ -2,7 +2,7 @@ Dump eval blacklist --SKIPIF-- --POST-- post_a=data_post_a&post_b=data_post_b diff --git a/src/tests/dump_request/dump_eval_whitelist.phpt b/src/tests/dump_request/dump_eval_whitelist.phpt index 53bb918..cf696ad 100644 --- a/src/tests/dump_request/dump_eval_whitelist.phpt +++ b/src/tests/dump_request/dump_eval_whitelist.phpt @@ -2,7 +2,7 @@ Dump eval whitelist --SKIPIF-- --POST-- post_a=data_post_a&post_b=data_post_b diff --git a/src/tests/dump_request/dump_segfault1.phpt b/src/tests/dump_request/dump_segfault1.phpt index 4febccf..4e241d7 100644 --- a/src/tests/dump_request/dump_segfault1.phpt +++ b/src/tests/dump_request/dump_segfault1.phpt @@ -1,7 +1,7 @@ --TEST-- Disable functions check on `ret` with an alias --SKIPIF-- - + --INI-- sp.configuration_file={PWD}/config/config_dump_segfault1.ini --FILE-- diff --git a/src/tests/eval_blacklist/eval_backlist.phpt b/src/tests/eval_blacklist/eval_backlist.phpt index 0cb000e..fa32b4b 100644 --- a/src/tests/eval_blacklist/eval_backlist.phpt +++ b/src/tests/eval_blacklist/eval_backlist.phpt @@ -1,7 +1,7 @@ --TEST-- Eval blacklist --SKIPIF-- - + --INI-- sp.configuration_file={PWD}/config/eval_backlist.ini --FILE-- diff --git a/src/tests/eval_blacklist/eval_backlist_call_user_func.phpt b/src/tests/eval_blacklist/eval_backlist_call_user_func.phpt index 96bf682..4c37263 100644 --- a/src/tests/eval_blacklist/eval_backlist_call_user_func.phpt +++ b/src/tests/eval_blacklist/eval_backlist_call_user_func.phpt @@ -1,7 +1,7 @@ --TEST-- Eval blacklist - with several calls in an eval. --SKIPIF-- - + --INI-- sp.configuration_file={PWD}/config/eval_backlist.ini --FILE-- diff --git a/src/tests/eval_blacklist/eval_backlist_chained.phpt b/src/tests/eval_blacklist/eval_backlist_chained.phpt index 584ff2f..820ef1d 100644 --- a/src/tests/eval_blacklist/eval_backlist_chained.phpt +++ b/src/tests/eval_blacklist/eval_backlist_chained.phpt @@ -1,7 +1,7 @@ --TEST-- Eval blacklist - with several calls in an eval. --SKIPIF-- - + --INI-- sp.configuration_file={PWD}/config/eval_backlist.ini --FILE-- diff --git a/src/tests/eval_blacklist/eval_backlist_list.phpt b/src/tests/eval_blacklist/eval_backlist_list.phpt index c63df75..725a9bb 100644 --- a/src/tests/eval_blacklist/eval_backlist_list.phpt +++ b/src/tests/eval_blacklist/eval_backlist_list.phpt @@ -1,7 +1,7 @@ --TEST-- Eval blacklist - with a list of functions --SKIPIF-- - + --INI-- sp.configuration_file={PWD}/config/eval_backlist_list.ini --FILE-- diff --git a/src/tests/eval_blacklist/eval_backlist_simulation.phpt b/src/tests/eval_blacklist/eval_backlist_simulation.phpt index 5701096..f09370d 100644 --- a/src/tests/eval_blacklist/eval_backlist_simulation.phpt +++ b/src/tests/eval_blacklist/eval_backlist_simulation.phpt @@ -1,7 +1,7 @@ --TEST-- Eval blacklist simulation --SKIPIF-- - + --INI-- sp.configuration_file={PWD}/config/eval_backlist_simulation.ini --FILE-- diff --git a/src/tests/eval_blacklist/eval_backlist_whitelist.phpt b/src/tests/eval_blacklist/eval_backlist_whitelist.phpt index 3973bb8..de81402 100644 --- a/src/tests/eval_blacklist/eval_backlist_whitelist.phpt +++ b/src/tests/eval_blacklist/eval_backlist_whitelist.phpt @@ -1,7 +1,7 @@ --TEST-- Eval whitelist --SKIPIF-- - + --INI-- sp.configuration_file={PWD}/config/eval_whitelist_blacklist.ini --FILE-- diff --git a/src/tests/eval_blacklist/eval_backlist_whitelist_builtin.phpt b/src/tests/eval_blacklist/eval_backlist_whitelist_builtin.phpt index fe770a6..82abe02 100644 --- a/src/tests/eval_blacklist/eval_backlist_whitelist_builtin.phpt +++ b/src/tests/eval_blacklist/eval_backlist_whitelist_builtin.phpt @@ -1,7 +1,7 @@ --TEST-- Eval whitelist/blacklist, on builtin functions --SKIPIF-- - + --INI-- sp.configuration_file={PWD}/config/eval_whitelist_blacklist.ini --FILE-- diff --git a/src/tests/eval_blacklist/eval_whitelist.phpt b/src/tests/eval_blacklist/eval_whitelist.phpt index 483e097..016b599 100644 --- a/src/tests/eval_blacklist/eval_whitelist.phpt +++ b/src/tests/eval_blacklist/eval_whitelist.phpt @@ -1,7 +1,7 @@ --TEST-- Eval whitelist --SKIPIF-- - + --INI-- sp.configuration_file={PWD}/config/eval_whitelist.ini --FILE-- diff --git a/src/tests/eval_blacklist/eval_whitelist_builtin.phpt b/src/tests/eval_blacklist/eval_whitelist_builtin.phpt index 339aef5..4494878 100644 --- a/src/tests/eval_blacklist/eval_whitelist_builtin.phpt +++ b/src/tests/eval_blacklist/eval_whitelist_builtin.phpt @@ -1,7 +1,7 @@ --TEST-- Eval whitelist - builtin function --SKIPIF-- - + --INI-- sp.configuration_file={PWD}/config/eval_whitelist.ini --FILE-- diff --git a/src/tests/eval_blacklist/eval_whitelist_include_then_user.phpt b/src/tests/eval_blacklist/eval_whitelist_include_then_user.phpt index ad294ce..825480f 100644 --- a/src/tests/eval_blacklist/eval_whitelist_include_then_user.phpt +++ b/src/tests/eval_blacklist/eval_whitelist_include_then_user.phpt @@ -1,7 +1,7 @@ --TEST-- Eval whitelist - builtin function --SKIPIF-- - + --INI-- sp.configuration_file={PWD}/config/eval_whitelist.ini --FILE-- diff --git a/src/tests/eval_blacklist/eval_whitelist_simulation.phpt b/src/tests/eval_blacklist/eval_whitelist_simulation.phpt index f5d8028..0f6f879 100644 --- a/src/tests/eval_blacklist/eval_whitelist_simulation.phpt +++ b/src/tests/eval_blacklist/eval_whitelist_simulation.phpt @@ -1,7 +1,7 @@ --TEST-- Eval whitelist simulation --SKIPIF-- - + --INI-- sp.configuration_file={PWD}/config/eval_whitelist_simulation.ini --FILE-- diff --git a/src/tests/eval_blacklist/eval_whitelist_user_then_builtin.phpt b/src/tests/eval_blacklist/eval_whitelist_user_then_builtin.phpt index a0806b9..6d4a579 100644 --- a/src/tests/eval_blacklist/eval_whitelist_user_then_builtin.phpt +++ b/src/tests/eval_blacklist/eval_whitelist_user_then_builtin.phpt @@ -1,7 +1,7 @@ --TEST-- Eval whitelist - builtin function --SKIPIF-- - + --INI-- sp.configuration_file={PWD}/config/eval_whitelist.ini --FILE-- diff --git a/src/tests/eval_blacklist/nested_eval_blacklist.phpt b/src/tests/eval_blacklist/nested_eval_blacklist.phpt index 01bba3c..8ff0b6d 100644 --- a/src/tests/eval_blacklist/nested_eval_blacklist.phpt +++ b/src/tests/eval_blacklist/nested_eval_blacklist.phpt @@ -1,7 +1,7 @@ --TEST-- Eval blacklist - nested eval --SKIPIF-- - + --INI-- sp.configuration_file={PWD}/config/eval_backlist.ini --FILE-- diff --git a/src/tests/eval_blacklist/nested_eval_blacklist2.phpt b/src/tests/eval_blacklist/nested_eval_blacklist2.phpt index ec5bdfe..37f8967 100644 --- a/src/tests/eval_blacklist/nested_eval_blacklist2.phpt +++ b/src/tests/eval_blacklist/nested_eval_blacklist2.phpt @@ -1,7 +1,7 @@ --TEST-- Eval blacklist - nested eval, with a twist --SKIPIF-- - + --INI-- sp.configuration_file={PWD}/config/eval_backlist.ini --FILE-- diff --git a/src/tests/glob_config.phpt b/src/tests/glob_config.phpt index 6cacc38..499d20b 100644 --- a/src/tests/glob_config.phpt +++ b/src/tests/glob_config.phpt @@ -1,7 +1,7 @@ --TEST-- Multiple configuration files --SKIPIF-- - + --INI-- sp.configuration_file={PWD}/config/config_multi*.ini --FILE-- diff --git a/src/tests/multi_config.phpt b/src/tests/multi_config.phpt index dfb9615..dbd38c0 100644 --- a/src/tests/multi_config.phpt +++ b/src/tests/multi_config.phpt @@ -1,7 +1,7 @@ --TEST-- Multiple configuration files --SKIPIF-- - + --INI-- sp.configuration_file={PWD}/config/config_multi2.ini,{PWD}/config/config_multi1.ini --FILE-- diff --git a/src/tests/rips_configuration.phpt b/src/tests/rips_configuration.phpt index 31d1266..7c197e5 100644 --- a/src/tests/rips_configuration.phpt +++ b/src/tests/rips_configuration.phpt @@ -1,7 +1,7 @@ --TEST-- Shipped configuration (rips) --SKIPIF-- - + --INI-- sp.configuration_file={PWD}/../../config/rips.rules --FILE-- diff --git a/src/tests/samesite_cookies.phpt b/src/tests/samesite_cookies.phpt index 5ba92a3..ffe0a0b 100644 --- a/src/tests/samesite_cookies.phpt +++ b/src/tests/samesite_cookies.phpt @@ -2,7 +2,7 @@ Cookie samesite --SKIPIF-- --INI-- sp.configuration_file={PWD}/config/config_samesite_cookies.ini diff --git a/src/tests/session_encryption/crypt_session_corrupted_session.phpt b/src/tests/session_encryption/crypt_session_corrupted_session.phpt index e139115..a89faf4 100644 --- a/src/tests/session_encryption/crypt_session_corrupted_session.phpt +++ b/src/tests/session_encryption/crypt_session_corrupted_session.phpt @@ -1,7 +1,7 @@ --TEST-- Set a custom session handler --SKIPIF-- - + --INI-- sp.configuration_file={PWD}/config/config_crypt_session.ini session.save_path = "/tmp" diff --git a/src/tests/session_encryption/crypt_session_invalid.phpt b/src/tests/session_encryption/crypt_session_invalid.phpt index 69e7e72..9ec7c50 100644 --- a/src/tests/session_encryption/crypt_session_invalid.phpt +++ b/src/tests/session_encryption/crypt_session_invalid.phpt @@ -1,7 +1,7 @@ --TEST-- SESSION crypt and bad decrypt --SKIPIF-- - + --INI-- sp.configuration_file={PWD}/config/config_crypt_session.ini --ENV-- diff --git a/src/tests/session_encryption/crypt_session_invalid_simul.phpt b/src/tests/session_encryption/crypt_session_invalid_simul.phpt index 7bfefcb..cbb80dc 100644 --- a/src/tests/session_encryption/crypt_session_invalid_simul.phpt +++ b/src/tests/session_encryption/crypt_session_invalid_simul.phpt @@ -1,7 +1,7 @@ --TEST-- SESSION crypt and bad decrypt --SKIPIF-- - + --INI-- sp.configuration_file={PWD}/config/config_crypt_session_simul.ini --ENV-- diff --git a/src/tests/session_encryption/crypt_session_read_uncrypt.phpt b/src/tests/session_encryption/crypt_session_read_uncrypt.phpt index f15d8b6..5e81b52 100644 --- a/src/tests/session_encryption/crypt_session_read_uncrypt.phpt +++ b/src/tests/session_encryption/crypt_session_read_uncrypt.phpt @@ -1,7 +1,7 @@ --TEST-- SESSION crypt/decrypt valid --SKIPIF-- - + --INI-- sp.configuration_file={PWD}/config/config_crypt_session_simul.ini --ENV-- diff --git a/src/tests/session_encryption/crypt_session_valid.phpt b/src/tests/session_encryption/crypt_session_valid.phpt index bf9fea0..c272486 100644 --- a/src/tests/session_encryption/crypt_session_valid.phpt +++ b/src/tests/session_encryption/crypt_session_valid.phpt @@ -1,7 +1,7 @@ --TEST-- SESSION crypt/decrypt valid --SKIPIF-- - + --INI-- sp.configuration_file={PWD}/config/config_crypt_session.ini --ENV-- diff --git a/src/tests/session_encryption/crypt_session_valid_simul.phpt b/src/tests/session_encryption/crypt_session_valid_simul.phpt index 28083cf..d63277d 100644 --- a/src/tests/session_encryption/crypt_session_valid_simul.phpt +++ b/src/tests/session_encryption/crypt_session_valid_simul.phpt @@ -1,7 +1,7 @@ --TEST-- SESSION crypt/decrypt valid --SKIPIF-- - + --INI-- sp.configuration_file={PWD}/config/config_crypt_session_simul.ini --ENV-- diff --git a/src/tests/session_encryption/set_custom_session_handler.phpt b/src/tests/session_encryption/set_custom_session_handler.phpt index 5b46fbc..725ee43 100644 --- a/src/tests/session_encryption/set_custom_session_handler.phpt +++ b/src/tests/session_encryption/set_custom_session_handler.phpt @@ -1,7 +1,7 @@ --TEST-- Set a custom session handler --SKIPIF-- - + --INI-- sp.configuration_file={PWD}/config/config_crypt_session.ini session.save_path = "/tmp" diff --git a/src/tests/session_encryption/set_custom_session_handler2.phpt b/src/tests/session_encryption/set_custom_session_handler2.phpt index 18bc3f7..8cc6786 100644 --- a/src/tests/session_encryption/set_custom_session_handler2.phpt +++ b/src/tests/session_encryption/set_custom_session_handler2.phpt @@ -1,7 +1,7 @@ --TEST-- Set a custom session handler, twice --SKIPIF-- - + --INI-- sp.configuration_file={PWD}/config/config_crypt_session.ini session.save_path = "/tmp" diff --git a/src/tests/session_encryption/set_custom_session_handler_ini.phpt b/src/tests/session_encryption/set_custom_session_handler_ini.phpt index 7ed56d6..f9fbfb2 100644 --- a/src/tests/session_encryption/set_custom_session_handler_ini.phpt +++ b/src/tests/session_encryption/set_custom_session_handler_ini.phpt @@ -1,7 +1,7 @@ --TEST-- Set a custom session handler --SKIPIF-- - + --INI-- sp.configuration_file={PWD}/config/config_crypt_session.ini session.save_handler = diff --git a/src/tests/shipped_configuration.phpt b/src/tests/shipped_configuration.phpt index dd6b92b..b171304 100644 --- a/src/tests/shipped_configuration.phpt +++ b/src/tests/shipped_configuration.phpt @@ -1,7 +1,7 @@ --TEST-- Shipped configuration --SKIPIF-- - + --INI-- sp.configuration_file={PWD}/../../config/default.rules --FILE-- diff --git a/src/tests/stream_wrapper/stream_wrapper_restore.phpt b/src/tests/stream_wrapper/stream_wrapper_restore.phpt index 3f547a1..f0b5dd0 100644 --- a/src/tests/stream_wrapper/stream_wrapper_restore.phpt +++ b/src/tests/stream_wrapper/stream_wrapper_restore.phpt @@ -2,7 +2,7 @@ Stream wrapper --SKIPIF-- -= 70300) { die("skip BROKEN with 7.3"); } ?> += 70300) { print "skip BROKEN with 7.3"; } ?> --INI-- sp.configuration_file={PWD}/config/config_stream_wrapper_register.ini --FILE-- diff --git a/src/tests/upload_validation/upload_validation_real.phpt b/src/tests/upload_validation/upload_validation_real.phpt index 7419209..f8f3612 100644 --- a/src/tests/upload_validation/upload_validation_real.phpt +++ b/src/tests/upload_validation/upload_validation_real.phpt @@ -7,7 +7,7 @@ if (!extension_loaded("snuffleupagus")) { } if (PHP_VERSION_ID >= 70300) { - die("skip BROKEN with 7.3"); + print "skip BROKEN with 7.3"; } if (strpos(system(PHP_BINARY . " -d error_log=/dev/null -d extension=vld.so -m 2>/dev/null"), "vld") === FALSE) { -- cgit v1.3 From 5329a55bfd2b00d617a40d587cd37050d964ccbf Mon Sep 17 00:00:00 2001 From: jvoisin Date: Sat, 12 Dec 2020 18:57:48 +0000 Subject: Mark the relevant php8 tests as broken (#359) * Skip tests broken on php8 * Oops * Fix some tests * Add some XXE tests for php8 * Fix a test --- .gitignore | 1 + src/tests/broken_configuration/broken_conf.phpt | 3 +- src/tests/broken_configuration/broken_conf2.phpt | 3 +- .../broken_conf_allow_broken_disabled.phpt | 1 + .../broken_conf_allow_broken_enabled.phpt | 1 + .../broken_conf_config_regexp.phpt | 1 + ...broken_conf_config_regexp_no_closing_paren.phpt | 3 +- ...f_cookie_encryption_without_encryption_key.phpt | 1 + ...ken_conf_cookie_encryption_without_env_var.phpt | 1 + .../broken_conf_cookie_name_and_regexp.phpt | 3 +- .../broken_conf_enable_disable.phpt | 3 +- .../broken_configuration/broken_conf_eval.phpt | 3 +- .../broken_conf_expecting_bool.phpt | 3 +- .../broken_conf_invalid_cidr.phpt | 3 +- .../broken_conf_invalid_cidr6.phpt | 3 +- .../broken_conf_invalid_cidr6_no_slash.phpt | 3 +- .../broken_conf_invalid_cidr_value.phpt | 3 +- .../broken_conf_invalid_filename.phpt | 3 +- .../broken_conf_invalid_log_media.phpt | 1 + .../broken_conf_invalid_type.phpt | 3 +- .../broken_conf_key_value.phpt | 3 +- .../broken_conf_line_empty_string.phpt | 3 +- .../broken_conf_line_no_closing.phpt | 3 +- .../broken_conf_local_var_1.phpt | 3 +- .../broken_conf_local_var_10.phpt | 3 +- .../broken_conf_local_var_11.phpt | 3 +- .../broken_conf_local_var_12.phpt | 3 +- .../broken_conf_local_var_13.phpt | 3 +- .../broken_conf_local_var_14.phpt | 3 +- .../broken_conf_local_var_15.phpt | 3 +- .../broken_conf_local_var_16.phpt | 3 +- .../broken_conf_local_var_2.phpt | 3 +- .../broken_conf_local_var_3.phpt | 3 +- .../broken_conf_local_var_4.phpt | 3 +- .../broken_conf_local_var_5.phpt | 3 +- .../broken_conf_local_var_6.phpt | 3 +- .../broken_conf_local_var_7.phpt | 3 +- .../broken_conf_local_var_8.phpt | 3 +- .../broken_conf_local_var_9.phpt | 3 +- .../broken_conf_lots_of_quotes.phpt | 3 +- .../broken_conf_missing_script.phpt | 2 + .../broken_conf_mutually_exclusive.phpt | 1 + .../broken_conf_mutually_exclusive10.phpt | 3 +- .../broken_conf_mutually_exclusive11.phpt | 1 + .../broken_conf_mutually_exclusive12.phpt | 1 + .../broken_conf_mutually_exclusive2.phpt | 1 + .../broken_conf_mutually_exclusive3.phpt | 1 + .../broken_conf_mutually_exclusive4.phpt | 3 +- .../broken_conf_mutually_exclusive5.phpt | 1 + .../broken_conf_mutually_exclusive6.phpt | 3 +- .../broken_conf_mutually_exclusive7.phpt | 3 +- .../broken_conf_mutually_exclusive8.phpt | 3 +- .../broken_conf_mutually_exclusive9.phpt | 3 +- .../broken_conf_no_cookie_action.phpt | 3 +- .../broken_conf_no_cookie_name.phpt | 3 +- .../broken_conf_nonexisting_script.phpt | 2 + .../broken_configuration/broken_conf_quotes.phpt | 3 +- .../broken_conf_readonly_exec.phpt | 2 + .../broken_configuration/broken_conf_samesite.phpt | 3 +- .../broken_conf_session_encryption.phpt | 1 + ..._session_encryption_without_encryption_key.phpt | 1 + ...en_conf_session_encryption_without_env_var.phpt | 1 + .../broken_conf_shown_in_phpinfo.phpt | 1 + .../broken_conf_truncated.phpt | 3 +- .../broken_conf_unserialize.phpt | 2 + .../broken_conf_upload_validation.phpt | 2 + .../broken_conf_weird_keyword.phpt | 3 +- .../broken_conf_wrapper_whitelist.phpt | 1 + .../broken_conf_wrong_quotes.phpt | 3 +- .../broken_conf_wrong_type.phpt | 1 + src/tests/broken_configuration/broken_regexp.phpt | 3 +- .../broken_unmatching_brackets.phpt | 3 +- src/tests/config_typo3.phpt | 1 + src/tests/cookies_encryption/encrypt_cookies2.phpt | 1 + src/tests/cookies_encryption/encrypt_cookies4.phpt | 1 + .../encrypt_regexp_cookies2.phpt | 1 + src/tests/cookies_encryption/setcookie.phpt | 1 + .../disable_function/disabled_function_echo.phpt | 3 +- .../disable_function/disabled_function_echo_2.phpt | 3 +- .../disabled_function_echo_local_var.phpt | 3 +- ...isabled_function_ensure_client_valid_certs.phpt | 1 + ...nsure_client_valid_certs_curl_multi_setopt.phpt | 1 + ...nsure_client_valid_certs_curl_setopt_array.phpt | 1 + ...isabled_function_ensure_server_valid_certs.phpt | 1 + ...nsure_server_valid_certs_curl_multi_setopt.phpt | 1 + ...nsure_server_valid_certs_curl_setopt_array.phpt | 1 + .../disabled_function_local_var.phpt | 1 + .../disabled_function_local_var_10.phpt | 3 +- .../disabled_function_local_var_2.phpt | 1 + .../disabled_function_local_var_3.phpt | 1 + .../disabled_function_local_var_4.phpt | 3 +- .../disabled_function_local_var_5.phpt | 1 + .../disabled_function_local_var_6.phpt | 3 +- .../disabled_function_local_var_7.phpt | 3 +- .../disabled_function_local_var_8.phpt | 3 +- .../disabled_function_local_var_9.phpt | 3 +- .../disabled_function_local_var_const.phpt | 3 +- .../disabled_function_local_var_crash.phpt | 1 + .../disabled_function_local_var_obj.phpt | 1 + .../disable_function/disabled_function_param.phpt | 3 +- .../disabled_function_super_global_var.phpt | 1 + src/tests/disable_function/disabled_functions.phpt | 1 + .../disabled_functions_callback_called_file_r.phpt | 1 + .../disabled_functions_called_file_r.phpt | 1 + .../disabled_functions_drop_include.phpt | 1 + ...disabled_functions_drop_include_simulation.phpt | 1 + .../disabled_functions_eval_filename.phpt | 3 +- .../disabled_functions_filename_r.phpt | 3 +- .../disabled_functions_include_once.phpt | 1 + .../disabled_functions_include_simulation.phpt | 1 + .../disabled_functions_local_var_array.phpt | 3 +- .../disabled_functions_local_var_array_key.phpt | 3 +- ...sabled_functions_local_var_array_not_array.phpt | 1 + .../disabled_functions_method.phpt | 3 +- .../disabled_functions_name_r.phpt | 3 +- .../disabled_functions_name_regexp_type.phpt | 3 +- .../disabled_functions_name_type.phpt | 3 +- .../disabled_functions_nul_byte.phpt | 3 +- .../disable_function/disabled_functions_param.phpt | 3 +- .../disabled_functions_param_allow.phpt | 3 +- .../disabled_functions_param_array.phpt | 3 +- .../disabled_functions_param_array_deref.phpt | 3 +- .../disabled_functions_param_array_no_value.phpt | 3 +- .../disabled_functions_param_array_r.phpt | 3 +- ...abled_functions_param_array_several_levels.phpt | 3 +- ...d_functions_param_array_several_levels_int.phpt | 3 +- ..._functions_param_array_several_levels_keys.phpt | 3 +- ...ctions_param_array_several_levels_keys_int.phpt | 3 +- .../disabled_functions_param_broken_line.phpt | 1 + .../disabled_functions_param_int.phpt | 3 +- .../disabled_functions_param_invalid_pos.phpt | 1 + .../disabled_functions_param_pos2.phpt | 3 +- .../disabled_functions_param_r.phpt | 3 +- ...isabled_functions_param_str_representation.phpt | 1 + .../disabled_functions_parse_class.phpt | 1 + .../disabled_functions_regexp_multiple.phpt | 1 + .../disabled_functions_require.phpt | 1 + .../disabled_functions_require_allow.phpt | 1 + .../disabled_functions_require_once.phpt | 1 + .../disabled_functions_require_simulation.phpt | 1 + .../disable_function/disabled_functions_ret.phpt | 3 +- .../disable_function/disabled_functions_ret2.phpt | 3 +- .../disable_function/disabled_functions_ret3.phpt | 3 +- .../disabled_functions_ret_val_rx.phpt | 3 +- .../disabled_functions_runtime.phpt | 1 + .../disable_function/disabled_functions_upper.phpt | 3 +- .../disabled_functions_variadic.phpt | 1 + .../disabled_native_functions_indirect.phpt | 3 +- src/tests/global_strict/global_strict.phpt | 1 + .../global_strict/global_strict_disabled.phpt | 1 + src/tests/harden_rand/harden_rand_noargs.phpt | 1 + src/tests/inexistent_conf_file.phpt | 3 +- src/tests/inexistent_conf_file_list.phpt | 3 +- src/tests/phpinfo_presence.phpt | 1 + src/tests/rips_configuration.phpt | 1 + src/tests/shipped_configuration.phpt | 1 + .../sloppy_comparison_array_disabled.phpt | 1 + .../sloppy_comparison_array_keys_disabled.phpt | 1 + .../sloppy_comparison_array_search_disabled.phpt | 1 + .../sloppy_comparison_disable.phpt | 1 + src/tests/stream_wrapper/stream_wrapper.phpt | 1 + .../stream_wrapper/stream_wrapper_register.phpt | 1 + .../stream_wrapper_without_openssl.phpt | 1 + src/tests/strict_mode/strict_mode_enabled.phpt | 2 +- src/tests/unserialize/unserialize_wrong_call.phpt | 1 + src/tests/xxe/disable_xxe_dom.phpt | 38 ++++---- src/tests/xxe/disable_xxe_dom_disabled.phpt | 1 + src/tests/xxe/disable_xxe_dom_disabled_php8.phpt | 60 ++++++++++++ src/tests/xxe/disable_xxe_xml_parse.phpt | 1 + src/tests/xxe/disable_xxe_xml_parse_php8.phpt | 106 +++++++++++++++++++++ 170 files changed, 449 insertions(+), 106 deletions(-) create mode 100644 src/tests/xxe/disable_xxe_dom_disabled_php8.phpt create mode 100644 src/tests/xxe/disable_xxe_xml_parse_php8.phpt (limited to 'src') diff --git a/.gitignore b/.gitignore index ab1bba6..721cd5f 100644 --- a/.gitignore +++ b/.gitignore @@ -1,4 +1,5 @@ *.txt +tags *.orig *.gdbhistory *.swp diff --git a/src/tests/broken_configuration/broken_conf.phpt b/src/tests/broken_configuration/broken_conf.phpt index 967b03e..477ee64 100644 --- a/src/tests/broken_configuration/broken_conf.phpt +++ b/src/tests/broken_configuration/broken_conf.phpt @@ -2,6 +2,7 @@ Broken configuration --SKIPIF-- += 80000) print "skip"; ?> --INI-- sp.configuration_file={PWD}/config/broken_conf.ini --FILE-- @@ -11,4 +12,4 @@ PHP Fatal error: [snuffleupagus][0.0.0.0][config][log] Invalid configuration pr Fatal error: [snuffleupagus][0.0.0.0][config][log] Invalid configuration prefix for 'this is a broken line' on line 1 in Unknown on line 0 Fatal error: [snuffleupagus][0.0.0.0][config][log] Invalid configuration file in Unknown on line 0 -Could not startup. \ No newline at end of file +Could not startup. diff --git a/src/tests/broken_configuration/broken_conf2.phpt b/src/tests/broken_configuration/broken_conf2.phpt index 11cc229..4e67b9f 100644 --- a/src/tests/broken_configuration/broken_conf2.phpt +++ b/src/tests/broken_configuration/broken_conf2.phpt @@ -2,6 +2,7 @@ Broken configuration --SKIPIF-- += 80000) print "skip"; ?> --INI-- sp.configuration_file={PWD}/config/broken_conf2.ini --FILE-- @@ -11,4 +12,4 @@ PHP Fatal error: [snuffleupagus][0.0.0.0][config][log] Invalid configuration se Fatal error: [snuffleupagus][0.0.0.0][config][log] Invalid configuration section 'sp.wrong' on line 1 in Unknown on line 0 Fatal error: [snuffleupagus][0.0.0.0][config][log] Invalid configuration file in Unknown on line 0 -Could not startup. \ No newline at end of file +Could not startup. diff --git a/src/tests/broken_configuration/broken_conf_allow_broken_disabled.phpt b/src/tests/broken_configuration/broken_conf_allow_broken_disabled.phpt index 8bd1517..e2ffab0 100644 --- a/src/tests/broken_configuration/broken_conf_allow_broken_disabled.phpt +++ b/src/tests/broken_configuration/broken_conf_allow_broken_disabled.phpt @@ -2,6 +2,7 @@ Broken configuration with allow broken turned off --SKIPIF-- += 80000) print "skip"; ?> --INI-- sp.configuration_file={PWD}/config/broken_conf.ini sp.allow_broken_configuration=Off diff --git a/src/tests/broken_configuration/broken_conf_allow_broken_enabled.phpt b/src/tests/broken_configuration/broken_conf_allow_broken_enabled.phpt index 0112515..68938fe 100644 --- a/src/tests/broken_configuration/broken_conf_allow_broken_enabled.phpt +++ b/src/tests/broken_configuration/broken_conf_allow_broken_enabled.phpt @@ -2,6 +2,7 @@ Broken configuration with allow broken turned on --SKIPIF-- += 80000) print "skip"; ?> --INI-- sp.configuration_file={PWD}/config/broken_conf.ini sp.allow_broken_configuration=On diff --git a/src/tests/broken_configuration/broken_conf_config_regexp.phpt b/src/tests/broken_configuration/broken_conf_config_regexp.phpt index 34d6d50..ff6280e 100644 --- a/src/tests/broken_configuration/broken_conf_config_regexp.phpt +++ b/src/tests/broken_configuration/broken_conf_config_regexp.phpt @@ -2,6 +2,7 @@ Broken configuration --SKIPIF-- += 80000) print "skip"; ?> --INI-- sp.configuration_file={PWD}/config/broken_config_regexp.ini --FILE-- diff --git a/src/tests/broken_configuration/broken_conf_config_regexp_no_closing_paren.phpt b/src/tests/broken_configuration/broken_conf_config_regexp_no_closing_paren.phpt index 81d9831..8644dfe 100644 --- a/src/tests/broken_configuration/broken_conf_config_regexp_no_closing_paren.phpt +++ b/src/tests/broken_configuration/broken_conf_config_regexp_no_closing_paren.phpt @@ -2,6 +2,7 @@ Broken configuration - regexp without a closing parenthesis --SKIPIF-- += 80000) print "skip"; ?> --INI-- sp.configuration_file={PWD}/config/broken_config_regexp_no_closing_paren.ini --FILE-- @@ -14,4 +15,4 @@ Fatal error: [snuffleupagus][0.0.0.0][error][log] There is an issue with the par Fatal error: [snuffleupagus][0.0.0.0][config][log] '.filename_r()' is expecting a valid regexp, and not '"*."' on line 1 in Unknown on line 0 Fatal error: [snuffleupagus][0.0.0.0][config][log] Invalid configuration file in Unknown on line 0 -Could not startup. \ No newline at end of file +Could not startup. diff --git a/src/tests/broken_configuration/broken_conf_cookie_encryption_without_encryption_key.phpt b/src/tests/broken_configuration/broken_conf_cookie_encryption_without_encryption_key.phpt index d86b72e..857c803 100644 --- a/src/tests/broken_configuration/broken_conf_cookie_encryption_without_encryption_key.phpt +++ b/src/tests/broken_configuration/broken_conf_cookie_encryption_without_encryption_key.phpt @@ -2,6 +2,7 @@ Broken configuration - encrypted cookie without encryption key --SKIPIF-- += 80000) print "skip"; ?> --INI-- sp.configuration_file={PWD}/config/broken_conf_cookie_encryption_without_encryption_key.ini --FILE-- diff --git a/src/tests/broken_configuration/broken_conf_cookie_encryption_without_env_var.phpt b/src/tests/broken_configuration/broken_conf_cookie_encryption_without_env_var.phpt index 01e3141..de97a9d 100644 --- a/src/tests/broken_configuration/broken_conf_cookie_encryption_without_env_var.phpt +++ b/src/tests/broken_configuration/broken_conf_cookie_encryption_without_env_var.phpt @@ -2,6 +2,7 @@ Broken configuration - encrypted cookie with without cookie env var --SKIPIF-- += 80000) print "skip"; ?> --INI-- sp.configuration_file={PWD}/config/broken_conf_cookie_encryption_without_env_var.ini --FILE-- diff --git a/src/tests/broken_configuration/broken_conf_cookie_name_and_regexp.phpt b/src/tests/broken_configuration/broken_conf_cookie_name_and_regexp.phpt index 9375381..141cf77 100644 --- a/src/tests/broken_configuration/broken_conf_cookie_name_and_regexp.phpt +++ b/src/tests/broken_configuration/broken_conf_cookie_name_and_regexp.phpt @@ -2,6 +2,7 @@ Broken configuration - encrypted cookie with name and regexp --SKIPIF-- += 80000) print "skip"; ?> --INI-- sp.configuration_file={PWD}/config/broken_conf_cookie_name_and_regexp.ini --FILE-- @@ -11,4 +12,4 @@ PHP Fatal error: [snuffleupagus][0.0.0.0][config][log] name and name_r are mutu Fatal error: [snuffleupagus][0.0.0.0][config][log] name and name_r are mutually exclusive on line 2 in Unknown on line 0 Fatal error: [snuffleupagus][0.0.0.0][config][log] Invalid configuration file in Unknown on line 0 -Could not startup. \ No newline at end of file +Could not startup. diff --git a/src/tests/broken_configuration/broken_conf_enable_disable.phpt b/src/tests/broken_configuration/broken_conf_enable_disable.phpt index 8efe819..eeba04a 100644 --- a/src/tests/broken_configuration/broken_conf_enable_disable.phpt +++ b/src/tests/broken_configuration/broken_conf_enable_disable.phpt @@ -2,6 +2,7 @@ Global strict mode --SKIPIF-- += 80000) print "skip"; ?> --INI-- sp.configuration_file={PWD}/config/borken_conf_enable_disable.ini --FILE-- @@ -11,4 +12,4 @@ PHP Fatal error: [snuffleupagus][0.0.0.0][config][log] A rule can't be enabled Fatal error: [snuffleupagus][0.0.0.0][config][log] A rule can't be enabled and disabled on line 1 in Unknown on line 0 Fatal error: [snuffleupagus][0.0.0.0][config][log] Invalid configuration file in Unknown on line 0 -Could not startup. \ No newline at end of file +Could not startup. diff --git a/src/tests/broken_configuration/broken_conf_eval.phpt b/src/tests/broken_configuration/broken_conf_eval.phpt index 23a4bb9..791795a 100644 --- a/src/tests/broken_configuration/broken_conf_eval.phpt +++ b/src/tests/broken_configuration/broken_conf_eval.phpt @@ -2,6 +2,7 @@ Broken configuration for eval --SKIPIF-- += 80000) print "skip"; ?> --INI-- sp.configuration_file={PWD}/config/broken_conf_eval.ini --FILE-- @@ -11,4 +12,4 @@ PHP Fatal error: [snuffleupagus][0.0.0.0][error][log] There is an issue with th Fatal error: [snuffleupagus][0.0.0.0][error][log] There is an issue with the parsing of '"cos,sin': it doesn't look like a valid string on line 1 in Unknown on line 0 Fatal error: [snuffleupagus][0.0.0.0][config][log] Invalid configuration file in Unknown on line 0 -Could not startup. \ No newline at end of file +Could not startup. diff --git a/src/tests/broken_configuration/broken_conf_expecting_bool.phpt b/src/tests/broken_configuration/broken_conf_expecting_bool.phpt index 4ccac74..4857ebe 100644 --- a/src/tests/broken_configuration/broken_conf_expecting_bool.phpt +++ b/src/tests/broken_configuration/broken_conf_expecting_bool.phpt @@ -2,6 +2,7 @@ Bad boolean value in configuration --SKIPIF-- += 80000) print "skip"; ?> --INI-- sp.configuration_file={PWD}/config/broken_conf_expecting_bool.ini --FILE-- @@ -11,4 +12,4 @@ PHP Fatal error: [snuffleupagus][0.0.0.0][config][log] Trailing chars '337);' a Fatal error: [snuffleupagus][0.0.0.0][config][log] Trailing chars '337);' at the end of '.enable(1337);' on line 5 in Unknown on line 0 Fatal error: [snuffleupagus][0.0.0.0][config][log] Invalid configuration file in Unknown on line 0 -Could not startup. \ No newline at end of file +Could not startup. diff --git a/src/tests/broken_configuration/broken_conf_invalid_cidr.phpt b/src/tests/broken_configuration/broken_conf_invalid_cidr.phpt index 781ccd5..e618676 100644 --- a/src/tests/broken_configuration/broken_conf_invalid_cidr.phpt +++ b/src/tests/broken_configuration/broken_conf_invalid_cidr.phpt @@ -2,6 +2,7 @@ Broken configuration --SKIPIF-- += 80000) print "skip"; ?> --INI-- sp.configuration_file={PWD}/config/broken_conf_invalid_cidr.ini --FILE-- @@ -11,4 +12,4 @@ PHP Fatal error: [snuffleupagus][0.0.0.0][config][log] '42' isn't a valid ipv4 Fatal error: [snuffleupagus][0.0.0.0][config][log] '42' isn't a valid ipv4 mask. in Unknown on line 0 Fatal error: [snuffleupagus][0.0.0.0][config][log] Invalid configuration file in Unknown on line 0 -Could not startup. \ No newline at end of file +Could not startup. diff --git a/src/tests/broken_configuration/broken_conf_invalid_cidr6.phpt b/src/tests/broken_configuration/broken_conf_invalid_cidr6.phpt index 60c4f15..34a0d30 100644 --- a/src/tests/broken_configuration/broken_conf_invalid_cidr6.phpt +++ b/src/tests/broken_configuration/broken_conf_invalid_cidr6.phpt @@ -2,6 +2,7 @@ Broken configuration --SKIPIF-- += 80000) print "skip"; ?> --INI-- sp.configuration_file={PWD}/config/broken_conf_invalid_cidr6.ini --FILE-- @@ -11,4 +12,4 @@ PHP Fatal error: [snuffleupagus][0.0.0.0][config][log] 'ZZZ' isn't a valid netw Fatal error: [snuffleupagus][0.0.0.0][config][log] 'ZZZ' isn't a valid network mask. in Unknown on line 0 Fatal error: [snuffleupagus][0.0.0.0][config][log] Invalid configuration file in Unknown on line 0 -Could not startup. \ No newline at end of file +Could not startup. diff --git a/src/tests/broken_configuration/broken_conf_invalid_cidr6_no_slash.phpt b/src/tests/broken_configuration/broken_conf_invalid_cidr6_no_slash.phpt index acb88f9..8703dff 100644 --- a/src/tests/broken_configuration/broken_conf_invalid_cidr6_no_slash.phpt +++ b/src/tests/broken_configuration/broken_conf_invalid_cidr6_no_slash.phpt @@ -2,6 +2,7 @@ Broken configuration, invalid cidr for ipv6 because there is no `/` in it --SKIPIF-- += 80000) print "skip"; ?> --INI-- sp.configuration_file={PWD}/config/broken_conf_invalid_cidr6_no_slash.ini --FILE-- @@ -11,4 +12,4 @@ PHP Fatal error: [snuffleupagus][0.0.0.0][config][log] '2001:0db8:0000:0000:000 Fatal error: [snuffleupagus][0.0.0.0][config][log] '2001:0db8:0000:0000:0000:ff00:0042:8329' isn't a valid network mask, it seems that you forgot a '/'. in Unknown on line 0 Fatal error: [snuffleupagus][0.0.0.0][config][log] Invalid configuration file in Unknown on line 0 -Could not startup. \ No newline at end of file +Could not startup. diff --git a/src/tests/broken_configuration/broken_conf_invalid_cidr_value.phpt b/src/tests/broken_configuration/broken_conf_invalid_cidr_value.phpt index ac3fb47..1424853 100644 --- a/src/tests/broken_configuration/broken_conf_invalid_cidr_value.phpt +++ b/src/tests/broken_configuration/broken_conf_invalid_cidr_value.phpt @@ -3,6 +3,7 @@ Broken configuration, invalid cidr value (13337%128 = 25) --SKIPIF-- += 80000) print "skip"; ?> --INI-- sp.configuration_file={PWD}/config/broken_conf_invalid_cidr_value.ini --FILE-- @@ -15,4 +16,4 @@ Fatal error: [snuffleupagus][0.0.0.0][error][log] A valid string as parameter is Fatal error: [snuffleupagus][0.0.0.0][config][log] " doesn't contain a valid cidr on line 1 in Unknown on line 0 Fatal error: [snuffleupagus][0.0.0.0][config][log] Invalid configuration file in Unknown on line 0 -Could not startup. \ No newline at end of file +Could not startup. diff --git a/src/tests/broken_configuration/broken_conf_invalid_filename.phpt b/src/tests/broken_configuration/broken_conf_invalid_filename.phpt index 8f4c501..b9a904c 100644 --- a/src/tests/broken_configuration/broken_conf_invalid_filename.phpt +++ b/src/tests/broken_configuration/broken_conf_invalid_filename.phpt @@ -2,6 +2,7 @@ Broken configuration filename without absolute path --SKIPIF-- += 80000) print "skip"; ?> --INI-- sp.configuration_file={PWD}/config/broken_conf_invalid_filename.ini --FILE-- @@ -11,4 +12,4 @@ PHP Fatal error: [snuffleupagus][0.0.0.0][config][log] Invalid configuration li Fatal error: [snuffleupagus][0.0.0.0][config][log] Invalid configuration line: 'sp.disabled_functions.function("sprintf").filename("wrong file name").drop();':'.filename' must be an absolute path or a phar archive on line 1 in Unknown on line 0 Fatal error: [snuffleupagus][0.0.0.0][config][log] Invalid configuration file in Unknown on line 0 -Could not startup. \ No newline at end of file +Could not startup. diff --git a/src/tests/broken_configuration/broken_conf_invalid_log_media.phpt b/src/tests/broken_configuration/broken_conf_invalid_log_media.phpt index bc048b3..c1c2668 100644 --- a/src/tests/broken_configuration/broken_conf_invalid_log_media.phpt +++ b/src/tests/broken_configuration/broken_conf_invalid_log_media.phpt @@ -2,6 +2,7 @@ Broken configuration filename with improper log media --SKIPIF-- += 80000) print "skip"; ?> --INI-- sp.configuration_file={PWD}/config/broken_conf_invalid_log_media.ini --FILE-- diff --git a/src/tests/broken_configuration/broken_conf_invalid_type.phpt b/src/tests/broken_configuration/broken_conf_invalid_type.phpt index b73cdd0..aeb6b85 100644 --- a/src/tests/broken_configuration/broken_conf_invalid_type.phpt +++ b/src/tests/broken_configuration/broken_conf_invalid_type.phpt @@ -2,6 +2,7 @@ Broken conf with wrong type --SKIPIF-- += 80000) print "skip"; ?> --INI-- sp.configuration_file={PWD}/config/broken_conf_invalid_type.ini --FILE-- @@ -11,4 +12,4 @@ PHP Fatal error: [snuffleupagus][0.0.0.0][error][log] There is an issue with th Fatal error: [snuffleupagus][0.0.0.0][error][log] There is an issue with the parsing of '"totally_wrong"_type")': it doesn't look like a valid string on line 1 in Unknown on line 0 Fatal error: [snuffleupagus][0.0.0.0][config][log] Invalid configuration file in Unknown on line 0 -Could not startup. \ No newline at end of file +Could not startup. diff --git a/src/tests/broken_configuration/broken_conf_key_value.phpt b/src/tests/broken_configuration/broken_conf_key_value.phpt index 3a0837a..ec87d93 100644 --- a/src/tests/broken_configuration/broken_conf_key_value.phpt +++ b/src/tests/broken_configuration/broken_conf_key_value.phpt @@ -2,6 +2,7 @@ Broken configuration --SKIPIF-- += 80000) print "skip"; ?> --INI-- sp.configuration_file={PWD}/config/broken_conf_key_value.ini --FILE-- @@ -11,4 +12,4 @@ PHP Fatal error: [snuffleupagus][0.0.0.0][config][log] Invalid configuration li Fatal error: [snuffleupagus][0.0.0.0][config][log] Invalid configuration line: 'sp.disabled_functions.function("system").var("").value("").key("").drop();':`key` and `value` are mutually exclusive on line 1 in Unknown on line 0 Fatal error: [snuffleupagus][0.0.0.0][config][log] Invalid configuration file in Unknown on line 0 -Could not startup. \ No newline at end of file +Could not startup. diff --git a/src/tests/broken_configuration/broken_conf_line_empty_string.phpt b/src/tests/broken_configuration/broken_conf_line_empty_string.phpt index 17ceeb9..3790d83 100644 --- a/src/tests/broken_configuration/broken_conf_line_empty_string.phpt +++ b/src/tests/broken_configuration/broken_conf_line_empty_string.phpt @@ -2,6 +2,7 @@ Configuration line with an empty string --SKIPIF-- += 80000) print "skip"; ?> --INI-- sp.configuration_file={PWD}/config/broken_conf_line_empty_string.ini --FILE-- @@ -11,4 +12,4 @@ PHP Fatal error: [snuffleupagus][0.0.0.0][error][log] A valid string as paramet Fatal error: [snuffleupagus][0.0.0.0][error][log] A valid string as parameter is expected on line 1 in Unknown on line 0 Fatal error: [snuffleupagus][0.0.0.0][config][log] Invalid configuration file in Unknown on line 0 -Could not startup. \ No newline at end of file +Could not startup. diff --git a/src/tests/broken_configuration/broken_conf_line_no_closing.phpt b/src/tests/broken_configuration/broken_conf_line_no_closing.phpt index d5a369b..0f51dcf 100644 --- a/src/tests/broken_configuration/broken_conf_line_no_closing.phpt +++ b/src/tests/broken_configuration/broken_conf_line_no_closing.phpt @@ -2,6 +2,7 @@ Configuration line without closing parenthese --SKIPIF-- += 80000) print "skip"; ?> --INI-- sp.configuration_file={PWD}/config/broken_conf_line_no_closing.ini --FILE-- @@ -11,4 +12,4 @@ PHP Fatal error: [snuffleupagus][0.0.0.0][error][log] There is an issue with th Fatal error: [snuffleupagus][0.0.0.0][error][log] There is an issue with the parsing of '"123"': it doesn't look like a valid string on line 1 in Unknown on line 0 Fatal error: [snuffleupagus][0.0.0.0][config][log] Invalid configuration file in Unknown on line 0 -Could not startup. \ No newline at end of file +Could not startup. diff --git a/src/tests/broken_configuration/broken_conf_local_var_1.phpt b/src/tests/broken_configuration/broken_conf_local_var_1.phpt index df401c4..851d532 100644 --- a/src/tests/broken_configuration/broken_conf_local_var_1.phpt +++ b/src/tests/broken_configuration/broken_conf_local_var_1.phpt @@ -2,6 +2,7 @@ Broken configuration --SKIPIF-- += 80000) print "skip"; ?> --INI-- sp.configuration_file={PWD}/config/broken_conf_local_var_1.ini --FILE-- @@ -14,4 +15,4 @@ Fatal error: [snuffleupagus][0.0.0.0][config][log] Invalid `]` position. in Unkn Fatal error: [snuffleupagus][0.0.0.0][config][log] Invalid value ']' for `var` on line 1 in Unknown on line 0 Fatal error: [snuffleupagus][0.0.0.0][config][log] Invalid configuration file in Unknown on line 0 -Could not startup. \ No newline at end of file +Could not startup. diff --git a/src/tests/broken_configuration/broken_conf_local_var_10.phpt b/src/tests/broken_configuration/broken_conf_local_var_10.phpt index 72a96b2..747cc5a 100644 --- a/src/tests/broken_configuration/broken_conf_local_var_10.phpt +++ b/src/tests/broken_configuration/broken_conf_local_var_10.phpt @@ -2,6 +2,7 @@ Broken configuration --SKIPIF-- += 80000) print "skip"; ?> --INI-- sp.configuration_file={PWD}/config/broken_conf_local_var_10.ini --FILE-- @@ -14,4 +15,4 @@ Fatal error: [snuffleupagus][0.0.0.0][config][log] Invalid `]` position. in Unkn Fatal error: [snuffleupagus][0.0.0.0][config][log] Invalid value 'asd[asd]asd' for `var` on line 1 in Unknown on line 0 Fatal error: [snuffleupagus][0.0.0.0][config][log] Invalid configuration file in Unknown on line 0 -Could not startup. \ No newline at end of file +Could not startup. diff --git a/src/tests/broken_configuration/broken_conf_local_var_11.phpt b/src/tests/broken_configuration/broken_conf_local_var_11.phpt index e67d11a..11ca562 100644 --- a/src/tests/broken_configuration/broken_conf_local_var_11.phpt +++ b/src/tests/broken_configuration/broken_conf_local_var_11.phpt @@ -2,6 +2,7 @@ Broken configuration --SKIPIF-- += 80000) print "skip"; ?> --INI-- sp.configuration_file={PWD}/config/broken_conf_local_var_11.ini --FILE-- @@ -14,4 +15,4 @@ Fatal error: [snuffleupagus][0.0.0.0][config][log] Invalid `::` position. in Unk Fatal error: [snuffleupagus][0.0.0.0][config][log] Invalid value 'asd::' for `param` on line 1 in Unknown on line 0 Fatal error: [snuffleupagus][0.0.0.0][config][log] Invalid configuration file in Unknown on line 0 -Could not startup. \ No newline at end of file +Could not startup. diff --git a/src/tests/broken_configuration/broken_conf_local_var_12.phpt b/src/tests/broken_configuration/broken_conf_local_var_12.phpt index 56f2863..962f5ab 100644 --- a/src/tests/broken_configuration/broken_conf_local_var_12.phpt +++ b/src/tests/broken_configuration/broken_conf_local_var_12.phpt @@ -2,6 +2,7 @@ Broken configuration --SKIPIF-- += 80000) print "skip"; ?> --INI-- sp.configuration_file={PWD}/config/broken_conf_local_var_12.ini --FILE-- @@ -11,4 +12,4 @@ PHP Fatal error: [snuffleupagus][0.0.0.0][config][log] Empty value in `var` on Fatal error: [snuffleupagus][0.0.0.0][config][log] Empty value in `var` on line 1 in Unknown on line 0 Fatal error: [snuffleupagus][0.0.0.0][config][log] Invalid configuration file in Unknown on line 0 -Could not startup. \ No newline at end of file +Could not startup. diff --git a/src/tests/broken_configuration/broken_conf_local_var_13.phpt b/src/tests/broken_configuration/broken_conf_local_var_13.phpt index 8e62627..5c33fdd 100644 --- a/src/tests/broken_configuration/broken_conf_local_var_13.phpt +++ b/src/tests/broken_configuration/broken_conf_local_var_13.phpt @@ -2,6 +2,7 @@ Broken configuration --SKIPIF-- += 80000) print "skip"; ?> --INI-- sp.configuration_file={PWD}/config/broken_conf_local_var_13.ini --FILE-- @@ -14,4 +15,4 @@ Fatal error: [snuffleupagus][0.0.0.0][config][log] Invalid `->` position. in Unk Fatal error: [snuffleupagus][0.0.0.0][config][log] Invalid value 'asd->asd' for `var` on line 1 in Unknown on line 0 Fatal error: [snuffleupagus][0.0.0.0][config][log] Invalid configuration file in Unknown on line 0 -Could not startup. \ No newline at end of file +Could not startup. diff --git a/src/tests/broken_configuration/broken_conf_local_var_14.phpt b/src/tests/broken_configuration/broken_conf_local_var_14.phpt index 24e2825..a831ef7 100644 --- a/src/tests/broken_configuration/broken_conf_local_var_14.phpt +++ b/src/tests/broken_configuration/broken_conf_local_var_14.phpt @@ -2,6 +2,7 @@ Broken configuration --SKIPIF-- += 80000) print "skip"; ?> --INI-- sp.configuration_file={PWD}/config/broken_conf_local_var_14.ini --FILE-- @@ -14,4 +15,4 @@ Fatal error: [snuffleupagus][0.0.0.0][config][log] Invalid var name: $i+valid va Fatal error: [snuffleupagus][0.0.0.0][config][log] Invalid value '$i+valid var name ' for `var` on line 1 in Unknown on line 0 Fatal error: [snuffleupagus][0.0.0.0][config][log] Invalid configuration file in Unknown on line 0 -Could not startup. \ No newline at end of file +Could not startup. diff --git a/src/tests/broken_configuration/broken_conf_local_var_15.phpt b/src/tests/broken_configuration/broken_conf_local_var_15.phpt index 5a4a0b5..5d8c6f1 100644 --- a/src/tests/broken_configuration/broken_conf_local_var_15.phpt +++ b/src/tests/broken_configuration/broken_conf_local_var_15.phpt @@ -2,6 +2,7 @@ Broken configuration --SKIPIF-- += 80000) print "skip"; ?> --INI-- sp.configuration_file={PWD}/config/broken_conf_local_var_15.ini --FILE-- @@ -14,4 +15,4 @@ Fatal error: [snuffleupagus][0.0.0.0][config][log] Invalid var name: $i$$!@#. in Fatal error: [snuffleupagus][0.0.0.0][config][log] Invalid value '$i$$!@#->qwe' for `var` on line 1 in Unknown on line 0 Fatal error: [snuffleupagus][0.0.0.0][config][log] Invalid configuration file in Unknown on line 0 -Could not startup. \ No newline at end of file +Could not startup. diff --git a/src/tests/broken_configuration/broken_conf_local_var_16.phpt b/src/tests/broken_configuration/broken_conf_local_var_16.phpt index 0556ab5..47c1f17 100644 --- a/src/tests/broken_configuration/broken_conf_local_var_16.phpt +++ b/src/tests/broken_configuration/broken_conf_local_var_16.phpt @@ -2,6 +2,7 @@ Broken configuration --SKIPIF-- += 80000) print "skip"; ?> --INI-- sp.configuration_file={PWD}/config/broken_conf_local_var_16.ini --FILE-- @@ -14,4 +15,4 @@ Fatal error: [snuffleupagus][0.0.0.0][config][log] Missing a closing quote. in U Fatal error: [snuffleupagus][0.0.0.0][config][log] Invalid value '"' for `var` on line 1 in Unknown on line 0 Fatal error: [snuffleupagus][0.0.0.0][config][log] Invalid configuration file in Unknown on line 0 -Could not startup. \ No newline at end of file +Could not startup. diff --git a/src/tests/broken_configuration/broken_conf_local_var_2.phpt b/src/tests/broken_configuration/broken_conf_local_var_2.phpt index 34c8ebf..ec7ac2c 100644 --- a/src/tests/broken_configuration/broken_conf_local_var_2.phpt +++ b/src/tests/broken_configuration/broken_conf_local_var_2.phpt @@ -2,6 +2,7 @@ Broken configuration --SKIPIF-- += 80000) print "skip"; ?> --INI-- sp.configuration_file={PWD}/config/broken_conf_local_var_2.ini --FILE-- @@ -14,4 +15,4 @@ Fatal error: [snuffleupagus][0.0.0.0][config][log] Invalid `"` position. in Unkn Fatal error: [snuffleupagus][0.0.0.0][config][log] Invalid value '""asd' for `var` on line 1 in Unknown on line 0 Fatal error: [snuffleupagus][0.0.0.0][config][log] Invalid configuration file in Unknown on line 0 -Could not startup. \ No newline at end of file +Could not startup. diff --git a/src/tests/broken_configuration/broken_conf_local_var_3.phpt b/src/tests/broken_configuration/broken_conf_local_var_3.phpt index 8deac1a..776cee0 100644 --- a/src/tests/broken_configuration/broken_conf_local_var_3.phpt +++ b/src/tests/broken_configuration/broken_conf_local_var_3.phpt @@ -2,6 +2,7 @@ Broken configuration --SKIPIF-- += 80000) print "skip"; ?> --INI-- sp.configuration_file={PWD}/config/broken_conf_local_var_3.ini --FILE-- @@ -14,4 +15,4 @@ Fatal error: [snuffleupagus][0.0.0.0][config][log] Invalid `->` position. in Unk Fatal error: [snuffleupagus][0.0.0.0][config][log] Invalid value '$qwe->::' for `var` on line 1 in Unknown on line 0 Fatal error: [snuffleupagus][0.0.0.0][config][log] Invalid configuration file in Unknown on line 0 -Could not startup. \ No newline at end of file +Could not startup. diff --git a/src/tests/broken_configuration/broken_conf_local_var_4.phpt b/src/tests/broken_configuration/broken_conf_local_var_4.phpt index ca38b2c..4390640 100644 --- a/src/tests/broken_configuration/broken_conf_local_var_4.phpt +++ b/src/tests/broken_configuration/broken_conf_local_var_4.phpt @@ -2,6 +2,7 @@ Broken configuration --SKIPIF-- += 80000) print "skip"; ?> --INI-- sp.configuration_file={PWD}/config/broken_conf_local_var_4.ini --FILE-- @@ -14,4 +15,4 @@ Fatal error: [snuffleupagus][0.0.0.0][config][log] Invalid `"` position. in Unkn Fatal error: [snuffleupagus][0.0.0.0][config][log] Invalid value '"asd"asd[]' for `var` on line 1 in Unknown on line 0 Fatal error: [snuffleupagus][0.0.0.0][config][log] Invalid configuration file in Unknown on line 0 -Could not startup. \ No newline at end of file +Could not startup. diff --git a/src/tests/broken_configuration/broken_conf_local_var_5.phpt b/src/tests/broken_configuration/broken_conf_local_var_5.phpt index 32f7c33..a73056e 100644 --- a/src/tests/broken_configuration/broken_conf_local_var_5.phpt +++ b/src/tests/broken_configuration/broken_conf_local_var_5.phpt @@ -2,6 +2,7 @@ Broken configuration --SKIPIF-- += 80000) print "skip"; ?> --INI-- sp.configuration_file={PWD}/config/broken_conf_local_var_5.ini --FILE-- @@ -14,4 +15,4 @@ Fatal error: [snuffleupagus][0.0.0.0][config][log] Invalid `'` position. in Unkn Fatal error: [snuffleupagus][0.0.0.0][config][log] Invalid value ''asd'asd[]' for `var` on line 1 in Unknown on line 0 Fatal error: [snuffleupagus][0.0.0.0][config][log] Invalid configuration file in Unknown on line 0 -Could not startup. \ No newline at end of file +Could not startup. diff --git a/src/tests/broken_configuration/broken_conf_local_var_6.phpt b/src/tests/broken_configuration/broken_conf_local_var_6.phpt index 5bfd11d..19b2915 100644 --- a/src/tests/broken_configuration/broken_conf_local_var_6.phpt +++ b/src/tests/broken_configuration/broken_conf_local_var_6.phpt @@ -2,6 +2,7 @@ Broken configuration --SKIPIF-- += 80000) print "skip"; ?> --INI-- sp.configuration_file={PWD}/config/broken_conf_local_var_6.ini --FILE-- @@ -14,4 +15,4 @@ Fatal error: [snuffleupagus][0.0.0.0][config][log] Invalid `'` position. in Unkn Fatal error: [snuffleupagus][0.0.0.0][config][log] Invalid value '''asd' for `var` on line 1 in Unknown on line 0 Fatal error: [snuffleupagus][0.0.0.0][config][log] Invalid configuration file in Unknown on line 0 -Could not startup. \ No newline at end of file +Could not startup. diff --git a/src/tests/broken_configuration/broken_conf_local_var_7.phpt b/src/tests/broken_configuration/broken_conf_local_var_7.phpt index aaa5161..62e983f 100644 --- a/src/tests/broken_configuration/broken_conf_local_var_7.phpt +++ b/src/tests/broken_configuration/broken_conf_local_var_7.phpt @@ -2,6 +2,7 @@ Broken configuration --SKIPIF-- += 80000) print "skip"; ?> --INI-- sp.configuration_file={PWD}/config/broken_conf_local_var_7.ini --FILE-- @@ -14,4 +15,4 @@ Fatal error: [snuffleupagus][0.0.0.0][config][log] Invalid `->` position. in Unk Fatal error: [snuffleupagus][0.0.0.0][config][log] Invalid value 'asd-->' for `var` on line 1 in Unknown on line 0 Fatal error: [snuffleupagus][0.0.0.0][config][log] Invalid configuration file in Unknown on line 0 -Could not startup. \ No newline at end of file +Could not startup. diff --git a/src/tests/broken_configuration/broken_conf_local_var_8.phpt b/src/tests/broken_configuration/broken_conf_local_var_8.phpt index f088523..1d170d2 100644 --- a/src/tests/broken_configuration/broken_conf_local_var_8.phpt +++ b/src/tests/broken_configuration/broken_conf_local_var_8.phpt @@ -2,6 +2,7 @@ Broken configuration --SKIPIF-- += 80000) print "skip"; ?> --INI-- sp.configuration_file={PWD}/config/broken_conf_local_var_8.ini --FILE-- @@ -14,4 +15,4 @@ Fatal error: [snuffleupagus][0.0.0.0][config][log] Invalid `]` position. in Unkn Fatal error: [snuffleupagus][0.0.0.0][config][log] Invalid value 'asd[asd]"asd"' for `var` on line 1 in Unknown on line 0 Fatal error: [snuffleupagus][0.0.0.0][config][log] Invalid configuration file in Unknown on line 0 -Could not startup. \ No newline at end of file +Could not startup. diff --git a/src/tests/broken_configuration/broken_conf_local_var_9.phpt b/src/tests/broken_configuration/broken_conf_local_var_9.phpt index c8fb793..5786e02 100644 --- a/src/tests/broken_configuration/broken_conf_local_var_9.phpt +++ b/src/tests/broken_configuration/broken_conf_local_var_9.phpt @@ -2,6 +2,7 @@ Broken configuration --SKIPIF-- += 80000) print "skip"; ?> --INI-- sp.configuration_file={PWD}/config/broken_conf_local_var_9.ini --FILE-- @@ -14,4 +15,4 @@ Fatal error: [snuffleupagus][0.0.0.0][config][log] Invalid `]` position. in Unkn Fatal error: [snuffleupagus][0.0.0.0][config][log] Invalid value 'asd[asd]'asd'' for `var` on line 1 in Unknown on line 0 Fatal error: [snuffleupagus][0.0.0.0][config][log] Invalid configuration file in Unknown on line 0 -Could not startup. \ No newline at end of file +Could not startup. diff --git a/src/tests/broken_configuration/broken_conf_lots_of_quotes.phpt b/src/tests/broken_configuration/broken_conf_lots_of_quotes.phpt index 1a6f61c..bef62b9 100644 --- a/src/tests/broken_configuration/broken_conf_lots_of_quotes.phpt +++ b/src/tests/broken_configuration/broken_conf_lots_of_quotes.phpt @@ -2,6 +2,7 @@ Configuration line with too many quotes --SKIPIF-- += 80000) print "skip"; ?> --INI-- sp.configuration_file={PWD}/config/broken_conf_lots_of_quotes.ini --FILE-- @@ -11,4 +12,4 @@ PHP Fatal error: [snuffleupagus][0.0.0.0][error][log] There is an issue with th Fatal error: [snuffleupagus][0.0.0.0][error][log] There is an issue with the parsing of '"this\"is a weird\"\"\"cookie\"name"");': it doesn't look like a valid string on line 1 in Unknown on line 0 Fatal error: [snuffleupagus][0.0.0.0][config][log] Invalid configuration file in Unknown on line 0 -Could not startup. \ No newline at end of file +Could not startup. diff --git a/src/tests/broken_configuration/broken_conf_missing_script.phpt b/src/tests/broken_configuration/broken_conf_missing_script.phpt index 8bbbff1..9deffc7 100644 --- a/src/tests/broken_configuration/broken_conf_missing_script.phpt +++ b/src/tests/broken_configuration/broken_conf_missing_script.phpt @@ -1,5 +1,7 @@ --TEST-- Invalid configuration file for upload +--SKIPIF-- += 80000) print "skip"; ?> --INI-- file_uploads=1 sp.configuration_file={PWD}/config/broken_conf_missing_script.ini diff --git a/src/tests/broken_configuration/broken_conf_mutually_exclusive.phpt b/src/tests/broken_configuration/broken_conf_mutually_exclusive.phpt index b1d86f1..a8036d2 100644 --- a/src/tests/broken_configuration/broken_conf_mutually_exclusive.phpt +++ b/src/tests/broken_configuration/broken_conf_mutually_exclusive.phpt @@ -2,6 +2,7 @@ Broken configuration --SKIPIF-- += 80000) print "skip"; ?> --INI-- sp.configuration_file={PWD}/config/broken_conf_mutually_exclusive.ini --FILE-- diff --git a/src/tests/broken_configuration/broken_conf_mutually_exclusive10.phpt b/src/tests/broken_configuration/broken_conf_mutually_exclusive10.phpt index dc1ad5c..932f584 100644 --- a/src/tests/broken_configuration/broken_conf_mutually_exclusive10.phpt +++ b/src/tests/broken_configuration/broken_conf_mutually_exclusive10.phpt @@ -2,6 +2,7 @@ Broken configuration - enabled/disabled readonly --SKIPIF-- += 80000) print "skip"; ?> --INI-- sp.configuration_file={PWD}/config/broken_conf_mutually_exclusive10.ini --FILE-- @@ -11,4 +12,4 @@ PHP Fatal error: [snuffleupagus][0.0.0.0][config][log] A rule can't be enabled Fatal error: [snuffleupagus][0.0.0.0][config][log] A rule can't be enabled and disabled on line 1 in Unknown on line 0 Fatal error: [snuffleupagus][0.0.0.0][config][log] Invalid configuration file in Unknown on line 0 -Could not startup. \ No newline at end of file +Could not startup. diff --git a/src/tests/broken_configuration/broken_conf_mutually_exclusive11.phpt b/src/tests/broken_configuration/broken_conf_mutually_exclusive11.phpt index 41c627b..62ae64e 100644 --- a/src/tests/broken_configuration/broken_conf_mutually_exclusive11.phpt +++ b/src/tests/broken_configuration/broken_conf_mutually_exclusive11.phpt @@ -2,6 +2,7 @@ Broken configuration - ret and var are mutually exclusives --SKIPIF-- += 80000) print "skip"; ?> --INI-- sp.configuration_file={PWD}/config/broken_conf_mutually_exclusive11.ini --FILE-- diff --git a/src/tests/broken_configuration/broken_conf_mutually_exclusive12.phpt b/src/tests/broken_configuration/broken_conf_mutually_exclusive12.phpt index e7d345c..28b0564 100644 --- a/src/tests/broken_configuration/broken_conf_mutually_exclusive12.phpt +++ b/src/tests/broken_configuration/broken_conf_mutually_exclusive12.phpt @@ -2,6 +2,7 @@ Broken configuration - ret and value are mutually exclusive --SKIPIF-- += 80000) print "skip"; ?> --INI-- sp.configuration_file={PWD}/config/broken_conf_mutually_exclusive12.ini --FILE-- diff --git a/src/tests/broken_configuration/broken_conf_mutually_exclusive2.phpt b/src/tests/broken_configuration/broken_conf_mutually_exclusive2.phpt index 64c6c3e..cc3a951 100644 --- a/src/tests/broken_configuration/broken_conf_mutually_exclusive2.phpt +++ b/src/tests/broken_configuration/broken_conf_mutually_exclusive2.phpt @@ -2,6 +2,7 @@ Broken configuration --SKIPIF-- += 80000) print "skip"; ?> --INI-- sp.configuration_file={PWD}/config/broken_conf_mutually_exclusive2.ini --FILE-- diff --git a/src/tests/broken_configuration/broken_conf_mutually_exclusive3.phpt b/src/tests/broken_configuration/broken_conf_mutually_exclusive3.phpt index 384c82a..ab50266 100644 --- a/src/tests/broken_configuration/broken_conf_mutually_exclusive3.phpt +++ b/src/tests/broken_configuration/broken_conf_mutually_exclusive3.phpt @@ -2,6 +2,7 @@ Broken configuration --SKIPIF-- += 80000) print "skip"; ?> --INI-- sp.configuration_file={PWD}/config/broken_conf_mutually_exclusive3.ini --FILE-- diff --git a/src/tests/broken_configuration/broken_conf_mutually_exclusive4.phpt b/src/tests/broken_configuration/broken_conf_mutually_exclusive4.phpt index 70eaea0..b848d1a 100644 --- a/src/tests/broken_configuration/broken_conf_mutually_exclusive4.phpt +++ b/src/tests/broken_configuration/broken_conf_mutually_exclusive4.phpt @@ -2,6 +2,7 @@ Broken configuration --SKIPIF-- += 80000) print "skip"; ?> --INI-- sp.configuration_file={PWD}/config/broken_conf_mutually_exclusive4.ini --FILE-- @@ -11,4 +12,4 @@ PHP Fatal error: [snuffleupagus][0.0.0.0][config][log] Invalid configuration li Fatal error: [snuffleupagus][0.0.0.0][config][log] Invalid configuration line: 'sp.disabled_functions.function("system").param("id").value("42").param_r("^id$").drop();':'.r_param', '.param' and '.pos' are mutually exclusive on line 1 in Unknown on line 0 Fatal error: [snuffleupagus][0.0.0.0][config][log] Invalid configuration file in Unknown on line 0 -Could not startup. \ No newline at end of file +Could not startup. diff --git a/src/tests/broken_configuration/broken_conf_mutually_exclusive5.phpt b/src/tests/broken_configuration/broken_conf_mutually_exclusive5.phpt index de82f3a..c668643 100644 --- a/src/tests/broken_configuration/broken_conf_mutually_exclusive5.phpt +++ b/src/tests/broken_configuration/broken_conf_mutually_exclusive5.phpt @@ -2,6 +2,7 @@ Broken configuration --SKIPIF-- += 80000) print "skip"; ?> --INI-- sp.configuration_file={PWD}/config/broken_conf_mutually_exclusive5.ini --FILE-- diff --git a/src/tests/broken_configuration/broken_conf_mutually_exclusive6.phpt b/src/tests/broken_configuration/broken_conf_mutually_exclusive6.phpt index c0415ac..94ed765 100644 --- a/src/tests/broken_configuration/broken_conf_mutually_exclusive6.phpt +++ b/src/tests/broken_configuration/broken_conf_mutually_exclusive6.phpt @@ -2,6 +2,7 @@ Broken configuration --SKIPIF-- += 80000) print "skip"; ?> --INI-- sp.configuration_file={PWD}/config/broken_conf_mutually_exclusive6.ini --FILE-- @@ -11,4 +12,4 @@ PHP Fatal error: [snuffleupagus][0.0.0.0][config][log] Invalid configuration li Fatal error: [snuffleupagus][0.0.0.0][config][log] Invalid configuration line: 'sp.disabled_functions.function("system").param("id").value("42").ret_r("^0$").drop();':`ret` and `param` are mutually exclusive on line 1 in Unknown on line 0 Fatal error: [snuffleupagus][0.0.0.0][config][log] Invalid configuration file in Unknown on line 0 -Could not startup. \ No newline at end of file +Could not startup. diff --git a/src/tests/broken_configuration/broken_conf_mutually_exclusive7.phpt b/src/tests/broken_configuration/broken_conf_mutually_exclusive7.phpt index 41e754e..2a16d0c 100644 --- a/src/tests/broken_configuration/broken_conf_mutually_exclusive7.phpt +++ b/src/tests/broken_configuration/broken_conf_mutually_exclusive7.phpt @@ -2,6 +2,7 @@ Broken configuration --SKIPIF-- += 80000) print "skip"; ?> --INI-- sp.configuration_file={PWD}/config/broken_conf_mutually_exclusive7.ini --FILE-- @@ -11,4 +12,4 @@ PHP Fatal error: [snuffleupagus][0.0.0.0][config][log] Invalid configuration li Fatal error: [snuffleupagus][0.0.0.0][config][log] Invalid configuration line: 'sp.disabled_functions.function("system").ret("0").drop().allow();': The rule must either be a `drop` or `allow` one on line 1 in Unknown on line 0 Fatal error: [snuffleupagus][0.0.0.0][config][log] Invalid configuration file in Unknown on line 0 -Could not startup. \ No newline at end of file +Could not startup. diff --git a/src/tests/broken_configuration/broken_conf_mutually_exclusive8.phpt b/src/tests/broken_configuration/broken_conf_mutually_exclusive8.phpt index e650d43..129707d 100644 --- a/src/tests/broken_configuration/broken_conf_mutually_exclusive8.phpt +++ b/src/tests/broken_configuration/broken_conf_mutually_exclusive8.phpt @@ -2,6 +2,7 @@ Broken configuration --SKIPIF-- += 80000) print "skip"; ?> --INI-- sp.configuration_file={PWD}/config/broken_conf_mutually_exclusive8.ini --FILE-- @@ -11,4 +12,4 @@ PHP Fatal error: [snuffleupagus][0.0.0.0][config][log] Invalid configuration li Fatal error: [snuffleupagus][0.0.0.0][config][log] Invalid configuration line: 'sp.disabled_functions.ret("0").drop();': must take a function name on line 1 in Unknown on line 0 Fatal error: [snuffleupagus][0.0.0.0][config][log] Invalid configuration file in Unknown on line 0 -Could not startup. \ No newline at end of file +Could not startup. diff --git a/src/tests/broken_configuration/broken_conf_mutually_exclusive9.phpt b/src/tests/broken_configuration/broken_conf_mutually_exclusive9.phpt index 46dfc28..b384d77 100644 --- a/src/tests/broken_configuration/broken_conf_mutually_exclusive9.phpt +++ b/src/tests/broken_configuration/broken_conf_mutually_exclusive9.phpt @@ -2,6 +2,7 @@ Broken configuration - enabled/disabled unserialize --SKIPIF-- += 80000) print "skip"; ?> --INI-- sp.configuration_file={PWD}/config/broken_conf_mutually_exclusive9.ini --FILE-- @@ -11,4 +12,4 @@ PHP Fatal error: [snuffleupagus][0.0.0.0][config][log] A rule can't be enabled Fatal error: [snuffleupagus][0.0.0.0][config][log] A rule can't be enabled and disabled on line 1 in Unknown on line 0 Fatal error: [snuffleupagus][0.0.0.0][config][log] Invalid configuration file in Unknown on line 0 -Could not startup. \ No newline at end of file +Could not startup. diff --git a/src/tests/broken_configuration/broken_conf_no_cookie_action.phpt b/src/tests/broken_configuration/broken_conf_no_cookie_action.phpt index da21967..62831d4 100644 --- a/src/tests/broken_configuration/broken_conf_no_cookie_action.phpt +++ b/src/tests/broken_configuration/broken_conf_no_cookie_action.phpt @@ -2,6 +2,7 @@ Bad config, invalid action. --SKIPIF-- += 80000) print "skip"; ?> --INI-- sp.configuration_file={PWD}/config/broken_conf_cookie_action.ini --FILE-- @@ -11,4 +12,4 @@ PHP Fatal error: [snuffleupagus][0.0.0.0][config][log] You must specify a at le Fatal error: [snuffleupagus][0.0.0.0][config][log] You must specify a at least one action to a cookie on line 1 in Unknown on line 0 Fatal error: [snuffleupagus][0.0.0.0][config][log] Invalid configuration file in Unknown on line 0 -Could not startup. \ No newline at end of file +Could not startup. diff --git a/src/tests/broken_configuration/broken_conf_no_cookie_name.phpt b/src/tests/broken_configuration/broken_conf_no_cookie_name.phpt index 6eed345..51d2980 100644 --- a/src/tests/broken_configuration/broken_conf_no_cookie_name.phpt +++ b/src/tests/broken_configuration/broken_conf_no_cookie_name.phpt @@ -2,6 +2,7 @@ Broken configuration - encrypted cookie with no name --SKIPIF-- += 80000) print "skip"; ?> --INI-- sp.configuration_file={PWD}/config/config_encrypted_cookies_noname.ini --FILE-- @@ -11,4 +12,4 @@ PHP Fatal error: [snuffleupagus][0.0.0.0][config][log] You must specify a cooki Fatal error: [snuffleupagus][0.0.0.0][config][log] You must specify a cookie name/regexp on line 2 in Unknown on line 0 Fatal error: [snuffleupagus][0.0.0.0][config][log] Invalid configuration file in Unknown on line 0 -Could not startup. \ No newline at end of file +Could not startup. diff --git a/src/tests/broken_configuration/broken_conf_nonexisting_script.phpt b/src/tests/broken_configuration/broken_conf_nonexisting_script.phpt index 64d8171..fa891d8 100644 --- a/src/tests/broken_configuration/broken_conf_nonexisting_script.phpt +++ b/src/tests/broken_configuration/broken_conf_nonexisting_script.phpt @@ -1,5 +1,7 @@ --TEST-- Invalid configuration file for upload +--SKIPIF-- += 80000) print "skip"; ?> --INI-- file_uploads=1 sp.configuration_file={PWD}/config/broken_conf_nonexisting_script.ini diff --git a/src/tests/broken_configuration/broken_conf_quotes.phpt b/src/tests/broken_configuration/broken_conf_quotes.phpt index 9a8de98..5b7b839 100644 --- a/src/tests/broken_configuration/broken_conf_quotes.phpt +++ b/src/tests/broken_configuration/broken_conf_quotes.phpt @@ -2,6 +2,7 @@ Broken configuration - missing quote --SKIPIF-- += 80000) print "skip"; ?> --INI-- sp.configuration_file={PWD}/config/broken_conf_quotes.ini --FILE-- @@ -14,4 +15,4 @@ Fatal error: [snuffleupagus][0.0.0.0][config][log] You forgot to close a bracket Fatal error: [snuffleupagus][0.0.0.0][config][log] Invalid value '_SERVER[PHP_SELF' for `var` on line 1 in Unknown on line 0 Fatal error: [snuffleupagus][0.0.0.0][config][log] Invalid configuration file in Unknown on line 0 -Could not startup. \ No newline at end of file +Could not startup. diff --git a/src/tests/broken_configuration/broken_conf_readonly_exec.phpt b/src/tests/broken_configuration/broken_conf_readonly_exec.phpt index 1df0923..78b2b9a 100644 --- a/src/tests/broken_configuration/broken_conf_readonly_exec.phpt +++ b/src/tests/broken_configuration/broken_conf_readonly_exec.phpt @@ -1,5 +1,7 @@ --TEST-- Invalid configuration file for readonly_exec +--SKIPIF-- += 80000) print "skip"; ?> --INI-- file_uploads=1 sp.configuration_file={PWD}/config/broken_conf_readonly_exec.ini diff --git a/src/tests/broken_configuration/broken_conf_samesite.phpt b/src/tests/broken_configuration/broken_conf_samesite.phpt index fd82903..e4940c9 100644 --- a/src/tests/broken_configuration/broken_conf_samesite.phpt +++ b/src/tests/broken_configuration/broken_conf_samesite.phpt @@ -2,6 +2,7 @@ Bad config, invalid samesite type. --SKIPIF-- += 80000) print "skip"; ?> --INI-- sp.configuration_file={PWD}/config/broken_conf_cookie_samesite.ini --FILE-- @@ -11,4 +12,4 @@ PHP Fatal error: [snuffleupagus][0.0.0.0][config][log] nop is an invalid value Fatal error: [snuffleupagus][0.0.0.0][config][log] nop is an invalid value to samesite (expected Lax or Strict) on line 1 in Unknown on line 0 Fatal error: [snuffleupagus][0.0.0.0][config][log] Invalid configuration file in Unknown on line 0 -Could not startup. \ No newline at end of file +Could not startup. diff --git a/src/tests/broken_configuration/broken_conf_session_encryption.phpt b/src/tests/broken_configuration/broken_conf_session_encryption.phpt index 2604f37..9dbedc1 100644 --- a/src/tests/broken_configuration/broken_conf_session_encryption.phpt +++ b/src/tests/broken_configuration/broken_conf_session_encryption.phpt @@ -2,6 +2,7 @@ Broken config, session encryption --SKIPIF-- += 80000) print "skip"; ?> --INI-- sp.configuration_file={PWD}/config/broken_conf_session_encryption.ini --FILE-- diff --git a/src/tests/broken_configuration/broken_conf_session_encryption_without_encryption_key.phpt b/src/tests/broken_configuration/broken_conf_session_encryption_without_encryption_key.phpt index 520ce79..c638f80 100644 --- a/src/tests/broken_configuration/broken_conf_session_encryption_without_encryption_key.phpt +++ b/src/tests/broken_configuration/broken_conf_session_encryption_without_encryption_key.phpt @@ -2,6 +2,7 @@ Broken configuration - encrypted session without encryption key --SKIPIF-- += 80000) print "skip"; ?> --INI-- sp.configuration_file={PWD}/config/broken_conf_session_encryption_without_encryption_key.ini --FILE-- diff --git a/src/tests/broken_configuration/broken_conf_session_encryption_without_env_var.phpt b/src/tests/broken_configuration/broken_conf_session_encryption_without_env_var.phpt index 0aba1ac..d503942 100644 --- a/src/tests/broken_configuration/broken_conf_session_encryption_without_env_var.phpt +++ b/src/tests/broken_configuration/broken_conf_session_encryption_without_env_var.phpt @@ -2,6 +2,7 @@ Broken configuration - encrypted session without env var --SKIPIF-- += 80000) print "skip"; ?> --INI-- sp.configuration_file={PWD}/config/broken_conf_session_encryption_without_env_var.ini --FILE-- diff --git a/src/tests/broken_configuration/broken_conf_shown_in_phpinfo.phpt b/src/tests/broken_configuration/broken_conf_shown_in_phpinfo.phpt index 15619de..1ad0afb 100644 --- a/src/tests/broken_configuration/broken_conf_shown_in_phpinfo.phpt +++ b/src/tests/broken_configuration/broken_conf_shown_in_phpinfo.phpt @@ -2,6 +2,7 @@ Broken configuration --SKIPIF-- += 80000) print "skip"; ?> --INI-- sp.configuration_file={PWD}/config/broken_config_regexp.ini --FILE-- diff --git a/src/tests/broken_configuration/broken_conf_truncated.phpt b/src/tests/broken_configuration/broken_conf_truncated.phpt index 035f308..6deff87 100644 --- a/src/tests/broken_configuration/broken_conf_truncated.phpt +++ b/src/tests/broken_configuration/broken_conf_truncated.phpt @@ -1,6 +1,7 @@ --TEST-- Bad boolean value in configuration --SKIPIF-- += 80000) print "skip"; ?> --INI-- sp.configuration_file={PWD}/config/config_broken_conf_truncated.ini @@ -11,4 +12,4 @@ PHP Fatal error: [snuffleupagus][0.0.0.0][error][log] A valid string as paramet Fatal error: [snuffleupagus][0.0.0.0][error][log] A valid string as parameter is expected on line 1 in Unknown on line 0 Fatal error: [snuffleupagus][0.0.0.0][config][log] Invalid configuration file in Unknown on line 0 -Could not startup. \ No newline at end of file +Could not startup. diff --git a/src/tests/broken_configuration/broken_conf_unserialize.phpt b/src/tests/broken_configuration/broken_conf_unserialize.phpt index e389177..a42d8a1 100644 --- a/src/tests/broken_configuration/broken_conf_unserialize.phpt +++ b/src/tests/broken_configuration/broken_conf_unserialize.phpt @@ -1,5 +1,7 @@ --TEST-- Invalid configuration file for unserialize +--SKIPIF-- += 80000) print "skip"; ?> --INI-- file_uploads=1 sp.configuration_file={PWD}/config/broken_conf_unserialize.ini diff --git a/src/tests/broken_configuration/broken_conf_upload_validation.phpt b/src/tests/broken_configuration/broken_conf_upload_validation.phpt index 553271b..4b65339 100644 --- a/src/tests/broken_configuration/broken_conf_upload_validation.phpt +++ b/src/tests/broken_configuration/broken_conf_upload_validation.phpt @@ -1,5 +1,7 @@ --TEST-- Invalid configuration file for upload validation +--SKIPIF-- += 80000) print "skip"; ?> --INI-- file_uploads=1 sp.configuration_file={PWD}/config/borken_conf_upload_validation.ini diff --git a/src/tests/broken_configuration/broken_conf_weird_keyword.phpt b/src/tests/broken_configuration/broken_conf_weird_keyword.phpt index 24e6047..ce568af 100644 --- a/src/tests/broken_configuration/broken_conf_weird_keyword.phpt +++ b/src/tests/broken_configuration/broken_conf_weird_keyword.phpt @@ -2,6 +2,7 @@ Bad config, unknown keyword --SKIPIF-- += 80000) print "skip"; ?> --INI-- sp.configuration_file={PWD}/config/broken_conf_weird_keyword.ini --FILE-- @@ -11,4 +12,4 @@ PHP Fatal error: [snuffleupagus][0.0.0.0][config][log] Trailing chars '.not_a_v Fatal error: [snuffleupagus][0.0.0.0][config][log] Trailing chars '.not_a_valid_keyword("test");' at the end of '.enable().not_a_valid_keyword("test");' on line 1 in Unknown on line 0 Fatal error: [snuffleupagus][0.0.0.0][config][log] Invalid configuration file in Unknown on line 0 -Could not startup. \ No newline at end of file +Could not startup. diff --git a/src/tests/broken_configuration/broken_conf_wrapper_whitelist.phpt b/src/tests/broken_configuration/broken_conf_wrapper_whitelist.phpt index c3e40c1..2d1feeb 100644 --- a/src/tests/broken_configuration/broken_conf_wrapper_whitelist.phpt +++ b/src/tests/broken_configuration/broken_conf_wrapper_whitelist.phpt @@ -2,6 +2,7 @@ Broken configuration with invalid token for wrapper whitelist --SKIPIF-- += 80000) print "skip"; ?> --INI-- sp.configuration_file={PWD}/config/broken_conf_wrapper_whitelist.ini sp.allow_broken_configuration=Off diff --git a/src/tests/broken_configuration/broken_conf_wrong_quotes.phpt b/src/tests/broken_configuration/broken_conf_wrong_quotes.phpt index b61cf3f..3753989 100644 --- a/src/tests/broken_configuration/broken_conf_wrong_quotes.phpt +++ b/src/tests/broken_configuration/broken_conf_wrong_quotes.phpt @@ -2,6 +2,7 @@ Configuration line with too many quotes --SKIPIF-- += 80000) print "skip"; ?> --INI-- sp.configuration_file={PWD}/config/broken_conf_wrong_quotes.ini --FILE-- @@ -11,4 +12,4 @@ PHP Fatal error: [snuffleupagus][0.0.0.0][error][log] There is an issue with th Fatal error: [snuffleupagus][0.0.0.0][error][log] There is an issue with the parsing of '"\)': it doesn't look like a valid string on line 1 in Unknown on line 0 Fatal error: [snuffleupagus][0.0.0.0][config][log] Invalid configuration file in Unknown on line 0 -Could not startup. \ No newline at end of file +Could not startup. diff --git a/src/tests/broken_configuration/broken_conf_wrong_type.phpt b/src/tests/broken_configuration/broken_conf_wrong_type.phpt index 32e8499..b204968 100644 --- a/src/tests/broken_configuration/broken_conf_wrong_type.phpt +++ b/src/tests/broken_configuration/broken_conf_wrong_type.phpt @@ -2,6 +2,7 @@ Broken conf with wrong type --SKIPIF-- += 80000) print "skip"; ?> --INI-- sp.configuration_file={PWD}/config/broken_conf_wrong_type.ini --FILE-- diff --git a/src/tests/broken_configuration/broken_regexp.phpt b/src/tests/broken_configuration/broken_regexp.phpt index 3d06ba1..83c7103 100644 --- a/src/tests/broken_configuration/broken_regexp.phpt +++ b/src/tests/broken_configuration/broken_regexp.phpt @@ -2,6 +2,7 @@ Broken regexp --SKIPIF-- += 80000) print "skip"; ?> --INI-- sp.configuration_file={PWD}/config/broken_regexp.ini --FILE-- @@ -14,4 +15,4 @@ Fatal error: [snuffleupagus][0.0.0.0][config][log] Failed to compile '^$[': miss Fatal error: [snuffleupagus][0.0.0.0][config][log] '.value_r()' is expecting a valid regexp, and not '"^$["' on line 1 in Unknown on line 0 Fatal error: [snuffleupagus][0.0.0.0][config][log] Invalid configuration file in Unknown on line 0 -Could not startup. \ No newline at end of file +Could not startup. diff --git a/src/tests/broken_configuration/broken_unmatching_brackets.phpt b/src/tests/broken_configuration/broken_unmatching_brackets.phpt index 46c81f9..ba14ff3 100644 --- a/src/tests/broken_configuration/broken_unmatching_brackets.phpt +++ b/src/tests/broken_configuration/broken_unmatching_brackets.phpt @@ -2,6 +2,7 @@ Broken configuration - unmatching brackets --SKIPIF-- += 80000) print "skip"; ?> --INI-- sp.configuration_file={PWD}/config/config_unmatching_brackets.ini --FILE-- @@ -14,4 +15,4 @@ Fatal error: [snuffleupagus][0.0.0.0][config][log] Invalid `]` position. in Unkn Fatal error: [snuffleupagus][0.0.0.0][config][log] Invalid value 'arr[b]]]]]' for `param` on line 1 in Unknown on line 0 Fatal error: [snuffleupagus][0.0.0.0][config][log] Invalid configuration file in Unknown on line 0 -Could not startup. \ No newline at end of file +Could not startup. diff --git a/src/tests/config_typo3.phpt b/src/tests/config_typo3.phpt index 6545d07..bae7686 100644 --- a/src/tests/config_typo3.phpt +++ b/src/tests/config_typo3.phpt @@ -2,6 +2,7 @@ Rules for Typo3 --SKIPIF-- += 80000) print "skip"; ?> --INI-- sp.configuration_file={PWD}/../../config/typo3.rules --FILE-- diff --git a/src/tests/cookies_encryption/encrypt_cookies2.phpt b/src/tests/cookies_encryption/encrypt_cookies2.phpt index 18c6b41..b71aaa9 100644 --- a/src/tests/cookies_encryption/encrypt_cookies2.phpt +++ b/src/tests/cookies_encryption/encrypt_cookies2.phpt @@ -2,6 +2,7 @@ Cookie encryption in ipv4 --SKIPIF-- += 80000) print "skip"; ?> --INI-- sp.configuration_file={PWD}/config/config_encrypted_regexp_cookies.ini --COOKIE-- diff --git a/src/tests/cookies_encryption/encrypt_cookies4.phpt b/src/tests/cookies_encryption/encrypt_cookies4.phpt index da694e5..fa36756 100644 --- a/src/tests/cookies_encryption/encrypt_cookies4.phpt +++ b/src/tests/cookies_encryption/encrypt_cookies4.phpt @@ -2,6 +2,7 @@ Cookie encryption in ipv6 --SKIPIF-- += 80000) print "skip"; ?> --INI-- sp.configuration_file={PWD}/config/config_encrypted_cookies.ini --COOKIE-- diff --git a/src/tests/cookies_encryption/encrypt_regexp_cookies2.phpt b/src/tests/cookies_encryption/encrypt_regexp_cookies2.phpt index 18c6b41..b71aaa9 100644 --- a/src/tests/cookies_encryption/encrypt_regexp_cookies2.phpt +++ b/src/tests/cookies_encryption/encrypt_regexp_cookies2.phpt @@ -2,6 +2,7 @@ Cookie encryption in ipv4 --SKIPIF-- += 80000) print "skip"; ?> --INI-- sp.configuration_file={PWD}/config/config_encrypted_regexp_cookies.ini --COOKIE-- diff --git a/src/tests/cookies_encryption/setcookie.phpt b/src/tests/cookies_encryption/setcookie.phpt index 87a72c6..4e86984 100644 --- a/src/tests/cookies_encryption/setcookie.phpt +++ b/src/tests/cookies_encryption/setcookie.phpt @@ -2,6 +2,7 @@ Set cookies. --SKIPIF-- += 80000) print "skip"; ?> --INI-- sp.configuration_file={PWD}/config/config_encrypted_cookies.ini --COOKIE-- diff --git a/src/tests/disable_function/disabled_function_echo.phpt b/src/tests/disable_function/disabled_function_echo.phpt index 5b66880..147fac8 100644 --- a/src/tests/disable_function/disabled_function_echo.phpt +++ b/src/tests/disable_function/disabled_function_echo.phpt @@ -2,6 +2,7 @@ Echo hooking --SKIPIF-- += 80000) print "skip"; ?> --INI-- sp.configuration_file={PWD}/config/disabled_function_echo.ini --FILE-- @@ -16,4 +17,4 @@ test("oops"); --CLEAN-- --EXPECTF-- qwerty -Fatal error: [snuffleupagus][0.0.0.0][disabled_function][drop] Aborted execution on call of the function 'echo' in %a/disabled_function_echo.php on line 3 \ No newline at end of file +Fatal error: [snuffleupagus][0.0.0.0][disabled_function][drop] Aborted execution on call of the function 'echo' in %a/disabled_function_echo.php on line 3 diff --git a/src/tests/disable_function/disabled_function_echo_2.phpt b/src/tests/disable_function/disabled_function_echo_2.phpt index 60cc2f7..53355e9 100644 --- a/src/tests/disable_function/disabled_function_echo_2.phpt +++ b/src/tests/disable_function/disabled_function_echo_2.phpt @@ -2,6 +2,7 @@ Echo hooking --SKIPIF-- += 80000) print "skip"; ?> --INI-- sp.configuration_file={PWD}/config/disabled_function_echo.ini --FILE-- @@ -12,4 +13,4 @@ echo "1", "oops"; --CLEAN-- --EXPECTF-- qwe1 -Fatal error: [snuffleupagus][0.0.0.0][disabled_function][drop] Aborted execution on call of the function 'echo' in %a/disabled_function_echo_2.php on line 3 \ No newline at end of file +Fatal error: [snuffleupagus][0.0.0.0][disabled_function][drop] Aborted execution on call of the function 'echo' in %a/disabled_function_echo_2.php on line 3 diff --git a/src/tests/disable_function/disabled_function_echo_local_var.phpt b/src/tests/disable_function/disabled_function_echo_local_var.phpt index 3a886f2..a614f1f 100644 --- a/src/tests/disable_function/disabled_function_echo_local_var.phpt +++ b/src/tests/disable_function/disabled_function_echo_local_var.phpt @@ -2,6 +2,7 @@ Echo hooking --SKIPIF-- += 80000) print "skip"; ?> --INI-- sp.configuration_file={PWD}/config/disabled_function_echo.ini --FILE-- @@ -18,4 +19,4 @@ test(); --EXPECTF-- 3 -Fatal error: [snuffleupagus][0.0.0.0][disabled_function][drop] Aborted execution on call of the function 'echo' in %a/disabled_function_echo_local_var.php on line 3 \ No newline at end of file +Fatal error: [snuffleupagus][0.0.0.0][disabled_function][drop] Aborted execution on call of the function 'echo' in %a/disabled_function_echo_local_var.php on line 3 diff --git a/src/tests/disable_function/disabled_function_ensure_client_valid_certs.phpt b/src/tests/disable_function/disabled_function_ensure_client_valid_certs.phpt index 9872374..6197e68 100644 --- a/src/tests/disable_function/disabled_function_ensure_client_valid_certs.phpt +++ b/src/tests/disable_function/disabled_function_ensure_client_valid_certs.phpt @@ -5,6 +5,7 @@ Disable functions - Ensure that client certificates validation can't be disabled if (!extension_loaded("snuffleupagus")) { print("skip"); } if (!extension_loaded("curl")) { print("skip"); } ?> += 80000) print "skip"; ?> --EXTENSIONS-- curl --INI-- diff --git a/src/tests/disable_function/disabled_function_ensure_client_valid_certs_curl_multi_setopt.phpt b/src/tests/disable_function/disabled_function_ensure_client_valid_certs_curl_multi_setopt.phpt index 45ae95e..c469e94 100644 --- a/src/tests/disable_function/disabled_function_ensure_client_valid_certs_curl_multi_setopt.phpt +++ b/src/tests/disable_function/disabled_function_ensure_client_valid_certs_curl_multi_setopt.phpt @@ -5,6 +5,7 @@ Disable functions - Ensure that client certificates validation can't be disabled if (!extension_loaded("snuffleupagus")) { print("skip"); } if (!extension_loaded("curl")) { print("skip"); } ?> += 80000) print "skip"; ?> --EXTENSIONS-- curl --INI-- diff --git a/src/tests/disable_function/disabled_function_ensure_client_valid_certs_curl_setopt_array.phpt b/src/tests/disable_function/disabled_function_ensure_client_valid_certs_curl_setopt_array.phpt index 93ed020..fec94c5 100644 --- a/src/tests/disable_function/disabled_function_ensure_client_valid_certs_curl_setopt_array.phpt +++ b/src/tests/disable_function/disabled_function_ensure_client_valid_certs_curl_setopt_array.phpt @@ -5,6 +5,7 @@ Disable functions - Ensure that client certificates validation can't be disabled if (!extension_loaded("snuffleupagus")) { print("skip"); } if (!extension_loaded("curl")) { print("skip"); } ?> += 80000) print "skip"; ?> --EXTENSIONS-- curl --INI-- diff --git a/src/tests/disable_function/disabled_function_ensure_server_valid_certs.phpt b/src/tests/disable_function/disabled_function_ensure_server_valid_certs.phpt index 6e027de..354d3db 100644 --- a/src/tests/disable_function/disabled_function_ensure_server_valid_certs.phpt +++ b/src/tests/disable_function/disabled_function_ensure_server_valid_certs.phpt @@ -5,6 +5,7 @@ Disable functions - Ensure that server certificates validation can't be disabled if (!extension_loaded("snuffleupagus")) { print("skip"); } if (!extension_loaded("curl")) { print("skip"); } ?> += 80000) print "skip"; ?> --EXTENSIONS-- curl --INI-- diff --git a/src/tests/disable_function/disabled_function_ensure_server_valid_certs_curl_multi_setopt.phpt b/src/tests/disable_function/disabled_function_ensure_server_valid_certs_curl_multi_setopt.phpt index 32013b5..7c03c7e 100644 --- a/src/tests/disable_function/disabled_function_ensure_server_valid_certs_curl_multi_setopt.phpt +++ b/src/tests/disable_function/disabled_function_ensure_server_valid_certs_curl_multi_setopt.phpt @@ -5,6 +5,7 @@ Disable functions - Ensure that server certificates validation can't be disabled if (!extension_loaded("snuffleupagus")) { print("skip"); } if (!extension_loaded("curl")) { print("skip"); } ?> += 80000) print "skip"; ?> --EXTENSIONS-- curl --INI-- diff --git a/src/tests/disable_function/disabled_function_ensure_server_valid_certs_curl_setopt_array.phpt b/src/tests/disable_function/disabled_function_ensure_server_valid_certs_curl_setopt_array.phpt index ec0528a..f6f63ba 100644 --- a/src/tests/disable_function/disabled_function_ensure_server_valid_certs_curl_setopt_array.phpt +++ b/src/tests/disable_function/disabled_function_ensure_server_valid_certs_curl_setopt_array.phpt @@ -5,6 +5,7 @@ Disable functions - Ensure that server certificates validation can't be disabled if (!extension_loaded("snuffleupagus")) { echo("skip"); } if (!extension_loaded("curl")) { echo("skip"); } ?> += 80000) print "skip"; ?> --EXTENSIONS-- curl --INI-- diff --git a/src/tests/disable_function/disabled_function_local_var.phpt b/src/tests/disable_function/disabled_function_local_var.phpt index c28fd8c..fb4b7a1 100644 --- a/src/tests/disable_function/disabled_function_local_var.phpt +++ b/src/tests/disable_function/disabled_function_local_var.phpt @@ -2,6 +2,7 @@ Disable functions - match on a local variable --SKIPIF-- += 80000) print "skip"; ?> --INI-- sp.configuration_file={PWD}/config/disabled_function_local_var.ini --FILE-- diff --git a/src/tests/disable_function/disabled_function_local_var_10.phpt b/src/tests/disable_function/disabled_function_local_var_10.phpt index eefb161..b9c9491 100644 --- a/src/tests/disable_function/disabled_function_local_var_10.phpt +++ b/src/tests/disable_function/disabled_function_local_var_10.phpt @@ -2,6 +2,7 @@ Disable functions - match on a local variable --SKIPIF-- += 80000) print "skip"; ?> --INI-- sp.configuration_file={PWD}/config/disabled_function_local_var.ini --FILE-- @@ -42,4 +43,4 @@ array(2) { } } -Fatal error: [snuffleupagus][0.0.0.0][disabled_function][drop] Aborted execution on call of the function 'strtoupper' in %a/disabled_function_local_var_10.php on line 7 \ No newline at end of file +Fatal error: [snuffleupagus][0.0.0.0][disabled_function][drop] Aborted execution on call of the function 'strtoupper' in %a/disabled_function_local_var_10.php on line 7 diff --git a/src/tests/disable_function/disabled_function_local_var_2.phpt b/src/tests/disable_function/disabled_function_local_var_2.phpt index 076c3c5..b073f8b 100644 --- a/src/tests/disable_function/disabled_function_local_var_2.phpt +++ b/src/tests/disable_function/disabled_function_local_var_2.phpt @@ -2,6 +2,7 @@ Disable functions - match on a local variable --SKIPIF-- += 80000) print "skip"; ?> --INI-- sp.configuration_file={PWD}/config/disabled_function_local_var.ini --FILE-- diff --git a/src/tests/disable_function/disabled_function_local_var_3.phpt b/src/tests/disable_function/disabled_function_local_var_3.phpt index f404682..0bb3074 100644 --- a/src/tests/disable_function/disabled_function_local_var_3.phpt +++ b/src/tests/disable_function/disabled_function_local_var_3.phpt @@ -2,6 +2,7 @@ Disable functions - match on a local variable --SKIPIF-- += 80000) print "skip"; ?> --INI-- sp.configuration_file={PWD}/config/disabled_function_local_var.ini --FILE-- diff --git a/src/tests/disable_function/disabled_function_local_var_4.phpt b/src/tests/disable_function/disabled_function_local_var_4.phpt index f290a8b..7aa5e0c 100644 --- a/src/tests/disable_function/disabled_function_local_var_4.phpt +++ b/src/tests/disable_function/disabled_function_local_var_4.phpt @@ -2,6 +2,7 @@ Disable functions - match on a local variable --SKIPIF-- += 80000) print "skip"; ?> --INI-- sp.configuration_file={PWD}/config/disabled_function_local_var_2.ini --FILE-- @@ -54,4 +55,4 @@ test(); Valeur: valeur de a Valeur: valeur de apres -Fatal error: [snuffleupagus][0.0.0.0][disabled_function][drop] Aborted execution on call of the function 'strtoupper' in %a/disabled_function_local_var_4.php on line 36 \ No newline at end of file +Fatal error: [snuffleupagus][0.0.0.0][disabled_function][drop] Aborted execution on call of the function 'strtoupper' in %a/disabled_function_local_var_4.php on line 36 diff --git a/src/tests/disable_function/disabled_function_local_var_5.phpt b/src/tests/disable_function/disabled_function_local_var_5.phpt index 7e592cd..dec1140 100644 --- a/src/tests/disable_function/disabled_function_local_var_5.phpt +++ b/src/tests/disable_function/disabled_function_local_var_5.phpt @@ -2,6 +2,7 @@ Disable functions - match on a local variable --SKIPIF-- += 80000) print "skip"; ?> --INI-- sp.configuration_file={PWD}/config/disabled_function_local_var.ini --FILE-- diff --git a/src/tests/disable_function/disabled_function_local_var_6.phpt b/src/tests/disable_function/disabled_function_local_var_6.phpt index b2a16bf..71fe777 100644 --- a/src/tests/disable_function/disabled_function_local_var_6.phpt +++ b/src/tests/disable_function/disabled_function_local_var_6.phpt @@ -2,6 +2,7 @@ Disable functions - match on a local variable --SKIPIF-- += 80000) print "skip"; ?> --INI-- sp.configuration_file={PWD}/config/disabled_function_local_var.ini --FILE-- @@ -29,4 +30,4 @@ class test_object { --EXPECTF-- Valeur: no good -Fatal error: [snuffleupagus][0.0.0.0][disabled_function][drop] Aborted execution on call of the function 'strtoupper' in %a/disabled_function_local_var_6.php on line 4 \ No newline at end of file +Fatal error: [snuffleupagus][0.0.0.0][disabled_function][drop] Aborted execution on call of the function 'strtoupper' in %a/disabled_function_local_var_6.php on line 4 diff --git a/src/tests/disable_function/disabled_function_local_var_7.phpt b/src/tests/disable_function/disabled_function_local_var_7.phpt index e15a430..2a074c8 100644 --- a/src/tests/disable_function/disabled_function_local_var_7.phpt +++ b/src/tests/disable_function/disabled_function_local_var_7.phpt @@ -2,6 +2,7 @@ Disable functions - match on a local variable --SKIPIF-- += 80000) print "skip"; ?> --INI-- sp.configuration_file={PWD}/config/disabled_function_local_var.ini --FILE-- @@ -29,4 +30,4 @@ class test_object { --EXPECTF-- Valeur: qwerty -Fatal error: [snuffleupagus][0.0.0.0][disabled_function][drop] Aborted execution on call of the function 'strtoupper' in %a/disabled_function_local_var_7.php on line 4 \ No newline at end of file +Fatal error: [snuffleupagus][0.0.0.0][disabled_function][drop] Aborted execution on call of the function 'strtoupper' in %a/disabled_function_local_var_7.php on line 4 diff --git a/src/tests/disable_function/disabled_function_local_var_8.phpt b/src/tests/disable_function/disabled_function_local_var_8.phpt index 4f1b4c5..65b4b35 100644 --- a/src/tests/disable_function/disabled_function_local_var_8.phpt +++ b/src/tests/disable_function/disabled_function_local_var_8.phpt @@ -2,6 +2,7 @@ Disable functions - match on a local variable --SKIPIF-- += 80000) print "skip"; ?> --INI-- sp.configuration_file={PWD}/config/disabled_function_local_var.ini --FILE-- @@ -18,4 +19,4 @@ namespace asd { --EXPECTF-- Valeur: qwerty -Fatal error: [snuffleupagus][0.0.0.0][disabled_function][drop] Aborted execution on call of the function 'strtoupper' in %a/disabled_function_local_var_8.php on line 8 \ No newline at end of file +Fatal error: [snuffleupagus][0.0.0.0][disabled_function][drop] Aborted execution on call of the function 'strtoupper' in %a/disabled_function_local_var_8.php on line 8 diff --git a/src/tests/disable_function/disabled_function_local_var_9.phpt b/src/tests/disable_function/disabled_function_local_var_9.phpt index eddb1ea..dd86d21 100644 --- a/src/tests/disable_function/disabled_function_local_var_9.phpt +++ b/src/tests/disable_function/disabled_function_local_var_9.phpt @@ -2,6 +2,7 @@ Disable functions - match on a local variable --SKIPIF-- += 80000) print "skip"; ?> --INI-- sp.configuration_file={PWD}/config/disabled_function_local_var.ini --FILE-- @@ -18,4 +19,4 @@ namespace asd { --EXPECTF-- Valeur: asdfgh -Fatal error: [snuffleupagus][0.0.0.0][disabled_function][drop] Aborted execution on call of the function 'strtoupper' in %a/disabled_function_local_var_9.php on line 8 \ No newline at end of file +Fatal error: [snuffleupagus][0.0.0.0][disabled_function][drop] Aborted execution on call of the function 'strtoupper' in %a/disabled_function_local_var_9.php on line 8 diff --git a/src/tests/disable_function/disabled_function_local_var_const.phpt b/src/tests/disable_function/disabled_function_local_var_const.phpt index a0912d9..1a2767b 100644 --- a/src/tests/disable_function/disabled_function_local_var_const.phpt +++ b/src/tests/disable_function/disabled_function_local_var_const.phpt @@ -2,6 +2,7 @@ Disable functions - match on a constant --SKIPIF-- += 80000) print "skip"; ?> --INI-- sp.configuration_file={PWD}/config/disabled_function_local_var_const.ini --FILE-- @@ -11,4 +12,4 @@ define("MY_CONST", $a); strtoupper("test"); ?> --EXPECTF-- -Fatal error: [snuffleupagus][0.0.0.0][disabled_function][drop] Aborted execution on call of the function 'strtoupper' in %a/disabled_function_local_var_const.php on line 4 \ No newline at end of file +Fatal error: [snuffleupagus][0.0.0.0][disabled_function][drop] Aborted execution on call of the function 'strtoupper' in %a/disabled_function_local_var_const.php on line 4 diff --git a/src/tests/disable_function/disabled_function_local_var_crash.phpt b/src/tests/disable_function/disabled_function_local_var_crash.phpt index f36b2c7..d29fcdc 100644 --- a/src/tests/disable_function/disabled_function_local_var_crash.phpt +++ b/src/tests/disable_function/disabled_function_local_var_crash.phpt @@ -2,6 +2,7 @@ Disable functions - match on a local variable --SKIPIF-- += 80000) print "skip"; ?> --INI-- sp.configuration_file={PWD}/config/disabled_function_local_var.ini --FILE-- diff --git a/src/tests/disable_function/disabled_function_local_var_obj.phpt b/src/tests/disable_function/disabled_function_local_var_obj.phpt index 684933a..80b83cc 100644 --- a/src/tests/disable_function/disabled_function_local_var_obj.phpt +++ b/src/tests/disable_function/disabled_function_local_var_obj.phpt @@ -2,6 +2,7 @@ Disable functions - match on a local variable --SKIPIF-- += 80000) print "skip"; ?> --INI-- sp.configuration_file={PWD}/config/disabled_function_local_var_obj.ini --FILE-- diff --git a/src/tests/disable_function/disabled_function_param.phpt b/src/tests/disable_function/disabled_function_param.phpt index bbf05f0..fe673d8 100644 --- a/src/tests/disable_function/disabled_function_param.phpt +++ b/src/tests/disable_function/disabled_function_param.phpt @@ -2,6 +2,7 @@ Disable functions - match on a param --SKIPIF-- += 80000) print "skip"; ?> --INI-- sp.configuration_file={PWD}/config/disabled_function_param.ini --FILE-- @@ -17,4 +18,4 @@ qweqwe(Array(2)); --EXPECTF-- OK -Fatal error: [snuffleupagus][0.0.0.0][disabled_function][drop] Aborted execution on call of the function 'qweqwe', because its argument '$asd' content (2) matched a rule in %a/disabled_function_param.php on line 3 \ No newline at end of file +Fatal error: [snuffleupagus][0.0.0.0][disabled_function][drop] Aborted execution on call of the function 'qweqwe', because its argument '$asd' content (2) matched a rule in %a/disabled_function_param.php on line 3 diff --git a/src/tests/disable_function/disabled_function_super_global_var.phpt b/src/tests/disable_function/disabled_function_super_global_var.phpt index 6232e19..1a3d0ad 100644 --- a/src/tests/disable_function/disabled_function_super_global_var.phpt +++ b/src/tests/disable_function/disabled_function_super_global_var.phpt @@ -2,6 +2,7 @@ Disable functions - match on a super global --SKIPIF-- += 80000) print "skip"; ?> --INI-- sp.configuration_file={PWD}/config/disabled_function_super_global_var.ini --GET-- diff --git a/src/tests/disable_function/disabled_functions.phpt b/src/tests/disable_function/disabled_functions.phpt index cda7c20..1434053 100644 --- a/src/tests/disable_function/disabled_functions.phpt +++ b/src/tests/disable_function/disabled_functions.phpt @@ -2,6 +2,7 @@ Disable functions --SKIPIF-- += 80000) print "skip"; ?> --INI-- sp.configuration_file={PWD}/config/disabled_functions.ini --FILE-- diff --git a/src/tests/disable_function/disabled_functions_callback_called_file_r.phpt b/src/tests/disable_function/disabled_functions_callback_called_file_r.phpt index ec75d74..464af87 100644 --- a/src/tests/disable_function/disabled_functions_callback_called_file_r.phpt +++ b/src/tests/disable_function/disabled_functions_callback_called_file_r.phpt @@ -2,6 +2,7 @@ Disable functions by matching on the filename_r where the callback function is called, and not defined --SKIPIF-- += 80000) print "skip"; ?> --INI-- sp.configuration_file={PWD}/config/config_disabled_functions_callback_called_file_r.ini --FILE-- diff --git a/src/tests/disable_function/disabled_functions_called_file_r.phpt b/src/tests/disable_function/disabled_functions_called_file_r.phpt index dde26f7..e592359 100644 --- a/src/tests/disable_function/disabled_functions_called_file_r.phpt +++ b/src/tests/disable_function/disabled_functions_called_file_r.phpt @@ -2,6 +2,7 @@ Disable functions by matching on the filename_r where the function is called, and not defined --SKIPIF-- += 80000) print "skip"; ?> --INI-- sp.configuration_file={PWD}/config/config_disabled_functions_called_file_r.ini --FILE-- diff --git a/src/tests/disable_function/disabled_functions_drop_include.phpt b/src/tests/disable_function/disabled_functions_drop_include.phpt index 975168e..014a627 100644 --- a/src/tests/disable_function/disabled_functions_drop_include.phpt +++ b/src/tests/disable_function/disabled_functions_drop_include.phpt @@ -2,6 +2,7 @@ Disable function, bug : https://github.com/jvoisin/snuffleupagus/issues/181 --SKIPIF-- += 80000) print "skip"; ?> --INI-- sp.configuration_file={PWD}/config/disabled_functions_drop_include.ini --FILE-- diff --git a/src/tests/disable_function/disabled_functions_drop_include_simulation.phpt b/src/tests/disable_function/disabled_functions_drop_include_simulation.phpt index 0a693be..97e1569 100644 --- a/src/tests/disable_function/disabled_functions_drop_include_simulation.phpt +++ b/src/tests/disable_function/disabled_functions_drop_include_simulation.phpt @@ -2,6 +2,7 @@ Disable function, bug : https://github.com/jvoisin/snuffleupagus/issues/181 --SKIPIF-- += 80000) print "skip"; ?> --INI-- sp.configuration_file={PWD}/config/disabled_functions_drop_include_simulation.ini --FILE-- diff --git a/src/tests/disable_function/disabled_functions_eval_filename.phpt b/src/tests/disable_function/disabled_functions_eval_filename.phpt index 61757a3..eb714e5 100644 --- a/src/tests/disable_function/disabled_functions_eval_filename.phpt +++ b/src/tests/disable_function/disabled_functions_eval_filename.phpt @@ -2,6 +2,7 @@ Disable functions - eval --SKIPIF-- += 80000) print "skip"; ?> --INI-- sp.configuration_file={PWD}/config/config_disabled_functions_eval_filename.ini --FILE-- @@ -11,4 +12,4 @@ eval('$var = 1337 + 1337;'); print("Variable: $var\n"); ?> --EXPECTF-- -Fatal error: [snuffleupagus][0.0.0.0][disabled_function][drop] Aborted execution on call of the function 'eval' in %a/disabled_functions_eval_filename.php(3) : eval()'d code on line 1 \ No newline at end of file +Fatal error: [snuffleupagus][0.0.0.0][disabled_function][drop] Aborted execution on call of the function 'eval' in %a/disabled_functions_eval_filename.php(3) : eval()'d code on line 1 diff --git a/src/tests/disable_function/disabled_functions_filename_r.phpt b/src/tests/disable_function/disabled_functions_filename_r.phpt index f6b1538..a636675 100644 --- a/src/tests/disable_function/disabled_functions_filename_r.phpt +++ b/src/tests/disable_function/disabled_functions_filename_r.phpt @@ -2,6 +2,7 @@ Disable functions - filename regexp --SKIPIF-- += 80000) print "skip"; ?> --INI-- sp.configuration_file={PWD}/config/config_disabled_functions_filename_r.ini --FILE-- @@ -12,4 +13,4 @@ shell_exec("echo 43"); --EXPECTF-- 42 -Fatal error: [snuffleupagus][0.0.0.0][disabled_function][drop] Aborted execution on call of the function 'shell_exec' in %a/disabled_functions_filename_r.php on line 3 \ No newline at end of file +Fatal error: [snuffleupagus][0.0.0.0][disabled_function][drop] Aborted execution on call of the function 'shell_exec' in %a/disabled_functions_filename_r.php on line 3 diff --git a/src/tests/disable_function/disabled_functions_include_once.phpt b/src/tests/disable_function/disabled_functions_include_once.phpt index 57cb5a1..93a6491 100644 --- a/src/tests/disable_function/disabled_functions_include_once.phpt +++ b/src/tests/disable_function/disabled_functions_include_once.phpt @@ -2,6 +2,7 @@ Disable functions - include_once --SKIPIF-- += 80000) print "skip"; ?> --INI-- sp.configuration_file={PWD}/config/config_disabled_functions_include.ini --FILE-- diff --git a/src/tests/disable_function/disabled_functions_include_simulation.phpt b/src/tests/disable_function/disabled_functions_include_simulation.phpt index 53ea2a4..d88e823 100644 --- a/src/tests/disable_function/disabled_functions_include_simulation.phpt +++ b/src/tests/disable_function/disabled_functions_include_simulation.phpt @@ -2,6 +2,7 @@ Disable functions - Include (simulation) --SKIPIF-- += 80000) print "skip"; ?> --INI-- sp.configuration_file={PWD}/config/config_disabled_functions_include.ini --FILE-- diff --git a/src/tests/disable_function/disabled_functions_local_var_array.phpt b/src/tests/disable_function/disabled_functions_local_var_array.phpt index f9f2d36..4790148 100644 --- a/src/tests/disable_function/disabled_functions_local_var_array.phpt +++ b/src/tests/disable_function/disabled_functions_local_var_array.phpt @@ -2,6 +2,7 @@ Disable functions - match on an array value buried in several levels --SKIPIF-- += 80000) print "skip"; ?> --INI-- sp.configuration_file={PWD}/config/config_disabled_functions_local_var_array.ini --FILE-- @@ -18,4 +19,4 @@ foo($a); --EXPECTF-- cccc -Fatal error: [snuffleupagus][0.0.0.0][disabled_function][drop] Aborted execution on call of the function 'foo' in %a/disabled_functions_local_var_array.php on line 3 \ No newline at end of file +Fatal error: [snuffleupagus][0.0.0.0][disabled_function][drop] Aborted execution on call of the function 'foo' in %a/disabled_functions_local_var_array.php on line 3 diff --git a/src/tests/disable_function/disabled_functions_local_var_array_key.phpt b/src/tests/disable_function/disabled_functions_local_var_array_key.phpt index c585ab3..d11ae7e 100644 --- a/src/tests/disable_function/disabled_functions_local_var_array_key.phpt +++ b/src/tests/disable_function/disabled_functions_local_var_array_key.phpt @@ -2,6 +2,7 @@ Disable functions - match on an array value buried in several levels --SKIPIF-- += 80000) print "skip"; ?> --INI-- sp.configuration_file={PWD}/config/config_disabled_functions_local_var_array_key.ini --FILE-- @@ -18,4 +19,4 @@ foo($a); --EXPECTF-- cccc -Fatal error: [snuffleupagus][0.0.0.0][disabled_function][drop] Aborted execution on call of the function 'foo' in %a/disabled_functions_local_var_array_key.php on line 3 \ No newline at end of file +Fatal error: [snuffleupagus][0.0.0.0][disabled_function][drop] Aborted execution on call of the function 'foo' in %a/disabled_functions_local_var_array_key.php on line 3 diff --git a/src/tests/disable_function/disabled_functions_local_var_array_not_array.phpt b/src/tests/disable_function/disabled_functions_local_var_array_not_array.phpt index 6a62074..627e7ca 100644 --- a/src/tests/disable_function/disabled_functions_local_var_array_not_array.phpt +++ b/src/tests/disable_function/disabled_functions_local_var_array_not_array.phpt @@ -2,6 +2,7 @@ Disable functions --SKIPIF-- += 80000) print "skip"; ?> --INI-- sp.configuration_file={PWD}/config/disabled_function_local_var_array_not_array.ini --FILE-- diff --git a/src/tests/disable_function/disabled_functions_method.phpt b/src/tests/disable_function/disabled_functions_method.phpt index 5f287ad..b41c74d 100644 --- a/src/tests/disable_function/disabled_functions_method.phpt +++ b/src/tests/disable_function/disabled_functions_method.phpt @@ -2,6 +2,7 @@ Disable functions --SKIPIF-- += 80000) print "skip"; ?> --INI-- sp.configuration_file={PWD}/config/config_disabled_functions_method.ini --FILE-- @@ -24,4 +25,4 @@ $c->method2("paf"); $c->method3("pouet"); ?> --EXPECTF-- -Fatal error: [snuffleupagus][0.0.0.0][disabled_function][drop] Aborted execution on call of the function 'AwesomeClass::method1' in %a/disabled_functions_method.php on line 4 \ No newline at end of file +Fatal error: [snuffleupagus][0.0.0.0][disabled_function][drop] Aborted execution on call of the function 'AwesomeClass::method1' in %a/disabled_functions_method.php on line 4 diff --git a/src/tests/disable_function/disabled_functions_name_r.phpt b/src/tests/disable_function/disabled_functions_name_r.phpt index db2efbf..b910e65 100644 --- a/src/tests/disable_function/disabled_functions_name_r.phpt +++ b/src/tests/disable_function/disabled_functions_name_r.phpt @@ -2,6 +2,7 @@ Disable functions --SKIPIF-- += 80000) print "skip"; ?> --INI-- sp.configuration_file={PWD}/config/config_disabled_functions_name_r.ini --FILE-- @@ -13,4 +14,4 @@ system("echo 1337"); 42 1337 -Fatal error: [snuffleupagus][0.0.0.0][disabled_function][drop] Aborted execution on return of the function 'system', because the function returned '1337', which matched a rule in %a/disabled_functions_name_r.php on line 3 \ No newline at end of file +Fatal error: [snuffleupagus][0.0.0.0][disabled_function][drop] Aborted execution on return of the function 'system', because the function returned '1337', which matched a rule in %a/disabled_functions_name_r.php on line 3 diff --git a/src/tests/disable_function/disabled_functions_name_regexp_type.phpt b/src/tests/disable_function/disabled_functions_name_regexp_type.phpt index bf916d2..25ac2b3 100644 --- a/src/tests/disable_function/disabled_functions_name_regexp_type.phpt +++ b/src/tests/disable_function/disabled_functions_name_regexp_type.phpt @@ -2,6 +2,7 @@ Disable functions --SKIPIF-- += 80000) print "skip"; ?> --INI-- sp.configuration_file={PWD}/config/config_disabled_functions_name_regexp_type.ini --FILE-- @@ -14,4 +15,4 @@ echo strcmp([1], "pouet") . "\n"; 0 -1 -Fatal error: [snuffleupagus][0.0.0.0][disabled_function][drop] Aborted execution on call of the function 'strcmp', because its argument 'str1' content (?) matched a rule in %a/disabled_functions_name_regexp_type.php on line 4 \ No newline at end of file +Fatal error: [snuffleupagus][0.0.0.0][disabled_function][drop] Aborted execution on call of the function 'strcmp', because its argument 'str1' content (?) matched a rule in %a/disabled_functions_name_regexp_type.php on line 4 diff --git a/src/tests/disable_function/disabled_functions_name_type.phpt b/src/tests/disable_function/disabled_functions_name_type.phpt index c7971ee..8d70eaa 100644 --- a/src/tests/disable_function/disabled_functions_name_type.phpt +++ b/src/tests/disable_function/disabled_functions_name_type.phpt @@ -2,6 +2,7 @@ Disable functions --SKIPIF-- += 80000) print "skip"; ?> --INI-- sp.configuration_file={PWD}/config/config_disabled_functions_name_type.ini --FILE-- @@ -12,4 +13,4 @@ echo strcmp([1,23], "pouet") . "\n"; --EXPECTF-- 0 -Fatal error: [snuffleupagus][0.0.0.0][disabled_function][drop] Aborted execution on call of the function 'strcmp', because its argument '$str1' content (ARRAY) matched a rule in %a/disabled_functions_name_type.php on line 3 \ No newline at end of file +Fatal error: [snuffleupagus][0.0.0.0][disabled_function][drop] Aborted execution on call of the function 'strcmp', because its argument '$str1' content (ARRAY) matched a rule in %a/disabled_functions_name_type.php on line 3 diff --git a/src/tests/disable_function/disabled_functions_nul_byte.phpt b/src/tests/disable_function/disabled_functions_nul_byte.phpt index ae9ead2..2bf26ab 100644 --- a/src/tests/disable_function/disabled_functions_nul_byte.phpt +++ b/src/tests/disable_function/disabled_functions_nul_byte.phpt @@ -2,6 +2,7 @@ Disable functions with nul byte --SKIPIF-- += 80000) print "skip"; ?> --INI-- sp.configuration_file={PWD}/config/config_disabled_functions_nul_byte.ini --FILE-- @@ -11,4 +12,4 @@ system("id"); ?> --EXPECTF-- -Fatal error: [snuffleupagus][0.0.0.0][disabled_function][drop] Aborted execution on call of the function 'system', because its argument '$command' content (0id) matched a rule in %a/disabled_functions_nul_byte.php on line 2 \ No newline at end of file +Fatal error: [snuffleupagus][0.0.0.0][disabled_function][drop] Aborted execution on call of the function 'system', because its argument '$command' content (0id) matched a rule in %a/disabled_functions_nul_byte.php on line 2 diff --git a/src/tests/disable_function/disabled_functions_param.phpt b/src/tests/disable_function/disabled_functions_param.phpt index aa661e2..f384401 100644 --- a/src/tests/disable_function/disabled_functions_param.phpt +++ b/src/tests/disable_function/disabled_functions_param.phpt @@ -2,6 +2,7 @@ Disable functions --SKIPIF-- += 80000) print "skip"; ?> --INI-- sp.configuration_file={PWD}/config/config_disabled_functions_param.ini --FILE-- @@ -15,4 +16,4 @@ strcmp("bla", "ble"); strncmp("bla", "ble", 2); ?> --EXPECTF-- -Fatal error: [snuffleupagus][0.0.0.0][disabled_function][drop] Aborted execution on call of the function 'system', because its argument '$command' content (id) matched the rule '1' in %a/disabled_functions_param.php on line 2 \ No newline at end of file +Fatal error: [snuffleupagus][0.0.0.0][disabled_function][drop] Aborted execution on call of the function 'system', because its argument '$command' content (id) matched the rule '1' in %a/disabled_functions_param.php on line 2 diff --git a/src/tests/disable_function/disabled_functions_param_allow.phpt b/src/tests/disable_function/disabled_functions_param_allow.phpt index cba8455..ac257e4 100644 --- a/src/tests/disable_function/disabled_functions_param_allow.phpt +++ b/src/tests/disable_function/disabled_functions_param_allow.phpt @@ -2,6 +2,7 @@ Disable functions - allow --SKIPIF-- += 80000) print "skip"; ?> --INI-- sp.configuration_file={PWD}/config/config_disabled_functions_param_allow.ini --FILE-- @@ -12,4 +13,4 @@ system("id"); --EXPECTF-- win -Fatal error: [snuffleupagus][0.0.0.0][disabled_function][drop] Aborted execution on call of the function 'system' in %a/disabled_functions_param_allow.php on line 3 \ No newline at end of file +Fatal error: [snuffleupagus][0.0.0.0][disabled_function][drop] Aborted execution on call of the function 'system' in %a/disabled_functions_param_allow.php on line 3 diff --git a/src/tests/disable_function/disabled_functions_param_array.phpt b/src/tests/disable_function/disabled_functions_param_array.phpt index 30b11c1..7194548 100644 --- a/src/tests/disable_function/disabled_functions_param_array.phpt +++ b/src/tests/disable_function/disabled_functions_param_array.phpt @@ -2,6 +2,7 @@ Disable functions --SKIPIF-- += 80000) print "skip"; ?> --INI-- sp.configuration_file={PWD}/config/config_disabled_functions_param_array.ini --FILE-- @@ -22,4 +23,4 @@ foo($a); test1 abcde -Fatal error: [snuffleupagus][0.0.0.0][disabled_function][drop] Aborted execution on call of the function 'foo', because its argument '$arr' content (abcd) matched the rule '1' in %a/disabled_functions_param_array.php on line 3 \ No newline at end of file +Fatal error: [snuffleupagus][0.0.0.0][disabled_function][drop] Aborted execution on call of the function 'foo', because its argument '$arr' content (abcd) matched the rule '1' in %a/disabled_functions_param_array.php on line 3 diff --git a/src/tests/disable_function/disabled_functions_param_array_deref.phpt b/src/tests/disable_function/disabled_functions_param_array_deref.phpt index a10c648..c8c9732 100644 --- a/src/tests/disable_function/disabled_functions_param_array_deref.phpt +++ b/src/tests/disable_function/disabled_functions_param_array_deref.phpt @@ -2,6 +2,7 @@ Disable functions --SKIPIF-- += 80000) print "skip"; ?> --INI-- sp.configuration_file={PWD}/config/config_disabled_functions_param_array.ini --FILE-- @@ -23,4 +24,4 @@ foo($a); eee abcdef -Fatal error: [snuffleupagus][0.0.0.0][disabled_function][drop] Aborted execution on call of the function 'foo', because its argument '$arr' content (abcdef) matched the rule '2' in %a/disabled_functions_param_array_deref.php on line 3 \ No newline at end of file +Fatal error: [snuffleupagus][0.0.0.0][disabled_function][drop] Aborted execution on call of the function 'foo', because its argument '$arr' content (abcdef) matched the rule '2' in %a/disabled_functions_param_array_deref.php on line 3 diff --git a/src/tests/disable_function/disabled_functions_param_array_no_value.phpt b/src/tests/disable_function/disabled_functions_param_array_no_value.phpt index 778ec24..d31cef9 100644 --- a/src/tests/disable_function/disabled_functions_param_array_no_value.phpt +++ b/src/tests/disable_function/disabled_functions_param_array_no_value.phpt @@ -2,6 +2,7 @@ Disable functions - matching on an array's variable only --SKIPIF-- += 80000) print "skip"; ?> --INI-- sp.configuration_file={PWD}/config/config_disabled_functions_param_array.ini --FILE-- @@ -20,4 +21,4 @@ foo($a); --EXPECTF-- cccc -Fatal error: [snuffleupagus][0.0.0.0][disabled_function][drop] Aborted execution on call of the function 'foo', because its argument '$arr' content (aaa) matched the rule '3' in %a/disabled_functions_param_array_no_value.php on line 3 \ No newline at end of file +Fatal error: [snuffleupagus][0.0.0.0][disabled_function][drop] Aborted execution on call of the function 'foo', because its argument '$arr' content (aaa) matched the rule '3' in %a/disabled_functions_param_array_no_value.php on line 3 diff --git a/src/tests/disable_function/disabled_functions_param_array_r.phpt b/src/tests/disable_function/disabled_functions_param_array_r.phpt index ceace9c..89ecb75 100644 --- a/src/tests/disable_function/disabled_functions_param_array_r.phpt +++ b/src/tests/disable_function/disabled_functions_param_array_r.phpt @@ -2,6 +2,7 @@ Disable functions - match on an array using regexp --SKIPIF-- += 80000) print "skip"; ?> --INI-- sp.configuration_file={PWD}/config/config_disabled_functions_param_r_array.ini --FILE-- @@ -18,4 +19,4 @@ foo($a); --EXPECTF-- cccc -Fatal error: [snuffleupagus][0.0.0.0][disabled_function][drop] Aborted execution on call of the function 'foo', because its argument 'arr' content (ARRAY) matched the rule '1' in %a/disabled_functions_param_array_r.php on line 3 \ No newline at end of file +Fatal error: [snuffleupagus][0.0.0.0][disabled_function][drop] Aborted execution on call of the function 'foo', because its argument 'arr' content (ARRAY) matched the rule '1' in %a/disabled_functions_param_array_r.php on line 3 diff --git a/src/tests/disable_function/disabled_functions_param_array_several_levels.phpt b/src/tests/disable_function/disabled_functions_param_array_several_levels.phpt index 3f713ad..7d0adeb 100644 --- a/src/tests/disable_function/disabled_functions_param_array_several_levels.phpt +++ b/src/tests/disable_function/disabled_functions_param_array_several_levels.phpt @@ -2,6 +2,7 @@ Disable functions - match on an array value buried in several levels --SKIPIF-- += 80000) print "skip"; ?> --INI-- sp.configuration_file={PWD}/config/config_disabled_functions_param_array.ini --FILE-- @@ -18,4 +19,4 @@ foo($a); --EXPECTF-- cccc -Fatal error: [snuffleupagus][0.0.0.0][disabled_function][drop] Aborted execution on call of the function 'foo', because its argument '$arr' content (ARRAY) matched the rule '4' in %a/disabled_functions_param_array_several_levels.php on line 3 \ No newline at end of file +Fatal error: [snuffleupagus][0.0.0.0][disabled_function][drop] Aborted execution on call of the function 'foo', because its argument '$arr' content (ARRAY) matched the rule '4' in %a/disabled_functions_param_array_several_levels.php on line 3 diff --git a/src/tests/disable_function/disabled_functions_param_array_several_levels_int.phpt b/src/tests/disable_function/disabled_functions_param_array_several_levels_int.phpt index 3f35444..ecf1fb1 100644 --- a/src/tests/disable_function/disabled_functions_param_array_several_levels_int.phpt +++ b/src/tests/disable_function/disabled_functions_param_array_several_levels_int.phpt @@ -2,6 +2,7 @@ Disable functions - match on an array value buried in several levels --SKIPIF-- += 80000) print "skip"; ?> --INI-- sp.configuration_file={PWD}/config/config_disabled_functions_param_array.ini --FILE-- @@ -18,4 +19,4 @@ foo($a); --EXPECTF-- cccc -Fatal error: [snuffleupagus][0.0.0.0][disabled_function][drop] Aborted execution on call of the function 'foo', because its argument '$arr' content (ARRAY) matched the rule '4' in %a/disabled_functions_param_array_several_levels_int.php on line 3 \ No newline at end of file +Fatal error: [snuffleupagus][0.0.0.0][disabled_function][drop] Aborted execution on call of the function 'foo', because its argument '$arr' content (ARRAY) matched the rule '4' in %a/disabled_functions_param_array_several_levels_int.php on line 3 diff --git a/src/tests/disable_function/disabled_functions_param_array_several_levels_keys.phpt b/src/tests/disable_function/disabled_functions_param_array_several_levels_keys.phpt index af6731b..6d8cbb0 100644 --- a/src/tests/disable_function/disabled_functions_param_array_several_levels_keys.phpt +++ b/src/tests/disable_function/disabled_functions_param_array_several_levels_keys.phpt @@ -2,6 +2,7 @@ Disable functions - match on an array value buried in several levels --SKIPIF-- += 80000) print "skip"; ?> --INI-- sp.configuration_file={PWD}/config/config_disabled_functions_param_array.ini --FILE-- @@ -18,4 +19,4 @@ foo($a); --EXPECTF-- cccc -Fatal error: [snuffleupagus][0.0.0.0][disabled_function][drop] Aborted execution on call of the function 'foo', because its argument '$arr' content (ARRAY) matched the rule '5' in %a/disabled_functions_param_array_several_levels_keys.php on line 3 \ No newline at end of file +Fatal error: [snuffleupagus][0.0.0.0][disabled_function][drop] Aborted execution on call of the function 'foo', because its argument '$arr' content (ARRAY) matched the rule '5' in %a/disabled_functions_param_array_several_levels_keys.php on line 3 diff --git a/src/tests/disable_function/disabled_functions_param_array_several_levels_keys_int.phpt b/src/tests/disable_function/disabled_functions_param_array_several_levels_keys_int.phpt index 7e9627e..fef5364 100644 --- a/src/tests/disable_function/disabled_functions_param_array_several_levels_keys_int.phpt +++ b/src/tests/disable_function/disabled_functions_param_array_several_levels_keys_int.phpt @@ -2,6 +2,7 @@ Disable functions - match on an array value buried in several levels --SKIPIF-- += 80000) print "skip"; ?> --INI-- sp.configuration_file={PWD}/config/config_disabled_functions_param_array.ini --FILE-- @@ -18,4 +19,4 @@ foo($a); --EXPECTF-- cccc -Fatal error: [snuffleupagus][0.0.0.0][disabled_function][drop] Aborted execution on call of the function 'foo', because its argument '$arr' content (ARRAY) matched the rule '6' in %a/disabled_functions_param_array_several_levels_keys_int.php on line 3 \ No newline at end of file +Fatal error: [snuffleupagus][0.0.0.0][disabled_function][drop] Aborted execution on call of the function 'foo', because its argument '$arr' content (ARRAY) matched the rule '6' in %a/disabled_functions_param_array_several_levels_keys_int.php on line 3 diff --git a/src/tests/disable_function/disabled_functions_param_broken_line.phpt b/src/tests/disable_function/disabled_functions_param_broken_line.phpt index a372314..806816d 100644 --- a/src/tests/disable_function/disabled_functions_param_broken_line.phpt +++ b/src/tests/disable_function/disabled_functions_param_broken_line.phpt @@ -2,6 +2,7 @@ Disable functions - match on a specific line - broken configuration --SKIPIF-- += 80000) print "skip"; ?> --INI-- sp.configuration_file={PWD}/config/disabled_functions_broken_line.ini --FILE-- diff --git a/src/tests/disable_function/disabled_functions_param_int.phpt b/src/tests/disable_function/disabled_functions_param_int.phpt index c49e25e..d681b3e 100644 --- a/src/tests/disable_function/disabled_functions_param_int.phpt +++ b/src/tests/disable_function/disabled_functions_param_int.phpt @@ -2,6 +2,7 @@ Disable functions --SKIPIF-- += 80000) print "skip"; ?> --INI-- sp.configuration_file={PWD}/config/config_disabled_functions_param_int.ini --FILE-- @@ -19,4 +20,4 @@ foobar("10"); --EXPECTF-- 1 -Fatal error: [snuffleupagus][0.0.0.0][disabled_function][drop] Aborted execution on call of the function 'foobar', because its argument '$id' content (42) matched a rule in %a/disabled_functions_param_int.php on line 3 \ No newline at end of file +Fatal error: [snuffleupagus][0.0.0.0][disabled_function][drop] Aborted execution on call of the function 'foobar', because its argument '$id' content (42) matched a rule in %a/disabled_functions_param_int.php on line 3 diff --git a/src/tests/disable_function/disabled_functions_param_invalid_pos.phpt b/src/tests/disable_function/disabled_functions_param_invalid_pos.phpt index bafe50a..e409300 100644 --- a/src/tests/disable_function/disabled_functions_param_invalid_pos.phpt +++ b/src/tests/disable_function/disabled_functions_param_invalid_pos.phpt @@ -2,6 +2,7 @@ Disable functions - match on argument's position --SKIPIF-- += 80000) print "skip"; ?> --INI-- sp.configuration_file={PWD}/config/disabled_functions_invalid_pos.ini --FILE-- diff --git a/src/tests/disable_function/disabled_functions_param_pos2.phpt b/src/tests/disable_function/disabled_functions_param_pos2.phpt index 6854147..bfe71ee 100644 --- a/src/tests/disable_function/disabled_functions_param_pos2.phpt +++ b/src/tests/disable_function/disabled_functions_param_pos2.phpt @@ -2,6 +2,7 @@ Disable functions - match on argument's position, not the first time --SKIPIF-- += 80000) print "skip"; ?> --INI-- sp.configuration_file={PWD}/config/disabled_functions_pos.ini --FILE-- @@ -10,4 +11,4 @@ strtoupper("od"); strtoupper("id"); ?> --EXPECTF-- -Fatal error: [snuffleupagus][0.0.0.0][disabled_function][drop] Aborted execution on call of the function 'strtoupper', because its argument 'str' content (id) matched the rule 'strlen array' in %a/disabled_functions_param_pos2.php on line 3 \ No newline at end of file +Fatal error: [snuffleupagus][0.0.0.0][disabled_function][drop] Aborted execution on call of the function 'strtoupper', because its argument 'str' content (id) matched the rule 'strlen array' in %a/disabled_functions_param_pos2.php on line 3 diff --git a/src/tests/disable_function/disabled_functions_param_r.phpt b/src/tests/disable_function/disabled_functions_param_r.phpt index f919581..f30fca9 100644 --- a/src/tests/disable_function/disabled_functions_param_r.phpt +++ b/src/tests/disable_function/disabled_functions_param_r.phpt @@ -2,6 +2,7 @@ Disable functions --SKIPIF-- += 80000) print "skip"; ?> --INI-- sp.configuration_file={PWD}/config/config_disabled_functions_param_r.ini --FILE-- @@ -10,4 +11,4 @@ system("id"); system("echo win"); ?> --EXPECTF-- -Fatal error: [snuffleupagus][0.0.0.0][disabled_function][drop] Aborted execution on call of the function 'system', because its argument 'command' content (id) matched a rule in %a/disabled_functions_param_r.php on line 2 \ No newline at end of file +Fatal error: [snuffleupagus][0.0.0.0][disabled_function][drop] Aborted execution on call of the function 'system', because its argument 'command' content (id) matched a rule in %a/disabled_functions_param_r.php on line 2 diff --git a/src/tests/disable_function/disabled_functions_param_str_representation.phpt b/src/tests/disable_function/disabled_functions_param_str_representation.phpt index f56c457..179ce93 100644 --- a/src/tests/disable_function/disabled_functions_param_str_representation.phpt +++ b/src/tests/disable_function/disabled_functions_param_str_representation.phpt @@ -2,6 +2,7 @@ Disable functions - casting various types to string internally --SKIPIF-- += 80000) print "skip"; ?> --INI-- sp.configuration_file={PWD}/config/config_disabled_functions_param_str_representation.ini --FILE-- diff --git a/src/tests/disable_function/disabled_functions_parse_class.phpt b/src/tests/disable_function/disabled_functions_parse_class.phpt index e62fe40..487bd51 100644 --- a/src/tests/disable_function/disabled_functions_parse_class.phpt +++ b/src/tests/disable_function/disabled_functions_parse_class.phpt @@ -2,6 +2,7 @@ Disable functions - Parsing of an Object as a return value of a function --SKIPIF-- += 80000) print "skip"; ?> --INI-- sp.configuration_file={PWD}/config/disabled_functions_ret.ini --FILE-- diff --git a/src/tests/disable_function/disabled_functions_regexp_multiple.phpt b/src/tests/disable_function/disabled_functions_regexp_multiple.phpt index 5f8b151..ca7263a 100644 --- a/src/tests/disable_function/disabled_functions_regexp_multiple.phpt +++ b/src/tests/disable_function/disabled_functions_regexp_multiple.phpt @@ -2,6 +2,7 @@ Disable functions --SKIPIF-- += 80000) print "skip"; ?> --INI-- sp.configuration_file={PWD}/config/disabled_functions_regexp.ini --FILE-- diff --git a/src/tests/disable_function/disabled_functions_require.phpt b/src/tests/disable_function/disabled_functions_require.phpt index df2b2f0..0050d51 100644 --- a/src/tests/disable_function/disabled_functions_require.phpt +++ b/src/tests/disable_function/disabled_functions_require.phpt @@ -2,6 +2,7 @@ Disable functions - Require --SKIPIF-- += 80000) print "skip"; ?> --INI-- sp.configuration_file={PWD}/config/config_disabled_functions_require.ini --FILE-- diff --git a/src/tests/disable_function/disabled_functions_require_allow.phpt b/src/tests/disable_function/disabled_functions_require_allow.phpt index 7ab29aa..dac7a1e 100644 --- a/src/tests/disable_function/disabled_functions_require_allow.phpt +++ b/src/tests/disable_function/disabled_functions_require_allow.phpt @@ -2,6 +2,7 @@ Disable functions - Require (allow) --SKIPIF-- += 80000) print "skip"; ?> --INI-- sp.configuration_file={PWD}/config/config_disabled_functions_require_allow.ini --FILE-- diff --git a/src/tests/disable_function/disabled_functions_require_once.phpt b/src/tests/disable_function/disabled_functions_require_once.phpt index 7356c08..f6ed729 100644 --- a/src/tests/disable_function/disabled_functions_require_once.phpt +++ b/src/tests/disable_function/disabled_functions_require_once.phpt @@ -2,6 +2,7 @@ Disable functions - require_once --SKIPIF-- += 80000) print "skip"; ?> --INI-- sp.configuration_file={PWD}/config/config_disabled_functions_require.ini --FILE-- diff --git a/src/tests/disable_function/disabled_functions_require_simulation.phpt b/src/tests/disable_function/disabled_functions_require_simulation.phpt index fa1523c..625feee 100644 --- a/src/tests/disable_function/disabled_functions_require_simulation.phpt +++ b/src/tests/disable_function/disabled_functions_require_simulation.phpt @@ -2,6 +2,7 @@ Disable functions - Require (simulation) --SKIPIF-- += 80000) print "skip"; ?> --INI-- sp.configuration_file={PWD}/config/config_disabled_functions_require.ini --FILE-- diff --git a/src/tests/disable_function/disabled_functions_ret.phpt b/src/tests/disable_function/disabled_functions_ret.phpt index be5e946..56da217 100644 --- a/src/tests/disable_function/disabled_functions_ret.phpt +++ b/src/tests/disable_function/disabled_functions_ret.phpt @@ -2,6 +2,7 @@ Disable functions check on `ret`. --SKIPIF-- += 80000) print "skip"; ?> --INI-- sp.configuration_file={PWD}/config/disabled_functions_ret.ini --FILE-- @@ -10,4 +11,4 @@ echo strpos("pouet", "p"); echo stripos("pouet", "p"); ?> --EXPECTF-- -Fatal error: [snuffleupagus][0.0.0.0][disabled_function][drop] Aborted execution on return of the function 'strpos', because the function returned '0', which matched a rule in %a/disabled_functions_ret.php on line 2 \ No newline at end of file +Fatal error: [snuffleupagus][0.0.0.0][disabled_function][drop] Aborted execution on return of the function 'strpos', because the function returned '0', which matched a rule in %a/disabled_functions_ret.php on line 2 diff --git a/src/tests/disable_function/disabled_functions_ret2.phpt b/src/tests/disable_function/disabled_functions_ret2.phpt index 8070b08..ede465d 100644 --- a/src/tests/disable_function/disabled_functions_ret2.phpt +++ b/src/tests/disable_function/disabled_functions_ret2.phpt @@ -2,6 +2,7 @@ Disable functions check on `ret`. --SKIPIF-- += 80000) print "skip"; ?> --INI-- sp.configuration_file={PWD}/config/disabled_functions_ret.ini --FILE-- @@ -9,4 +10,4 @@ sp.configuration_file={PWD}/config/disabled_functions_ret.ini echo stripos("pouet", "p"); ?> --EXPECTF-- -Fatal error: [snuffleupagus][0.0.0.0][disabled_function][drop] Aborted execution on return of the function 'stripos', because the function returned '0', which matched a rule in %a/disabled_functions_ret2.php on line 2 \ No newline at end of file +Fatal error: [snuffleupagus][0.0.0.0][disabled_function][drop] Aborted execution on return of the function 'stripos', because the function returned '0', which matched a rule in %a/disabled_functions_ret2.php on line 2 diff --git a/src/tests/disable_function/disabled_functions_ret3.phpt b/src/tests/disable_function/disabled_functions_ret3.phpt index 744ec78..fd97694 100644 --- a/src/tests/disable_function/disabled_functions_ret3.phpt +++ b/src/tests/disable_function/disabled_functions_ret3.phpt @@ -2,6 +2,7 @@ Disable functions check on `ret`. --SKIPIF-- += 80000) print "skip"; ?> --INI-- sp.configuration_file={PWD}/config/disabled_functions_ret.ini memory_limit=-1 @@ -20,4 +21,4 @@ echo("We're at the end of the execution.\n"); --EXPECTF-- We're in function `a`. -Fatal error: [snuffleupagus][0.0.0.0][disabled_function][drop] Aborted execution on return of the function 'Bob::a', because the function returned '2', which matched a rule in %a/disabled_functions_ret3.php on line 9 \ No newline at end of file +Fatal error: [snuffleupagus][0.0.0.0][disabled_function][drop] Aborted execution on return of the function 'Bob::a', because the function returned '2', which matched a rule in %a/disabled_functions_ret3.php on line 9 diff --git a/src/tests/disable_function/disabled_functions_ret_val_rx.phpt b/src/tests/disable_function/disabled_functions_ret_val_rx.phpt index e756d30..e575af9 100644 --- a/src/tests/disable_function/disabled_functions_ret_val_rx.phpt +++ b/src/tests/disable_function/disabled_functions_ret_val_rx.phpt @@ -2,6 +2,7 @@ Disable functions ret val rx --SKIPIF-- += 80000) print "skip"; ?> --INI-- sp.configuration_file={PWD}/config/disabled_functions_retval_rx.ini --FILE-- @@ -12,4 +13,4 @@ echo str_repeat("fufufu",1); --EXPECTF-- fufu -Fatal error: [snuffleupagus][0.0.0.0][disabled_function][drop] Aborted execution on return of the function 'str_repeat', because the function returned 'fufufu', which matched a rule in %a/disabled_functions_ret_val_rx.php on line 3 \ No newline at end of file +Fatal error: [snuffleupagus][0.0.0.0][disabled_function][drop] Aborted execution on return of the function 'str_repeat', because the function returned 'fufufu', which matched a rule in %a/disabled_functions_ret_val_rx.php on line 3 diff --git a/src/tests/disable_function/disabled_functions_runtime.phpt b/src/tests/disable_function/disabled_functions_runtime.phpt index 3d74b40..60c5697 100644 --- a/src/tests/disable_function/disabled_functions_runtime.phpt +++ b/src/tests/disable_function/disabled_functions_runtime.phpt @@ -2,6 +2,7 @@ Disable functions - runtime inclusion --SKIPIF-- += 80000) print "skip"; ?> --INI-- sp.configuration_file={PWD}/config/config_disabled_functions_param_runtime.ini --FILE-- diff --git a/src/tests/disable_function/disabled_functions_upper.phpt b/src/tests/disable_function/disabled_functions_upper.phpt index e3878f0..cdc998a 100644 --- a/src/tests/disable_function/disabled_functions_upper.phpt +++ b/src/tests/disable_function/disabled_functions_upper.phpt @@ -2,6 +2,7 @@ Disable functions - uppercase --SKIPIF-- += 80000) print "skip"; ?> --INI-- sp.configuration_file={PWD}/config/disabled_functions.ini --FILE-- @@ -13,4 +14,4 @@ vaR_DUmp("this is a super test"); echo sTRPOs("pouet", "o"); ?> --EXPECTF-- -Fatal error: [snuffleupagus][0.0.0.0][disabled_function][drop] Aborted execution on call of the function 'system' in %a/disabled_functions_upper.php on line 2 \ No newline at end of file +Fatal error: [snuffleupagus][0.0.0.0][disabled_function][drop] Aborted execution on call of the function 'system' in %a/disabled_functions_upper.php on line 2 diff --git a/src/tests/disable_function/disabled_functions_variadic.phpt b/src/tests/disable_function/disabled_functions_variadic.phpt index 7658ec8..f364ea3 100644 --- a/src/tests/disable_function/disabled_functions_variadic.phpt +++ b/src/tests/disable_function/disabled_functions_variadic.phpt @@ -2,6 +2,7 @@ Disable functions - support for variadic functions --SKIPIF-- += 80000) print "skip"; ?> --INI-- sp.configuration_file={PWD}/config/config_disabled_functions_variadic.ini --FILE-- diff --git a/src/tests/disable_function/disabled_native_functions_indirect.phpt b/src/tests/disable_function/disabled_native_functions_indirect.phpt index 1539db3..df585c7 100644 --- a/src/tests/disable_function/disabled_native_functions_indirect.phpt +++ b/src/tests/disable_function/disabled_native_functions_indirect.phpt @@ -2,6 +2,7 @@ Disabled native functions, called indirectly --SKIPIF-- += 80000) print "skip"; ?> --INI-- sp.configuration_file={PWD}/config/disabled_functions.ini --FILE-- @@ -9,4 +10,4 @@ sp.configuration_file={PWD}/config/disabled_functions.ini array_map('system', [1,2,3,4]); ?> --EXPECTF-- -Fatal error: [snuffleupagus][0.0.0.0][disabled_function][drop] Aborted execution on call of the function 'system' in %a/disabled_native_functions_indirect.php on line 2 \ No newline at end of file +Fatal error: [snuffleupagus][0.0.0.0][disabled_function][drop] Aborted execution on call of the function 'system' in %a/disabled_native_functions_indirect.php on line 2 diff --git a/src/tests/global_strict/global_strict.phpt b/src/tests/global_strict/global_strict.phpt index e06721c..07dc979 100644 --- a/src/tests/global_strict/global_strict.phpt +++ b/src/tests/global_strict/global_strict.phpt @@ -2,6 +2,7 @@ Global strict mode --SKIPIF-- += 80000) print "skip"; ?> --INI-- sp.configuration_file={PWD}/config/global_strict.ini --FILE-- diff --git a/src/tests/global_strict/global_strict_disabled.phpt b/src/tests/global_strict/global_strict_disabled.phpt index ca3ddfa..c948444 100644 --- a/src/tests/global_strict/global_strict_disabled.phpt +++ b/src/tests/global_strict/global_strict_disabled.phpt @@ -2,6 +2,7 @@ Global strict mode --SKIPIF-- += 80000) print "skip"; ?> --INI-- sp.configuration_file={PWD}/config/global_strict_disabled.ini --FILE-- diff --git a/src/tests/harden_rand/harden_rand_noargs.phpt b/src/tests/harden_rand/harden_rand_noargs.phpt index dc7d832..9abbffa 100644 --- a/src/tests/harden_rand/harden_rand_noargs.phpt +++ b/src/tests/harden_rand/harden_rand_noargs.phpt @@ -2,6 +2,7 @@ Harden rand without any arguments --SKIPIF-- += 80000) print "skip"; ?> --INI-- sp.configuration_file={PWD}/config/harden_rand.ini We should fix this diff --git a/src/tests/inexistent_conf_file.phpt b/src/tests/inexistent_conf_file.phpt index 78f37a6..cd10665 100644 --- a/src/tests/inexistent_conf_file.phpt +++ b/src/tests/inexistent_conf_file.phpt @@ -2,6 +2,7 @@ Check for snuffleupagus presence --SKIPIF-- += 80000) print "skip"; ?> --INI-- sp.configuration_file={PWD}/config/unexistent_configuration_file.ini --FILE-- @@ -12,4 +13,4 @@ PHP Fatal error: [snuffleupagus][0.0.0.0][config][log] Could not open configura Fatal error: [snuffleupagus][0.0.0.0][config][log] Could not open configuration file %a/config/unexistent_configuration_file.ini : No such file or directory in Unknown on line 0 Fatal error: [snuffleupagus][0.0.0.0][config][log] Invalid configuration file in Unknown on line 0 -Could not startup. \ No newline at end of file +Could not startup. diff --git a/src/tests/inexistent_conf_file_list.phpt b/src/tests/inexistent_conf_file_list.phpt index 705fcbf..6cac934 100644 --- a/src/tests/inexistent_conf_file_list.phpt +++ b/src/tests/inexistent_conf_file_list.phpt @@ -2,6 +2,7 @@ Non-existent configuration file in a list --SKIPIF-- += 80000) print "skip"; ?> --INI-- sp.configuration_file={PWD}/../../config/default.rules,{PWD}/non_existent_configuration_file --FILE-- @@ -12,4 +13,4 @@ PHP Fatal error: [snuffleupagus][0.0.0.0][config][log] Could not open configura Fatal error: [snuffleupagus][0.0.0.0][config][log] Could not open configuration file %a/non_existent_configuration_file : No such file or directory in Unknown on line 0 Fatal error: [snuffleupagus][0.0.0.0][config][log] Invalid configuration file in Unknown on line 0 -Could not startup. \ No newline at end of file +Could not startup. diff --git a/src/tests/phpinfo_presence.phpt b/src/tests/phpinfo_presence.phpt index c1388ed..7ac9d10 100644 --- a/src/tests/phpinfo_presence.phpt +++ b/src/tests/phpinfo_presence.phpt @@ -2,6 +2,7 @@ Unserialize fail --SKIPIF-- += 80000) print "skip"; ?> --INI-- sp.configuration_file={PWD}/../../config/default.rules --FILE-- diff --git a/src/tests/rips_configuration.phpt b/src/tests/rips_configuration.phpt index 7c197e5..f0930ee 100644 --- a/src/tests/rips_configuration.phpt +++ b/src/tests/rips_configuration.phpt @@ -2,6 +2,7 @@ Shipped configuration (rips) --SKIPIF-- += 80000) print "skip"; ?> --INI-- sp.configuration_file={PWD}/../../config/rips.rules --FILE-- diff --git a/src/tests/shipped_configuration.phpt b/src/tests/shipped_configuration.phpt index b171304..f567b08 100644 --- a/src/tests/shipped_configuration.phpt +++ b/src/tests/shipped_configuration.phpt @@ -2,6 +2,7 @@ Shipped configuration --SKIPIF-- += 80000) print "skip"; ?> --INI-- sp.configuration_file={PWD}/../../config/default.rules --FILE-- diff --git a/src/tests/sloppy_comparison/sloppy_comparison_array_disabled.phpt b/src/tests/sloppy_comparison/sloppy_comparison_array_disabled.phpt index e8cd77b..e292f5e 100644 --- a/src/tests/sloppy_comparison/sloppy_comparison_array_disabled.phpt +++ b/src/tests/sloppy_comparison/sloppy_comparison_array_disabled.phpt @@ -2,6 +2,7 @@ Sloppy comparison in_array disabled --SKIPIF-- += 80000) print "skip"; ?> --INI-- sp.allow_broken_configuration=On --FILE-- diff --git a/src/tests/sloppy_comparison/sloppy_comparison_array_keys_disabled.phpt b/src/tests/sloppy_comparison/sloppy_comparison_array_keys_disabled.phpt index 8841b4c..3cc02c2 100644 --- a/src/tests/sloppy_comparison/sloppy_comparison_array_keys_disabled.phpt +++ b/src/tests/sloppy_comparison/sloppy_comparison_array_keys_disabled.phpt @@ -2,6 +2,7 @@ Sloppy comparison array_keys disabled --SKIPIF-- += 80000) print "skip"; ?> --INI-- sp.allow_broken_configuration=On --FILE-- diff --git a/src/tests/sloppy_comparison/sloppy_comparison_array_search_disabled.phpt b/src/tests/sloppy_comparison/sloppy_comparison_array_search_disabled.phpt index bee3752..2da4a17 100644 --- a/src/tests/sloppy_comparison/sloppy_comparison_array_search_disabled.phpt +++ b/src/tests/sloppy_comparison/sloppy_comparison_array_search_disabled.phpt @@ -2,6 +2,7 @@ Sloppy comparison array_search disabled --SKIPIF-- += 80000) print "skip"; ?> --INI-- sp.allow_broken_configuration=On --FILE-- diff --git a/src/tests/sloppy_comparison/sloppy_comparison_disable.phpt b/src/tests/sloppy_comparison/sloppy_comparison_disable.phpt index e42c919..cdcd9a8 100644 --- a/src/tests/sloppy_comparison/sloppy_comparison_disable.phpt +++ b/src/tests/sloppy_comparison/sloppy_comparison_disable.phpt @@ -2,6 +2,7 @@ Sloppy comparison --SKIPIF-- += 80000) print "skip"; ?> --INI-- sp.allow_broken_configuration=On --FILE-- diff --git a/src/tests/stream_wrapper/stream_wrapper.phpt b/src/tests/stream_wrapper/stream_wrapper.phpt index 3336ef6..5a1dab7 100644 --- a/src/tests/stream_wrapper/stream_wrapper.phpt +++ b/src/tests/stream_wrapper/stream_wrapper.phpt @@ -5,6 +5,7 @@ Stream wrapper if (!extension_loaded("snuffleupagus")) print "skip snuffleupagus extension missing"; if (!extension_loaded("openssl")) print "skip openssl extension missing"; ?> += 80000) print "skip"; ?> --INI-- sp.configuration_file={PWD}/config/config_stream_wrapper.ini --FILE-- diff --git a/src/tests/stream_wrapper/stream_wrapper_register.phpt b/src/tests/stream_wrapper/stream_wrapper_register.phpt index 39514e9..a3ffb2e 100644 --- a/src/tests/stream_wrapper/stream_wrapper_register.phpt +++ b/src/tests/stream_wrapper/stream_wrapper_register.phpt @@ -2,6 +2,7 @@ Stream wrapper --SKIPIF-- += 80000) print "skip"; ?> --INI-- sp.configuration_file={PWD}/config/config_stream_wrapper_register.ini --FILE-- diff --git a/src/tests/stream_wrapper/stream_wrapper_without_openssl.phpt b/src/tests/stream_wrapper/stream_wrapper_without_openssl.phpt index 5a11c8f..73090ff 100644 --- a/src/tests/stream_wrapper/stream_wrapper_without_openssl.phpt +++ b/src/tests/stream_wrapper/stream_wrapper_without_openssl.phpt @@ -2,6 +2,7 @@ Stream wrapper, without a dependency on openssl --SKIPIF-- += 80000) print "skip"; ?> --INI-- sp.configuration_file={PWD}/config/config_stream_wrapper.ini --FILE-- diff --git a/src/tests/strict_mode/strict_mode_enabled.phpt b/src/tests/strict_mode/strict_mode_enabled.phpt index c511f9a..a986987 100644 --- a/src/tests/strict_mode/strict_mode_enabled.phpt +++ b/src/tests/strict_mode/strict_mode_enabled.phpt @@ -11,7 +11,7 @@ sp.configuration_file={PWD}/config/config_strict_mode_enabled.ini ini_set('display_errors', 1); ?> --EXPECTF-- -Fatal error: Uncaught TypeError: ini_set() expects parameter 2 to be string, %s given in %s/tests/strict_mode/strict_mode_enabled.php:%d +Fatal error: Uncaught TypeError: ini_set()%s given in %s/tests/strict_mode/strict_mode_enabled.php:%d Stack trace: #0 %s/tests/strict_mode/strict_mode_enabled.php(2): ini_set('display_errors', 1) #1 {main} diff --git a/src/tests/unserialize/unserialize_wrong_call.phpt b/src/tests/unserialize/unserialize_wrong_call.phpt index 729d020..a6fe140 100644 --- a/src/tests/unserialize/unserialize_wrong_call.phpt +++ b/src/tests/unserialize/unserialize_wrong_call.phpt @@ -2,6 +2,7 @@ Unserialize ok, but called with the wrong numeber of aguments --SKIPIF-- += 80000) print "skip"; ?> --INI-- sp.configuration_file={PWD}/config/config_serialize.ini --FILE-- diff --git a/src/tests/xxe/disable_xxe_dom.phpt b/src/tests/xxe/disable_xxe_dom.phpt index 58467f7..99ed572 100644 --- a/src/tests/xxe/disable_xxe_dom.phpt +++ b/src/tests/xxe/disable_xxe_dom.phpt @@ -1,7 +1,8 @@ --TEST-- -Disable XXE +Disable XXE, in php8 --SKIPIF-- + --INI-- sp.configuration_file={PWD}/config/disable_xxe.ini --EXTENSIONS-- @@ -41,29 +42,34 @@ $dom = new DOMDocument('1.0'); $dom->loadXML($xml, LIBXML_DTDATTR|LIBXML_DTDLOAD|LIBXML_NOENT); printf("without xxe: %s", $dom->getElementsByTagName('testing')->item(0)->nodeValue); +?> +--CLEAN-- + --EXPECTF-- -Warning: DOMDocument::loadXML(): I/O warning : failed to load external entity "file://%a/content.txt" in %a/disable_xxe_dom.php on line %d +Deprecated: Function libxml_disable_entity_loader() is deprecated in %s/tests/xxe/disable_xxe_dom.php on line %d -Warning: DOMDocument::loadXML(): Failure to process entity foo in Entity, line: %d in %a/disable_xxe_dom.php on line %d +Warning: DOMDocument::loadXML(): I/O warning : failed to load external entity "file://%s/tests/xxe/content.txt" in /var/www/html/snuffleupagus/src/tests/xxe/disable_xxe_dom.php on line %d -Warning: DOMDocument::loadXML(): Entity 'foo' not defined in Entity, line: %d in %a/disable_xxe_dom.php on line %d +Warning: DOMDocument::loadXML(): Failure to process entity foo in Entity, line: 6 in %s/tests/xxe/disable_xxe_dom.php on line %d -Notice: Trying to get property %a in %a/disable_xxe_dom.php on line %d +Warning: DOMDocument::loadXML(): Entity 'foo' not defined in Entity, line: 6 in %s/tests/xxe/disable_xxe_dom.php on line %d + +Warning: Attempt to read property "nodeValue" on null in %s/tests/xxe/disable_xxe_dom.php on line %d libxml_disable_entity to true: -Warning: DOMDocument::loadXML(): I/O warning : failed to load external entity "file://%a/content.txt" in %a/disable_xxe_dom.php on line %d +Deprecated: Function libxml_disable_entity_loader() is deprecated in %s/tests/xxe/disable_xxe_dom.php on line %d + +Warning: DOMDocument::loadXML(): I/O warning : failed to load external entity "file://%s/tests/xxe/content.txt" in /var/www/html/snuffleupagus/src/tests/xxe/disable_xxe_dom.php on line %d -Warning: DOMDocument::loadXML(): Failure to process entity foo in Entity, line: %d in %a/disable_xxe_dom.php on line %d +Warning: DOMDocument::loadXML(): Failure to process entity foo in Entity, line: 6 in %s/tests/xxe/disable_xxe_dom.php on line %d -Warning: DOMDocument::loadXML(): Entity 'foo' not defined in Entity, line: %d in %a/disable_xxe_dom.php on line %d +Warning: DOMDocument::loadXML(): Entity 'foo' not defined in Entity, line: 6 in %s/tests/xxe/disable_xxe_dom.php on line %d -Notice: Trying to get property %a in %a/disable_xxe_dom.php on line %d +Warning: Attempt to read property "nodeValue" on null in %s/tests/xxe/disable_xxe_dom.php on line %d libxml_disable_entity to false: -without xxe: foo ---CLEAN-- - + +Deprecated: Function libxml_disable_entity_loader() is deprecated in %s/tests/xxe/disable_xxe_dom.php on line %d diff --git a/src/tests/xxe/disable_xxe_dom_disabled.phpt b/src/tests/xxe/disable_xxe_dom_disabled.phpt index fe88d76..493f5a3 100644 --- a/src/tests/xxe/disable_xxe_dom_disabled.phpt +++ b/src/tests/xxe/disable_xxe_dom_disabled.phpt @@ -2,6 +2,7 @@ Disable XXE --SKIPIF-- += 80000) print "skip"; ?> --INI-- sp.configuration_file={PWD}/config/disable_xxe_disable.ini --EXTENSIONS-- diff --git a/src/tests/xxe/disable_xxe_dom_disabled_php8.phpt b/src/tests/xxe/disable_xxe_dom_disabled_php8.phpt new file mode 100644 index 0000000..c0db7fc --- /dev/null +++ b/src/tests/xxe/disable_xxe_dom_disabled_php8.phpt @@ -0,0 +1,60 @@ +--TEST-- +Disable XXE in php8 +--SKIPIF-- + + +--INI-- +sp.configuration_file={PWD}/config/disable_xxe_disable.ini +--EXTENSIONS-- +dom +--FILE-- +WARNING, external entity loaded!'; +file_put_contents($dir . '/content.txt', $content); + +$xml = << + +]> +&foo; +EOD; + +file_put_contents($dir . '/content.xml', $xml); + +libxml_disable_entity_loader(true); +$dom = new DOMDocument('1.0'); +$dom->loadXML($xml, LIBXML_DTDATTR|LIBXML_DTDLOAD|LIBXML_NOENT); +printf("libxml_disable_entity to true: %s\n", $dom->getElementsByTagName('testing')->item(0)->nodeValue); + +libxml_disable_entity_loader(false); +$dom = new DOMDocument('1.0'); +$dom->loadXML($xml, LIBXML_DTDATTR|LIBXML_DTDLOAD|LIBXML_NOENT); +printf("libxml_disable_entity to false: %s\n", $dom->getElementsByTagName('testing')->item(0)->nodeValue); + +$xml = "foo"; +file_put_contents('content.xml', $xml); + +libxml_disable_entity_loader(false); +$dom = new DOMDocument('1.0'); +$dom->loadXML($xml, LIBXML_DTDATTR|LIBXML_DTDLOAD|LIBXML_NOENT); +printf("without xxe: %s", $dom->getElementsByTagName('testing')->item(0)->nodeValue); + +?> +--CLEAN-- + +--EXPECTF-- +Deprecated: Function libxml_disable_entity_loader() is deprecated in %s/tests/xxe/disable_xxe_dom_disabled.php on line %d +libxml_disable_entity to true: WARNING, external entity loaded! + +Deprecated: Function libxml_disable_entity_loader() is deprecated in %s/tests/xxe/disable_xxe_dom_disabled.php on line %d +libxml_disable_entity to false: WARNING, external entity loaded! + +Deprecated: Function libxml_disable_entity_loader() is deprecated in %s/tests/xxe/disable_xxe_dom_disabled.php on line %d + diff --git a/src/tests/xxe/disable_xxe_xml_parse.phpt b/src/tests/xxe/disable_xxe_xml_parse.phpt index b6dec2d..6b48bea 100644 --- a/src/tests/xxe/disable_xxe_xml_parse.phpt +++ b/src/tests/xxe/disable_xxe_xml_parse.phpt @@ -8,6 +8,7 @@ Disable XXE in xml_parse echo "skip because the `xml` extension isn't loaded"; } ?> += 80000) print "skip"; ?> --EXTENSIONS-- xml --INI-- diff --git a/src/tests/xxe/disable_xxe_xml_parse_php8.phpt b/src/tests/xxe/disable_xxe_xml_parse_php8.phpt new file mode 100644 index 0000000..4a8622a --- /dev/null +++ b/src/tests/xxe/disable_xxe_xml_parse_php8.phpt @@ -0,0 +1,106 @@ +--TEST-- +Disable XXE in xml_parse, in php8 +--SKIPIF-- + + +--EXTENSIONS-- +xml +--INI-- +sp.configuration_file={PWD}/config/disable_xxe.ini +--FILE-- + + +]> +&foo; +EOD; + +file_put_contents('content.xml', $xml); + +function create_parser() { + $parser = xml_parser_create(); + xml_set_element_handler( + $parser, + function($parser, $name, array $attributes) { + var_dump($name); + echo "\n"; + var_dump($attributes); + }, + function($parser, $name) { + var_dump($name); + } + ); + + xml_set_character_data_handler( + $parser, + function ($parser, $text){ + echo 'text' . $text; + } + ); + + return $parser; +} + +libxml_disable_entity_loader(true); +$parser = create_parser(); +$doc = xml_parse($parser, $xml, true); +xml_parser_free($parser); + +libxml_disable_entity_loader(false); +$parser = create_parser(); +$doc = xml_parse($parser, $xml, true); +xml_parser_free($parser); + +$xml = "foo"; +file_put_contents('content.xml', $xml); +$parser = create_parser(); +$doc = xml_parse($parser, $xml, true); +xml_parser_free($parser); + +--EXPECTF-- + Deprecated: Function libxml_disable_entity_loader() is deprecated in %s/tests/xxe/disable_xxe_xml_parse.php on line 41 +string(4) "TEST" + +array(0) { +} +string(7) "TESTING" + +array(0) { +} +string(7) "TESTING" +string(4) "TEST" + +Deprecated: Function libxml_disable_entity_loader() is deprecated in %s/tests/xxe/disable_xxe_xml_parse.php on line 46 +string(4) "TEST" + +array(0) { +} +string(7) "TESTING" + +array(0) { +} +string(7) "TESTING" +string(4) "TEST" +string(4) "TEST" + +array(0) { +} +string(7) "TESTING" + +array(0) { +} +textfoostring(7) "TESTING" + -- cgit v1.3 From efec261b07e76f6c3e53beb831bbc2c65d8884d3 Mon Sep 17 00:00:00 2001 From: jvoisin Date: Sun, 13 Dec 2020 16:26:19 +0100 Subject: Get rid of pcre1 --- src/sp_pcre_compat.c | 24 ++++-------------------- src/sp_pcre_compat.h | 8 -------- 2 files changed, 4 insertions(+), 28 deletions(-) (limited to 'src') diff --git a/src/sp_pcre_compat.c b/src/sp_pcre_compat.c index 3f8ff1e..d3a10af 100644 --- a/src/sp_pcre_compat.c +++ b/src/sp_pcre_compat.c @@ -1,19 +1,14 @@ #include "php_snuffleupagus.h" sp_pcre* sp_pcre_compile(const char* const pattern) { - sp_pcre* ret = NULL; -#ifdef SP_HAS_PCRE2 + assert(NULL != pattern); + unsigned char pcre_error[128] = {0}; int errornumber; PCRE2_SIZE erroroffset; - ret = pcre2_compile((PCRE2_SPTR)pattern, PCRE2_ZERO_TERMINATED, + sp_pcre* ret = pcre2_compile((PCRE2_SPTR)pattern, PCRE2_ZERO_TERMINATED, PCRE2_CASELESS, &errornumber, &erroroffset, NULL); pcre2_get_error_message(errornumber, pcre_error, sizeof(pcre_error)); -#else - const char* pcre_error = NULL; - int erroroffset; - ret = pcre_compile(pattern, PCRE_CASELESS, &pcre_error, &erroroffset, NULL); -#endif if (NULL == ret) { sp_log_err("config", "Failed to compile '%s': %s on line %zu.", pattern, @@ -24,26 +19,15 @@ sp_pcre* sp_pcre_compile(const char* const pattern) { bool ZEND_HOT sp_is_regexp_matching_len(const sp_pcre* regexp, const char* str, size_t len) { - int ret = 0; - assert(NULL != regexp); assert(NULL != str); -#ifdef SP_HAS_PCRE2 pcre2_match_data* match_data = pcre2_match_data_create_from_pattern(regexp, NULL); - ret = pcre2_match(regexp, (PCRE2_SPTR)str, len, 0, 0, match_data, NULL); -#else - int vec[30]; - ret = pcre_exec(regexp, NULL, str, len, 0, 0, vec, sizeof(vec) / sizeof(int)); -#endif + int ret = pcre2_match(regexp, (PCRE2_SPTR)str, len, 0, 0, match_data, NULL); if (ret < 0) { -#ifdef SP_HAS_PCRE2 if (ret != PCRE2_ERROR_NOMATCH) { -#else - if (ret != PCRE_ERROR_NOMATCH) { -#endif // LCOV_EXCL_START sp_log_err("regexp", "Something went wrong with a regexp (%d).", ret); // LCOV_EXCL_STOP diff --git a/src/sp_pcre_compat.h b/src/sp_pcre_compat.h index b429683..6fcb383 100644 --- a/src/sp_pcre_compat.h +++ b/src/sp_pcre_compat.h @@ -7,26 +7,18 @@ #undef pcre_exec #undef pcre_compile -/* We're not supporting pcre when it's not bundled with php7, - * yet. Pull-requests are welcome. */ #if HAVE_BUNDLED_PCRE #if PHP_VERSION_ID >= 70300 -#define SP_HAS_PCRE2 #include "ext/pcre/php_pcre.h" #else #include "ext/pcre/pcrelib/pcre.h" #endif #else -#define SP_HAS_PCRE2 #define PCRE2_CODE_UNIT_WIDTH 8 #include "pcre2.h" #endif -#ifdef SP_HAS_PCRE2 #define sp_pcre pcre2_code -#else -#define sp_pcre pcre -#endif sp_pcre* sp_pcre_compile(const char* str); #define sp_is_regexp_matching_zend(regexp, zstr) \ -- cgit v1.3 From a64d0a29bf966135248fe53eefade0dd59652230 Mon Sep 17 00:00:00 2001 From: jvoisin Date: Sun, 13 Dec 2020 19:15:48 +0100 Subject: Remove a duplicate include --- src/php_snuffleupagus.h | 1 - 1 file changed, 1 deletion(-) (limited to 'src') diff --git a/src/php_snuffleupagus.h b/src/php_snuffleupagus.h index 532516f..14efadb 100644 --- a/src/php_snuffleupagus.h +++ b/src/php_snuffleupagus.h @@ -29,7 +29,6 @@ #include #include "SAPI.h" -#include "ext/session/php_session.h" #include "ext/standard/head.h" #include "ext/standard/info.h" #include "ext/standard/url.h" -- cgit v1.3 From 06804cec06e500b7113d1ed41456ef4d9e58c1f0 Mon Sep 17 00:00:00 2001 From: jvoisin Date: Sun, 13 Dec 2020 19:40:29 +0100 Subject: Reduce the scope of a call --- src/sp_pcre_compat.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'src') diff --git a/src/sp_pcre_compat.c b/src/sp_pcre_compat.c index d3a10af..c575a79 100644 --- a/src/sp_pcre_compat.c +++ b/src/sp_pcre_compat.c @@ -8,9 +8,9 @@ sp_pcre* sp_pcre_compile(const char* const pattern) { PCRE2_SIZE erroroffset; sp_pcre* ret = pcre2_compile((PCRE2_SPTR)pattern, PCRE2_ZERO_TERMINATED, PCRE2_CASELESS, &errornumber, &erroroffset, NULL); - pcre2_get_error_message(errornumber, pcre_error, sizeof(pcre_error)); if (NULL == ret) { + pcre2_get_error_message(errornumber, pcre_error, sizeof(pcre_error)); sp_log_err("config", "Failed to compile '%s': %s on line %zu.", pattern, pcre_error, sp_line_no); } -- cgit v1.3 From a9e240ef0655175f930810cf78ac7df593a6dde6 Mon Sep 17 00:00:00 2001 From: Tim Gates Date: Sun, 20 Dec 2020 01:11:19 +1100 Subject: docs: fix simple typo, migitate -> mitigate There is a small typo in src/sp_utils.c. Should read `mitigate` rather than `migitate`.--- src/sp_utils.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'src') diff --git a/src/sp_utils.c b/src/sp_utils.c index 4c78ce5..cb63037 100644 --- a/src/sp_utils.c +++ b/src/sp_utils.c @@ -127,7 +127,7 @@ static int construct_filename(char* filename, } /* We're using the sha256 sum of the rule's textual representation - * as filename, in order to only have one dump per rule, to migitate + * as filename, in order to only have one dump per rule, to mitigate * DoS attacks. */ PHP_SHA256Init(&context); PHP_SHA256Update(&context, (const unsigned char*)ZSTR_VAL(textual), -- cgit v1.3 From 98ed3be52fa15521ef405fc8029176279d80778e Mon Sep 17 00:00:00 2001 From: Julien Voisin Date: Thu, 24 Dec 2020 10:32:28 +0000 Subject: Add PHP8 support --- .travis.yml | 3 - src/php_snuffleupagus.h | 2 +- src/sp_pcre_compat.c | 24 ++++- src/sp_pcre_compat.h | 16 ++-- src/tests/xxe/disable_xxe_dom.phpt | 75 ---------------- src/tests/xxe/disable_xxe_dom_disabled_php8.phpt | 60 ------------- src/tests/xxe/disable_xxe_xml_parse_php8.phpt | 106 ----------------------- 7 files changed, 30 insertions(+), 256 deletions(-) delete mode 100644 src/tests/xxe/disable_xxe_dom.phpt delete mode 100644 src/tests/xxe/disable_xxe_dom_disabled_php8.phpt delete mode 100644 src/tests/xxe/disable_xxe_xml_parse_php8.phpt (limited to 'src') diff --git a/.travis.yml b/.travis.yml index 0bab804..b4c183e 100644 --- a/.travis.yml +++ b/.travis.yml @@ -38,9 +38,6 @@ matrix: php: "7.4" - env: TARGET="gcc php nightly novld" CC="gcc" php: "nightly" - allow_failures: - - env: TARGET="gcc php nightly novld" CC="gcc" - php: "nightly" script: - if [[ ! "${TARGET}" = *"novld"* ]]; then pecl install vld-beta ; fi diff --git a/src/php_snuffleupagus.h b/src/php_snuffleupagus.h index 14efadb..02b464e 100644 --- a/src/php_snuffleupagus.h +++ b/src/php_snuffleupagus.h @@ -14,7 +14,6 @@ #include #include #include -#include "sp_pcre_compat.h" #include #include #include @@ -29,6 +28,7 @@ #include #include "SAPI.h" +#include "ext/pcre/php_pcre.h" #include "ext/standard/head.h" #include "ext/standard/info.h" #include "ext/standard/url.h" diff --git a/src/sp_pcre_compat.c b/src/sp_pcre_compat.c index c575a79..d2efc71 100644 --- a/src/sp_pcre_compat.c +++ b/src/sp_pcre_compat.c @@ -3,14 +3,21 @@ sp_pcre* sp_pcre_compile(const char* const pattern) { assert(NULL != pattern); + sp_pcre* ret = NULL; +#ifdef SP_HAS_PCRE2 unsigned char pcre_error[128] = {0}; int errornumber; PCRE2_SIZE erroroffset; - sp_pcre* ret = pcre2_compile((PCRE2_SPTR)pattern, PCRE2_ZERO_TERMINATED, + ret = pcre2_compile((PCRE2_SPTR)pattern, PCRE2_ZERO_TERMINATED, PCRE2_CASELESS, &errornumber, &erroroffset, NULL); + pcre2_get_error_message(errornumber, pcre_error, sizeof(pcre_error)); +#else + const char* pcre_error = NULL; + int erroroffset; + ret = php_pcre_compile(pattern, PCRE_CASELESS, &pcre_error, &erroroffset, NULL); +#endif if (NULL == ret) { - pcre2_get_error_message(errornumber, pcre_error, sizeof(pcre_error)); sp_log_err("config", "Failed to compile '%s': %s on line %zu.", pattern, pcre_error, sp_line_no); } @@ -19,15 +26,26 @@ sp_pcre* sp_pcre_compile(const char* const pattern) { bool ZEND_HOT sp_is_regexp_matching_len(const sp_pcre* regexp, const char* str, size_t len) { + int ret = 0; + assert(NULL != regexp); assert(NULL != str); +#ifdef SP_HAS_PCRE2 pcre2_match_data* match_data = pcre2_match_data_create_from_pattern(regexp, NULL); - int ret = pcre2_match(regexp, (PCRE2_SPTR)str, len, 0, 0, match_data, NULL); + ret = pcre2_match(regexp, (PCRE2_SPTR)str, len, 0, 0, match_data, NULL); +#else + int vec[30]; + ret = php_pcre_exec(regexp, NULL, str, len, 0, 0, vec, sizeof(vec) / sizeof(int)); +#endif if (ret < 0) { +#ifdef SP_HAS_PCRE2 if (ret != PCRE2_ERROR_NOMATCH) { +#else + if (ret != PCRE_ERROR_NOMATCH) { +#endif // LCOV_EXCL_START sp_log_err("regexp", "Something went wrong with a regexp (%d).", ret); // LCOV_EXCL_STOP diff --git a/src/sp_pcre_compat.h b/src/sp_pcre_compat.h index 6fcb383..b70630d 100644 --- a/src/sp_pcre_compat.h +++ b/src/sp_pcre_compat.h @@ -7,18 +7,18 @@ #undef pcre_exec #undef pcre_compile -#if HAVE_BUNDLED_PCRE -#if PHP_VERSION_ID >= 70300 -#include "ext/pcre/php_pcre.h" -#else -#include "ext/pcre/pcrelib/pcre.h" -#endif -#else + #define PCRE2_CODE_UNIT_WIDTH 8 -#include "pcre2.h" +#if PHP_VERSION_ID >= 70300 +#define SP_HAS_PCRE2 #endif +#include "ext/pcre/php_pcre.h" // PCRE1 +#ifdef SP_HAS_PCRE2 #define sp_pcre pcre2_code +#else +#define sp_pcre pcre +#endif sp_pcre* sp_pcre_compile(const char* str); #define sp_is_regexp_matching_zend(regexp, zstr) \ diff --git a/src/tests/xxe/disable_xxe_dom.phpt b/src/tests/xxe/disable_xxe_dom.phpt deleted file mode 100644 index 99ed572..0000000 --- a/src/tests/xxe/disable_xxe_dom.phpt +++ /dev/null @@ -1,75 +0,0 @@ ---TEST-- -Disable XXE, in php8 ---SKIPIF-- - - ---INI-- -sp.configuration_file={PWD}/config/disable_xxe.ini ---EXTENSIONS-- -dom ---FILE-- - - -]> -&foo; -EOD; - -file_put_contents('content.xml', $xml); - -libxml_disable_entity_loader(true); -$dom = new DOMDocument('1.0'); -$dom->loadXML($xml, LIBXML_DTDATTR|LIBXML_DTDLOAD|LIBXML_NOENT); -printf("libxml_disable_entity to true: %s\n", $dom->getElementsByTagName('testing')->item(0)->nodeValue); - -libxml_disable_entity_loader(false); -$dom = new DOMDocument('1.0'); -$dom->loadXML($xml, LIBXML_DTDATTR|LIBXML_DTDLOAD|LIBXML_NOENT); -printf("libxml_disable_entity to false: %s\n", $dom->getElementsByTagName('testing')->item(0)->nodeValue); - -$xml = "foo"; -file_put_contents('content.xml', $xml); - -libxml_disable_entity_loader(false); -$dom = new DOMDocument('1.0'); -$dom->loadXML($xml, LIBXML_DTDATTR|LIBXML_DTDLOAD|LIBXML_NOENT); -printf("without xxe: %s", $dom->getElementsByTagName('testing')->item(0)->nodeValue); - -?> ---CLEAN-- - ---EXPECTF-- -Deprecated: Function libxml_disable_entity_loader() is deprecated in %s/tests/xxe/disable_xxe_dom.php on line %d - -Warning: DOMDocument::loadXML(): I/O warning : failed to load external entity "file://%s/tests/xxe/content.txt" in /var/www/html/snuffleupagus/src/tests/xxe/disable_xxe_dom.php on line %d - -Warning: DOMDocument::loadXML(): Failure to process entity foo in Entity, line: 6 in %s/tests/xxe/disable_xxe_dom.php on line %d - -Warning: DOMDocument::loadXML(): Entity 'foo' not defined in Entity, line: 6 in %s/tests/xxe/disable_xxe_dom.php on line %d - -Warning: Attempt to read property "nodeValue" on null in %s/tests/xxe/disable_xxe_dom.php on line %d -libxml_disable_entity to true: - -Deprecated: Function libxml_disable_entity_loader() is deprecated in %s/tests/xxe/disable_xxe_dom.php on line %d - -Warning: DOMDocument::loadXML(): I/O warning : failed to load external entity "file://%s/tests/xxe/content.txt" in /var/www/html/snuffleupagus/src/tests/xxe/disable_xxe_dom.php on line %d - -Warning: DOMDocument::loadXML(): Failure to process entity foo in Entity, line: 6 in %s/tests/xxe/disable_xxe_dom.php on line %d - -Warning: DOMDocument::loadXML(): Entity 'foo' not defined in Entity, line: 6 in %s/tests/xxe/disable_xxe_dom.php on line %d - -Warning: Attempt to read property "nodeValue" on null in %s/tests/xxe/disable_xxe_dom.php on line %d -libxml_disable_entity to false: - -Deprecated: Function libxml_disable_entity_loader() is deprecated in %s/tests/xxe/disable_xxe_dom.php on line %d diff --git a/src/tests/xxe/disable_xxe_dom_disabled_php8.phpt b/src/tests/xxe/disable_xxe_dom_disabled_php8.phpt deleted file mode 100644 index c0db7fc..0000000 --- a/src/tests/xxe/disable_xxe_dom_disabled_php8.phpt +++ /dev/null @@ -1,60 +0,0 @@ ---TEST-- -Disable XXE in php8 ---SKIPIF-- - - ---INI-- -sp.configuration_file={PWD}/config/disable_xxe_disable.ini ---EXTENSIONS-- -dom ---FILE-- -WARNING, external entity loaded!'; -file_put_contents($dir . '/content.txt', $content); - -$xml = << - -]> -&foo; -EOD; - -file_put_contents($dir . '/content.xml', $xml); - -libxml_disable_entity_loader(true); -$dom = new DOMDocument('1.0'); -$dom->loadXML($xml, LIBXML_DTDATTR|LIBXML_DTDLOAD|LIBXML_NOENT); -printf("libxml_disable_entity to true: %s\n", $dom->getElementsByTagName('testing')->item(0)->nodeValue); - -libxml_disable_entity_loader(false); -$dom = new DOMDocument('1.0'); -$dom->loadXML($xml, LIBXML_DTDATTR|LIBXML_DTDLOAD|LIBXML_NOENT); -printf("libxml_disable_entity to false: %s\n", $dom->getElementsByTagName('testing')->item(0)->nodeValue); - -$xml = "foo"; -file_put_contents('content.xml', $xml); - -libxml_disable_entity_loader(false); -$dom = new DOMDocument('1.0'); -$dom->loadXML($xml, LIBXML_DTDATTR|LIBXML_DTDLOAD|LIBXML_NOENT); -printf("without xxe: %s", $dom->getElementsByTagName('testing')->item(0)->nodeValue); - -?> ---CLEAN-- - ---EXPECTF-- -Deprecated: Function libxml_disable_entity_loader() is deprecated in %s/tests/xxe/disable_xxe_dom_disabled.php on line %d -libxml_disable_entity to true: WARNING, external entity loaded! - -Deprecated: Function libxml_disable_entity_loader() is deprecated in %s/tests/xxe/disable_xxe_dom_disabled.php on line %d -libxml_disable_entity to false: WARNING, external entity loaded! - -Deprecated: Function libxml_disable_entity_loader() is deprecated in %s/tests/xxe/disable_xxe_dom_disabled.php on line %d - diff --git a/src/tests/xxe/disable_xxe_xml_parse_php8.phpt b/src/tests/xxe/disable_xxe_xml_parse_php8.phpt deleted file mode 100644 index 4a8622a..0000000 --- a/src/tests/xxe/disable_xxe_xml_parse_php8.phpt +++ /dev/null @@ -1,106 +0,0 @@ ---TEST-- -Disable XXE in xml_parse, in php8 ---SKIPIF-- - - ---EXTENSIONS-- -xml ---INI-- -sp.configuration_file={PWD}/config/disable_xxe.ini ---FILE-- - - -]> -&foo; -EOD; - -file_put_contents('content.xml', $xml); - -function create_parser() { - $parser = xml_parser_create(); - xml_set_element_handler( - $parser, - function($parser, $name, array $attributes) { - var_dump($name); - echo "\n"; - var_dump($attributes); - }, - function($parser, $name) { - var_dump($name); - } - ); - - xml_set_character_data_handler( - $parser, - function ($parser, $text){ - echo 'text' . $text; - } - ); - - return $parser; -} - -libxml_disable_entity_loader(true); -$parser = create_parser(); -$doc = xml_parse($parser, $xml, true); -xml_parser_free($parser); - -libxml_disable_entity_loader(false); -$parser = create_parser(); -$doc = xml_parse($parser, $xml, true); -xml_parser_free($parser); - -$xml = "foo"; -file_put_contents('content.xml', $xml); -$parser = create_parser(); -$doc = xml_parse($parser, $xml, true); -xml_parser_free($parser); - ---EXPECTF-- - Deprecated: Function libxml_disable_entity_loader() is deprecated in %s/tests/xxe/disable_xxe_xml_parse.php on line 41 -string(4) "TEST" - -array(0) { -} -string(7) "TESTING" - -array(0) { -} -string(7) "TESTING" -string(4) "TEST" - -Deprecated: Function libxml_disable_entity_loader() is deprecated in %s/tests/xxe/disable_xxe_xml_parse.php on line 46 -string(4) "TEST" - -array(0) { -} -string(7) "TESTING" - -array(0) { -} -string(7) "TESTING" -string(4) "TEST" -string(4) "TEST" - -array(0) { -} -string(7) "TESTING" - -array(0) { -} -textfoostring(7) "TESTING" - -- cgit v1.3 From f549ae50d3c47fb8a59aa8efb974ac5908591427 Mon Sep 17 00:00:00 2001 From: jvoisin Date: Fri, 25 Dec 2020 15:43:10 +0100 Subject: mark some tests as passing on php8 --- src/tests/disable_function/disabled_function_echo.phpt | 1 - src/tests/disable_function/disabled_function_echo_2.phpt | 1 - src/tests/disable_function/disabled_function_echo_local_var.phpt | 1 - .../disable_function/disabled_function_ensure_client_valid_certs.phpt | 1 - .../disabled_function_ensure_client_valid_certs_curl_multi_setopt.phpt | 1 - .../disabled_function_ensure_client_valid_certs_curl_setopt_array.phpt | 1 - .../disable_function/disabled_function_ensure_server_valid_certs.phpt | 1 - .../disabled_function_ensure_server_valid_certs_curl_multi_setopt.phpt | 1 - .../disabled_function_ensure_server_valid_certs_curl_setopt_array.phpt | 1 - src/tests/disable_function/disabled_function_local_var_6.phpt | 1 - src/tests/disable_function/disabled_function_local_var_7.phpt | 1 - src/tests/disable_function/disabled_function_local_var_8.phpt | 1 - src/tests/disable_function/disabled_function_local_var_const.phpt | 1 - src/tests/disable_function/disabled_function_local_var_obj.phpt | 1 - src/tests/disable_function/disabled_functions.phpt | 1 - .../disable_function/disabled_functions_callback_called_file_r.phpt | 1 - src/tests/disable_function/disabled_functions_called_file_r.phpt | 1 - src/tests/disable_function/disabled_functions_method.phpt | 1 - src/tests/disable_function/disabled_functions_name_r.phpt | 1 - src/tests/disable_function/disabled_functions_nul_byte.phpt | 1 - src/tests/disable_function/disabled_functions_param_allow.phpt | 1 - src/tests/disable_function/disabled_functions_param_array_r.phpt | 1 - src/tests/disable_function/disabled_functions_param_int.phpt | 1 - src/tests/disable_function/disabled_functions_param_r.phpt | 1 - .../disable_function/disabled_functions_param_str_representation.phpt | 1 - src/tests/disable_function/disabled_functions_parse_class.phpt | 1 - src/tests/disable_function/disabled_functions_regexp_multiple.phpt | 1 - src/tests/disable_function/disabled_functions_require.phpt | 1 - src/tests/disable_function/disabled_functions_require_allow.phpt | 1 - src/tests/disable_function/disabled_functions_require_once.phpt | 1 - src/tests/disable_function/disabled_functions_require_simulation.phpt | 1 - src/tests/disable_function/disabled_functions_ret.phpt | 1 - src/tests/disable_function/disabled_functions_ret2.phpt | 1 - src/tests/disable_function/disabled_functions_ret3.phpt | 1 - src/tests/disable_function/disabled_functions_ret_val_rx.phpt | 1 - src/tests/disable_function/disabled_functions_runtime.phpt | 1 - src/tests/disable_function/disabled_functions_upper.phpt | 1 - src/tests/disable_function/disabled_functions_variadic.phpt | 1 - src/tests/disable_function/disabled_native_functions_indirect.phpt | 1 - 39 files changed, 39 deletions(-) (limited to 'src') diff --git a/src/tests/disable_function/disabled_function_echo.phpt b/src/tests/disable_function/disabled_function_echo.phpt index 147fac8..12aaff4 100644 --- a/src/tests/disable_function/disabled_function_echo.phpt +++ b/src/tests/disable_function/disabled_function_echo.phpt @@ -2,7 +2,6 @@ Echo hooking --SKIPIF-- -= 80000) print "skip"; ?> --INI-- sp.configuration_file={PWD}/config/disabled_function_echo.ini --FILE-- diff --git a/src/tests/disable_function/disabled_function_echo_2.phpt b/src/tests/disable_function/disabled_function_echo_2.phpt index 53355e9..82a2fa1 100644 --- a/src/tests/disable_function/disabled_function_echo_2.phpt +++ b/src/tests/disable_function/disabled_function_echo_2.phpt @@ -2,7 +2,6 @@ Echo hooking --SKIPIF-- -= 80000) print "skip"; ?> --INI-- sp.configuration_file={PWD}/config/disabled_function_echo.ini --FILE-- diff --git a/src/tests/disable_function/disabled_function_echo_local_var.phpt b/src/tests/disable_function/disabled_function_echo_local_var.phpt index a614f1f..ee1be1f 100644 --- a/src/tests/disable_function/disabled_function_echo_local_var.phpt +++ b/src/tests/disable_function/disabled_function_echo_local_var.phpt @@ -2,7 +2,6 @@ Echo hooking --SKIPIF-- -= 80000) print "skip"; ?> --INI-- sp.configuration_file={PWD}/config/disabled_function_echo.ini --FILE-- diff --git a/src/tests/disable_function/disabled_function_ensure_client_valid_certs.phpt b/src/tests/disable_function/disabled_function_ensure_client_valid_certs.phpt index 6197e68..9872374 100644 --- a/src/tests/disable_function/disabled_function_ensure_client_valid_certs.phpt +++ b/src/tests/disable_function/disabled_function_ensure_client_valid_certs.phpt @@ -5,7 +5,6 @@ Disable functions - Ensure that client certificates validation can't be disabled if (!extension_loaded("snuffleupagus")) { print("skip"); } if (!extension_loaded("curl")) { print("skip"); } ?> -= 80000) print "skip"; ?> --EXTENSIONS-- curl --INI-- diff --git a/src/tests/disable_function/disabled_function_ensure_client_valid_certs_curl_multi_setopt.phpt b/src/tests/disable_function/disabled_function_ensure_client_valid_certs_curl_multi_setopt.phpt index c469e94..45ae95e 100644 --- a/src/tests/disable_function/disabled_function_ensure_client_valid_certs_curl_multi_setopt.phpt +++ b/src/tests/disable_function/disabled_function_ensure_client_valid_certs_curl_multi_setopt.phpt @@ -5,7 +5,6 @@ Disable functions - Ensure that client certificates validation can't be disabled if (!extension_loaded("snuffleupagus")) { print("skip"); } if (!extension_loaded("curl")) { print("skip"); } ?> -= 80000) print "skip"; ?> --EXTENSIONS-- curl --INI-- diff --git a/src/tests/disable_function/disabled_function_ensure_client_valid_certs_curl_setopt_array.phpt b/src/tests/disable_function/disabled_function_ensure_client_valid_certs_curl_setopt_array.phpt index fec94c5..93ed020 100644 --- a/src/tests/disable_function/disabled_function_ensure_client_valid_certs_curl_setopt_array.phpt +++ b/src/tests/disable_function/disabled_function_ensure_client_valid_certs_curl_setopt_array.phpt @@ -5,7 +5,6 @@ Disable functions - Ensure that client certificates validation can't be disabled if (!extension_loaded("snuffleupagus")) { print("skip"); } if (!extension_loaded("curl")) { print("skip"); } ?> -= 80000) print "skip"; ?> --EXTENSIONS-- curl --INI-- diff --git a/src/tests/disable_function/disabled_function_ensure_server_valid_certs.phpt b/src/tests/disable_function/disabled_function_ensure_server_valid_certs.phpt index 354d3db..6e027de 100644 --- a/src/tests/disable_function/disabled_function_ensure_server_valid_certs.phpt +++ b/src/tests/disable_function/disabled_function_ensure_server_valid_certs.phpt @@ -5,7 +5,6 @@ Disable functions - Ensure that server certificates validation can't be disabled if (!extension_loaded("snuffleupagus")) { print("skip"); } if (!extension_loaded("curl")) { print("skip"); } ?> -= 80000) print "skip"; ?> --EXTENSIONS-- curl --INI-- diff --git a/src/tests/disable_function/disabled_function_ensure_server_valid_certs_curl_multi_setopt.phpt b/src/tests/disable_function/disabled_function_ensure_server_valid_certs_curl_multi_setopt.phpt index 7c03c7e..32013b5 100644 --- a/src/tests/disable_function/disabled_function_ensure_server_valid_certs_curl_multi_setopt.phpt +++ b/src/tests/disable_function/disabled_function_ensure_server_valid_certs_curl_multi_setopt.phpt @@ -5,7 +5,6 @@ Disable functions - Ensure that server certificates validation can't be disabled if (!extension_loaded("snuffleupagus")) { print("skip"); } if (!extension_loaded("curl")) { print("skip"); } ?> -= 80000) print "skip"; ?> --EXTENSIONS-- curl --INI-- diff --git a/src/tests/disable_function/disabled_function_ensure_server_valid_certs_curl_setopt_array.phpt b/src/tests/disable_function/disabled_function_ensure_server_valid_certs_curl_setopt_array.phpt index f6f63ba..ec0528a 100644 --- a/src/tests/disable_function/disabled_function_ensure_server_valid_certs_curl_setopt_array.phpt +++ b/src/tests/disable_function/disabled_function_ensure_server_valid_certs_curl_setopt_array.phpt @@ -5,7 +5,6 @@ Disable functions - Ensure that server certificates validation can't be disabled if (!extension_loaded("snuffleupagus")) { echo("skip"); } if (!extension_loaded("curl")) { echo("skip"); } ?> -= 80000) print "skip"; ?> --EXTENSIONS-- curl --INI-- diff --git a/src/tests/disable_function/disabled_function_local_var_6.phpt b/src/tests/disable_function/disabled_function_local_var_6.phpt index 71fe777..a4d9ae9 100644 --- a/src/tests/disable_function/disabled_function_local_var_6.phpt +++ b/src/tests/disable_function/disabled_function_local_var_6.phpt @@ -2,7 +2,6 @@ Disable functions - match on a local variable --SKIPIF-- -= 80000) print "skip"; ?> --INI-- sp.configuration_file={PWD}/config/disabled_function_local_var.ini --FILE-- diff --git a/src/tests/disable_function/disabled_function_local_var_7.phpt b/src/tests/disable_function/disabled_function_local_var_7.phpt index 2a074c8..f6d4dc6 100644 --- a/src/tests/disable_function/disabled_function_local_var_7.phpt +++ b/src/tests/disable_function/disabled_function_local_var_7.phpt @@ -2,7 +2,6 @@ Disable functions - match on a local variable --SKIPIF-- -= 80000) print "skip"; ?> --INI-- sp.configuration_file={PWD}/config/disabled_function_local_var.ini --FILE-- diff --git a/src/tests/disable_function/disabled_function_local_var_8.phpt b/src/tests/disable_function/disabled_function_local_var_8.phpt index 65b4b35..1279269 100644 --- a/src/tests/disable_function/disabled_function_local_var_8.phpt +++ b/src/tests/disable_function/disabled_function_local_var_8.phpt @@ -2,7 +2,6 @@ Disable functions - match on a local variable --SKIPIF-- -= 80000) print "skip"; ?> --INI-- sp.configuration_file={PWD}/config/disabled_function_local_var.ini --FILE-- diff --git a/src/tests/disable_function/disabled_function_local_var_const.phpt b/src/tests/disable_function/disabled_function_local_var_const.phpt index 1a2767b..e349b8e 100644 --- a/src/tests/disable_function/disabled_function_local_var_const.phpt +++ b/src/tests/disable_function/disabled_function_local_var_const.phpt @@ -2,7 +2,6 @@ Disable functions - match on a constant --SKIPIF-- -= 80000) print "skip"; ?> --INI-- sp.configuration_file={PWD}/config/disabled_function_local_var_const.ini --FILE-- diff --git a/src/tests/disable_function/disabled_function_local_var_obj.phpt b/src/tests/disable_function/disabled_function_local_var_obj.phpt index 80b83cc..684933a 100644 --- a/src/tests/disable_function/disabled_function_local_var_obj.phpt +++ b/src/tests/disable_function/disabled_function_local_var_obj.phpt @@ -2,7 +2,6 @@ Disable functions - match on a local variable --SKIPIF-- -= 80000) print "skip"; ?> --INI-- sp.configuration_file={PWD}/config/disabled_function_local_var_obj.ini --FILE-- diff --git a/src/tests/disable_function/disabled_functions.phpt b/src/tests/disable_function/disabled_functions.phpt index 1434053..cda7c20 100644 --- a/src/tests/disable_function/disabled_functions.phpt +++ b/src/tests/disable_function/disabled_functions.phpt @@ -2,7 +2,6 @@ Disable functions --SKIPIF-- -= 80000) print "skip"; ?> --INI-- sp.configuration_file={PWD}/config/disabled_functions.ini --FILE-- diff --git a/src/tests/disable_function/disabled_functions_callback_called_file_r.phpt b/src/tests/disable_function/disabled_functions_callback_called_file_r.phpt index 464af87..ec75d74 100644 --- a/src/tests/disable_function/disabled_functions_callback_called_file_r.phpt +++ b/src/tests/disable_function/disabled_functions_callback_called_file_r.phpt @@ -2,7 +2,6 @@ Disable functions by matching on the filename_r where the callback function is called, and not defined --SKIPIF-- -= 80000) print "skip"; ?> --INI-- sp.configuration_file={PWD}/config/config_disabled_functions_callback_called_file_r.ini --FILE-- diff --git a/src/tests/disable_function/disabled_functions_called_file_r.phpt b/src/tests/disable_function/disabled_functions_called_file_r.phpt index e592359..dde26f7 100644 --- a/src/tests/disable_function/disabled_functions_called_file_r.phpt +++ b/src/tests/disable_function/disabled_functions_called_file_r.phpt @@ -2,7 +2,6 @@ Disable functions by matching on the filename_r where the function is called, and not defined --SKIPIF-- -= 80000) print "skip"; ?> --INI-- sp.configuration_file={PWD}/config/config_disabled_functions_called_file_r.ini --FILE-- diff --git a/src/tests/disable_function/disabled_functions_method.phpt b/src/tests/disable_function/disabled_functions_method.phpt index b41c74d..b37f9fd 100644 --- a/src/tests/disable_function/disabled_functions_method.phpt +++ b/src/tests/disable_function/disabled_functions_method.phpt @@ -2,7 +2,6 @@ Disable functions --SKIPIF-- -= 80000) print "skip"; ?> --INI-- sp.configuration_file={PWD}/config/config_disabled_functions_method.ini --FILE-- diff --git a/src/tests/disable_function/disabled_functions_name_r.phpt b/src/tests/disable_function/disabled_functions_name_r.phpt index b910e65..7a45c6e 100644 --- a/src/tests/disable_function/disabled_functions_name_r.phpt +++ b/src/tests/disable_function/disabled_functions_name_r.phpt @@ -2,7 +2,6 @@ Disable functions --SKIPIF-- -= 80000) print "skip"; ?> --INI-- sp.configuration_file={PWD}/config/config_disabled_functions_name_r.ini --FILE-- diff --git a/src/tests/disable_function/disabled_functions_nul_byte.phpt b/src/tests/disable_function/disabled_functions_nul_byte.phpt index 2bf26ab..62f4ab5 100644 --- a/src/tests/disable_function/disabled_functions_nul_byte.phpt +++ b/src/tests/disable_function/disabled_functions_nul_byte.phpt @@ -2,7 +2,6 @@ Disable functions with nul byte --SKIPIF-- -= 80000) print "skip"; ?> --INI-- sp.configuration_file={PWD}/config/config_disabled_functions_nul_byte.ini --FILE-- diff --git a/src/tests/disable_function/disabled_functions_param_allow.phpt b/src/tests/disable_function/disabled_functions_param_allow.phpt index ac257e4..3555d19 100644 --- a/src/tests/disable_function/disabled_functions_param_allow.phpt +++ b/src/tests/disable_function/disabled_functions_param_allow.phpt @@ -2,7 +2,6 @@ Disable functions - allow --SKIPIF-- -= 80000) print "skip"; ?> --INI-- sp.configuration_file={PWD}/config/config_disabled_functions_param_allow.ini --FILE-- diff --git a/src/tests/disable_function/disabled_functions_param_array_r.phpt b/src/tests/disable_function/disabled_functions_param_array_r.phpt index 89ecb75..69f729f 100644 --- a/src/tests/disable_function/disabled_functions_param_array_r.phpt +++ b/src/tests/disable_function/disabled_functions_param_array_r.phpt @@ -2,7 +2,6 @@ Disable functions - match on an array using regexp --SKIPIF-- -= 80000) print "skip"; ?> --INI-- sp.configuration_file={PWD}/config/config_disabled_functions_param_r_array.ini --FILE-- diff --git a/src/tests/disable_function/disabled_functions_param_int.phpt b/src/tests/disable_function/disabled_functions_param_int.phpt index d681b3e..6c04849 100644 --- a/src/tests/disable_function/disabled_functions_param_int.phpt +++ b/src/tests/disable_function/disabled_functions_param_int.phpt @@ -2,7 +2,6 @@ Disable functions --SKIPIF-- -= 80000) print "skip"; ?> --INI-- sp.configuration_file={PWD}/config/config_disabled_functions_param_int.ini --FILE-- diff --git a/src/tests/disable_function/disabled_functions_param_r.phpt b/src/tests/disable_function/disabled_functions_param_r.phpt index f30fca9..3d8a362 100644 --- a/src/tests/disable_function/disabled_functions_param_r.phpt +++ b/src/tests/disable_function/disabled_functions_param_r.phpt @@ -2,7 +2,6 @@ Disable functions --SKIPIF-- -= 80000) print "skip"; ?> --INI-- sp.configuration_file={PWD}/config/config_disabled_functions_param_r.ini --FILE-- diff --git a/src/tests/disable_function/disabled_functions_param_str_representation.phpt b/src/tests/disable_function/disabled_functions_param_str_representation.phpt index 179ce93..f56c457 100644 --- a/src/tests/disable_function/disabled_functions_param_str_representation.phpt +++ b/src/tests/disable_function/disabled_functions_param_str_representation.phpt @@ -2,7 +2,6 @@ Disable functions - casting various types to string internally --SKIPIF-- -= 80000) print "skip"; ?> --INI-- sp.configuration_file={PWD}/config/config_disabled_functions_param_str_representation.ini --FILE-- diff --git a/src/tests/disable_function/disabled_functions_parse_class.phpt b/src/tests/disable_function/disabled_functions_parse_class.phpt index 487bd51..e62fe40 100644 --- a/src/tests/disable_function/disabled_functions_parse_class.phpt +++ b/src/tests/disable_function/disabled_functions_parse_class.phpt @@ -2,7 +2,6 @@ Disable functions - Parsing of an Object as a return value of a function --SKIPIF-- -= 80000) print "skip"; ?> --INI-- sp.configuration_file={PWD}/config/disabled_functions_ret.ini --FILE-- diff --git a/src/tests/disable_function/disabled_functions_regexp_multiple.phpt b/src/tests/disable_function/disabled_functions_regexp_multiple.phpt index ca7263a..5f8b151 100644 --- a/src/tests/disable_function/disabled_functions_regexp_multiple.phpt +++ b/src/tests/disable_function/disabled_functions_regexp_multiple.phpt @@ -2,7 +2,6 @@ Disable functions --SKIPIF-- -= 80000) print "skip"; ?> --INI-- sp.configuration_file={PWD}/config/disabled_functions_regexp.ini --FILE-- diff --git a/src/tests/disable_function/disabled_functions_require.phpt b/src/tests/disable_function/disabled_functions_require.phpt index 0050d51..df2b2f0 100644 --- a/src/tests/disable_function/disabled_functions_require.phpt +++ b/src/tests/disable_function/disabled_functions_require.phpt @@ -2,7 +2,6 @@ Disable functions - Require --SKIPIF-- -= 80000) print "skip"; ?> --INI-- sp.configuration_file={PWD}/config/config_disabled_functions_require.ini --FILE-- diff --git a/src/tests/disable_function/disabled_functions_require_allow.phpt b/src/tests/disable_function/disabled_functions_require_allow.phpt index dac7a1e..7ab29aa 100644 --- a/src/tests/disable_function/disabled_functions_require_allow.phpt +++ b/src/tests/disable_function/disabled_functions_require_allow.phpt @@ -2,7 +2,6 @@ Disable functions - Require (allow) --SKIPIF-- -= 80000) print "skip"; ?> --INI-- sp.configuration_file={PWD}/config/config_disabled_functions_require_allow.ini --FILE-- diff --git a/src/tests/disable_function/disabled_functions_require_once.phpt b/src/tests/disable_function/disabled_functions_require_once.phpt index f6ed729..7356c08 100644 --- a/src/tests/disable_function/disabled_functions_require_once.phpt +++ b/src/tests/disable_function/disabled_functions_require_once.phpt @@ -2,7 +2,6 @@ Disable functions - require_once --SKIPIF-- -= 80000) print "skip"; ?> --INI-- sp.configuration_file={PWD}/config/config_disabled_functions_require.ini --FILE-- diff --git a/src/tests/disable_function/disabled_functions_require_simulation.phpt b/src/tests/disable_function/disabled_functions_require_simulation.phpt index 625feee..fa1523c 100644 --- a/src/tests/disable_function/disabled_functions_require_simulation.phpt +++ b/src/tests/disable_function/disabled_functions_require_simulation.phpt @@ -2,7 +2,6 @@ Disable functions - Require (simulation) --SKIPIF-- -= 80000) print "skip"; ?> --INI-- sp.configuration_file={PWD}/config/config_disabled_functions_require.ini --FILE-- diff --git a/src/tests/disable_function/disabled_functions_ret.phpt b/src/tests/disable_function/disabled_functions_ret.phpt index 56da217..c1f2876 100644 --- a/src/tests/disable_function/disabled_functions_ret.phpt +++ b/src/tests/disable_function/disabled_functions_ret.phpt @@ -2,7 +2,6 @@ Disable functions check on `ret`. --SKIPIF-- -= 80000) print "skip"; ?> --INI-- sp.configuration_file={PWD}/config/disabled_functions_ret.ini --FILE-- diff --git a/src/tests/disable_function/disabled_functions_ret2.phpt b/src/tests/disable_function/disabled_functions_ret2.phpt index ede465d..2cc9b98 100644 --- a/src/tests/disable_function/disabled_functions_ret2.phpt +++ b/src/tests/disable_function/disabled_functions_ret2.phpt @@ -2,7 +2,6 @@ Disable functions check on `ret`. --SKIPIF-- -= 80000) print "skip"; ?> --INI-- sp.configuration_file={PWD}/config/disabled_functions_ret.ini --FILE-- diff --git a/src/tests/disable_function/disabled_functions_ret3.phpt b/src/tests/disable_function/disabled_functions_ret3.phpt index fd97694..8a8f7cd 100644 --- a/src/tests/disable_function/disabled_functions_ret3.phpt +++ b/src/tests/disable_function/disabled_functions_ret3.phpt @@ -2,7 +2,6 @@ Disable functions check on `ret`. --SKIPIF-- -= 80000) print "skip"; ?> --INI-- sp.configuration_file={PWD}/config/disabled_functions_ret.ini memory_limit=-1 diff --git a/src/tests/disable_function/disabled_functions_ret_val_rx.phpt b/src/tests/disable_function/disabled_functions_ret_val_rx.phpt index e575af9..fa3f5ca 100644 --- a/src/tests/disable_function/disabled_functions_ret_val_rx.phpt +++ b/src/tests/disable_function/disabled_functions_ret_val_rx.phpt @@ -2,7 +2,6 @@ Disable functions ret val rx --SKIPIF-- -= 80000) print "skip"; ?> --INI-- sp.configuration_file={PWD}/config/disabled_functions_retval_rx.ini --FILE-- diff --git a/src/tests/disable_function/disabled_functions_runtime.phpt b/src/tests/disable_function/disabled_functions_runtime.phpt index 60c5697..3d74b40 100644 --- a/src/tests/disable_function/disabled_functions_runtime.phpt +++ b/src/tests/disable_function/disabled_functions_runtime.phpt @@ -2,7 +2,6 @@ Disable functions - runtime inclusion --SKIPIF-- -= 80000) print "skip"; ?> --INI-- sp.configuration_file={PWD}/config/config_disabled_functions_param_runtime.ini --FILE-- diff --git a/src/tests/disable_function/disabled_functions_upper.phpt b/src/tests/disable_function/disabled_functions_upper.phpt index cdc998a..412eb7d 100644 --- a/src/tests/disable_function/disabled_functions_upper.phpt +++ b/src/tests/disable_function/disabled_functions_upper.phpt @@ -2,7 +2,6 @@ Disable functions - uppercase --SKIPIF-- -= 80000) print "skip"; ?> --INI-- sp.configuration_file={PWD}/config/disabled_functions.ini --FILE-- diff --git a/src/tests/disable_function/disabled_functions_variadic.phpt b/src/tests/disable_function/disabled_functions_variadic.phpt index f364ea3..7658ec8 100644 --- a/src/tests/disable_function/disabled_functions_variadic.phpt +++ b/src/tests/disable_function/disabled_functions_variadic.phpt @@ -2,7 +2,6 @@ Disable functions - support for variadic functions --SKIPIF-- -= 80000) print "skip"; ?> --INI-- sp.configuration_file={PWD}/config/config_disabled_functions_variadic.ini --FILE-- diff --git a/src/tests/disable_function/disabled_native_functions_indirect.phpt b/src/tests/disable_function/disabled_native_functions_indirect.phpt index df585c7..ebb1c74 100644 --- a/src/tests/disable_function/disabled_native_functions_indirect.phpt +++ b/src/tests/disable_function/disabled_native_functions_indirect.phpt @@ -2,7 +2,6 @@ Disabled native functions, called indirectly --SKIPIF-- -= 80000) print "skip"; ?> --INI-- sp.configuration_file={PWD}/config/disabled_functions.ini --FILE-- -- cgit v1.3 From 1d5f534d012729450a7930cc6af5c69f4d263d37 Mon Sep 17 00:00:00 2001 From: jvoisin Date: Mon, 28 Dec 2020 18:44:43 +0100 Subject: Enable more tests for php8 --- src/tests/config_typo3.phpt | 1 - src/tests/phpinfo_presence.phpt | 1 - src/tests/rips_configuration.phpt | 1 - src/tests/shipped_configuration.phpt | 1 - 4 files changed, 4 deletions(-) (limited to 'src') diff --git a/src/tests/config_typo3.phpt b/src/tests/config_typo3.phpt index bae7686..6545d07 100644 --- a/src/tests/config_typo3.phpt +++ b/src/tests/config_typo3.phpt @@ -2,7 +2,6 @@ Rules for Typo3 --SKIPIF-- -= 80000) print "skip"; ?> --INI-- sp.configuration_file={PWD}/../../config/typo3.rules --FILE-- diff --git a/src/tests/phpinfo_presence.phpt b/src/tests/phpinfo_presence.phpt index 7ac9d10..c1388ed 100644 --- a/src/tests/phpinfo_presence.phpt +++ b/src/tests/phpinfo_presence.phpt @@ -2,7 +2,6 @@ Unserialize fail --SKIPIF-- -= 80000) print "skip"; ?> --INI-- sp.configuration_file={PWD}/../../config/default.rules --FILE-- diff --git a/src/tests/rips_configuration.phpt b/src/tests/rips_configuration.phpt index f0930ee..7c197e5 100644 --- a/src/tests/rips_configuration.phpt +++ b/src/tests/rips_configuration.phpt @@ -2,7 +2,6 @@ Shipped configuration (rips) --SKIPIF-- -= 80000) print "skip"; ?> --INI-- sp.configuration_file={PWD}/../../config/rips.rules --FILE-- diff --git a/src/tests/shipped_configuration.phpt b/src/tests/shipped_configuration.phpt index f567b08..b171304 100644 --- a/src/tests/shipped_configuration.phpt +++ b/src/tests/shipped_configuration.phpt @@ -2,7 +2,6 @@ Shipped configuration --SKIPIF-- -= 80000) print "skip"; ?> --INI-- sp.configuration_file={PWD}/../../config/default.rules --FILE-- -- cgit v1.3 From 5923eb1c6b9bcf4a9ee7c4486e5901d2cfc42754 Mon Sep 17 00:00:00 2001 From: jvoisin Date: Mon, 28 Dec 2020 18:53:50 +0100 Subject: Enable 2 more tests --- src/tests/disable_function/disabled_functions_param.phpt | 1 - src/tests/disable_function/disabled_functions_param_pos2.phpt | 3 +-- 2 files changed, 1 insertion(+), 3 deletions(-) (limited to 'src') diff --git a/src/tests/disable_function/disabled_functions_param.phpt b/src/tests/disable_function/disabled_functions_param.phpt index f384401..0a9e8eb 100644 --- a/src/tests/disable_function/disabled_functions_param.phpt +++ b/src/tests/disable_function/disabled_functions_param.phpt @@ -2,7 +2,6 @@ Disable functions --SKIPIF-- -= 80000) print "skip"; ?> --INI-- sp.configuration_file={PWD}/config/config_disabled_functions_param.ini --FILE-- diff --git a/src/tests/disable_function/disabled_functions_param_pos2.phpt b/src/tests/disable_function/disabled_functions_param_pos2.phpt index bfe71ee..06ab5aa 100644 --- a/src/tests/disable_function/disabled_functions_param_pos2.phpt +++ b/src/tests/disable_function/disabled_functions_param_pos2.phpt @@ -2,7 +2,6 @@ Disable functions - match on argument's position, not the first time --SKIPIF-- -= 80000) print "skip"; ?> --INI-- sp.configuration_file={PWD}/config/disabled_functions_pos.ini --FILE-- @@ -11,4 +10,4 @@ strtoupper("od"); strtoupper("id"); ?> --EXPECTF-- -Fatal error: [snuffleupagus][0.0.0.0][disabled_function][drop] Aborted execution on call of the function 'strtoupper', because its argument 'str' content (id) matched the rule 'strlen array' in %a/disabled_functions_param_pos2.php on line 3 +Fatal error: [snuffleupagus][0.0.0.0][disabled_function][drop] Aborted execution on call of the function 'strtoupper', because its argument %s content (id) matched the rule 'strlen array' in %a/disabled_functions_param_pos2.php on line 3 -- cgit v1.3 From 032718b7cb93c4143877e355e9bcb6935d8cedcf Mon Sep 17 00:00:00 2001 From: jvoisin Date: Mon, 28 Dec 2020 20:45:33 +0100 Subject: Add tests for broken configuration on php8 --- .travis.yml | 3 ++- .../broken_configuration_php8/broken_conf.phpt | 14 +++++++++++ .../broken_configuration_php8/broken_conf2.phpt | 14 +++++++++++ .../broken_conf_allow_broken_disabled.phpt | 18 +++++++++++++++ .../broken_conf_allow_broken_enabled.phpt | 16 +++++++++++++ .../broken_conf_config_regexp.phpt | 16 +++++++++++++ ...broken_conf_config_regexp_no_closing_paren.phpt | 16 +++++++++++++ ...f_cookie_encryption_without_encryption_key.phpt | 14 +++++++++++ ...ken_conf_cookie_encryption_without_env_var.phpt | 14 +++++++++++ .../broken_conf_cookie_name_and_regexp.phpt | 14 +++++++++++ .../broken_conf_enable_disable.phpt | 14 +++++++++++ .../broken_conf_eval.phpt | 14 +++++++++++ .../broken_conf_expecting_bool.phpt | 14 +++++++++++ .../broken_conf_invalid_cidr.phpt | 14 +++++++++++ .../broken_conf_invalid_cidr6.phpt | 14 +++++++++++ .../broken_conf_invalid_cidr6_no_slash.phpt | 14 +++++++++++ .../broken_conf_invalid_cidr6_too_big.phpt | 9 ++++++++ .../broken_conf_invalid_cidr_value.phpt | 17 ++++++++++++++ .../broken_conf_invalid_filename.phpt | 14 +++++++++++ .../broken_conf_invalid_log_media.phpt | 14 +++++++++++ .../broken_conf_invalid_type.phpt | 14 +++++++++++ .../broken_conf_key_value.phpt | 14 +++++++++++ .../broken_conf_line_empty_string.phpt | 14 +++++++++++ .../broken_conf_line_no_closing.phpt | 14 +++++++++++ .../broken_conf_local_var_1.phpt | 16 +++++++++++++ .../broken_conf_local_var_10.phpt | 16 +++++++++++++ .../broken_conf_local_var_11.phpt | 16 +++++++++++++ .../broken_conf_local_var_12.phpt | 14 +++++++++++ .../broken_conf_local_var_13.phpt | 16 +++++++++++++ .../broken_conf_local_var_14.phpt | 16 +++++++++++++ .../broken_conf_local_var_15.phpt | 16 +++++++++++++ .../broken_conf_local_var_16.phpt | 16 +++++++++++++ .../broken_conf_local_var_2.phpt | 16 +++++++++++++ .../broken_conf_local_var_3.phpt | 16 +++++++++++++ .../broken_conf_local_var_4.phpt | 16 +++++++++++++ .../broken_conf_local_var_5.phpt | 16 +++++++++++++ .../broken_conf_local_var_6.phpt | 16 +++++++++++++ .../broken_conf_local_var_7.phpt | 16 +++++++++++++ .../broken_conf_local_var_8.phpt | 16 +++++++++++++ .../broken_conf_local_var_9.phpt | 16 +++++++++++++ .../broken_conf_lots_of_quotes.phpt | 14 +++++++++++ .../broken_conf_missing_script.phpt | 17 ++++++++++++++ .../broken_conf_mutually_exclusive.phpt | 14 +++++++++++ .../broken_conf_mutually_exclusive10.phpt | 14 +++++++++++ .../broken_conf_mutually_exclusive11.phpt | 14 +++++++++++ .../broken_conf_mutually_exclusive12.phpt | 14 +++++++++++ .../broken_conf_mutually_exclusive2.phpt | 14 +++++++++++ .../broken_conf_mutually_exclusive3.phpt | 14 +++++++++++ .../broken_conf_mutually_exclusive4.phpt | 14 +++++++++++ .../broken_conf_mutually_exclusive5.phpt | 14 +++++++++++ .../broken_conf_mutually_exclusive6.phpt | 14 +++++++++++ .../broken_conf_mutually_exclusive7.phpt | 14 +++++++++++ .../broken_conf_mutually_exclusive8.phpt | 14 +++++++++++ .../broken_conf_mutually_exclusive9.phpt | 14 +++++++++++ .../broken_conf_no_cookie_action.phpt | 14 +++++++++++ .../broken_conf_no_cookie_name.phpt | 14 +++++++++++ .../broken_conf_no_file_specified.phpt | 10 ++++++++ .../broken_conf_nonexisting_script.phpt | 17 ++++++++++++++ .../broken_conf_quotes.phpt | 16 +++++++++++++ .../broken_conf_readonly_exec.phpt | 17 ++++++++++++++ .../broken_conf_samesite.phpt | 14 +++++++++++ .../broken_conf_session_encryption.phpt | 14 +++++++++++ ..._session_encryption_without_encryption_key.phpt | 14 +++++++++++ ...en_conf_session_encryption_without_env_var.phpt | 14 +++++++++++ .../broken_conf_shown_in_phpinfo.phpt | 27 ++++++++++++++++++++++ .../broken_conf_truncated.phpt | 14 +++++++++++ .../broken_conf_unserialize.phpt | 17 ++++++++++++++ .../broken_conf_upload_validation.phpt | 17 ++++++++++++++ .../broken_conf_weird_keyword.phpt | 14 +++++++++++ .../broken_conf_wrapper_whitelist.phpt | 18 +++++++++++++++ .../broken_conf_wrong_quotes.phpt | 14 +++++++++++ .../broken_conf_wrong_type.phpt | 14 +++++++++++ .../broken_invalid_client_ip4.phpt | 16 +++++++++++++ .../broken_configuration_php8/broken_regexp.phpt | 16 +++++++++++++ .../broken_unmatching_brackets.phpt | 16 +++++++++++++ .../config/borken_conf_enable_disable.ini | 1 + .../config/borken_conf_upload_validation.ini | 1 + .../config/broken_conf.ini | 1 + .../config/broken_conf2.ini | 1 + .../config/broken_conf_cookie_action.ini | 1 + ...nf_cookie_encryption_without_encryption_key.ini | 2 ++ ...oken_conf_cookie_encryption_without_env_var.ini | 2 ++ .../config/broken_conf_cookie_name_and_regexp.ini | 2 ++ .../config/broken_conf_cookie_samesite.ini | 1 + .../config/broken_conf_eval.ini | 1 + .../config/broken_conf_expecting_bool.ini | 5 ++++ .../config/broken_conf_invalid_cidr.ini | 1 + .../config/broken_conf_invalid_cidr6.ini | 1 + .../config/broken_conf_invalid_cidr6_no_slash.ini | 1 + .../config/broken_conf_invalid_cidr6_too_big.ini | 1 + .../config/broken_conf_invalid_cidr_value.ini | 1 + .../config/broken_conf_invalid_filename.ini | 1 + .../config/broken_conf_invalid_log_media.ini | 1 + .../config/broken_conf_invalid_type.ini | 1 + .../config/broken_conf_key_value.ini | 1 + .../config/broken_conf_line_empty_string.ini | 1 + .../config/broken_conf_line_no_closing.ini | 1 + .../config/broken_conf_local_var_1.ini | 1 + .../config/broken_conf_local_var_10.ini | 1 + .../config/broken_conf_local_var_11.ini | 1 + .../config/broken_conf_local_var_12.ini | 1 + .../config/broken_conf_local_var_13.ini | 1 + .../config/broken_conf_local_var_14.ini | 1 + .../config/broken_conf_local_var_15.ini | 1 + .../config/broken_conf_local_var_16.ini | 1 + .../config/broken_conf_local_var_2.ini | 1 + .../config/broken_conf_local_var_3.ini | 1 + .../config/broken_conf_local_var_4.ini | 1 + .../config/broken_conf_local_var_5.ini | 1 + .../config/broken_conf_local_var_6.ini | 1 + .../config/broken_conf_local_var_7.ini | 1 + .../config/broken_conf_local_var_8.ini | 1 + .../config/broken_conf_local_var_9.ini | 1 + .../config/broken_conf_lots_of_quotes.ini | 1 + .../config/broken_conf_missing_script.ini | 1 + .../config/broken_conf_mutually_exclusive.ini | 1 + .../config/broken_conf_mutually_exclusive10.ini | 1 + .../config/broken_conf_mutually_exclusive11.ini | 1 + .../config/broken_conf_mutually_exclusive12.ini | 1 + .../config/broken_conf_mutually_exclusive2.ini | 1 + .../config/broken_conf_mutually_exclusive3.ini | 1 + .../config/broken_conf_mutually_exclusive4.ini | 1 + .../config/broken_conf_mutually_exclusive5.ini | 1 + .../config/broken_conf_mutually_exclusive6.ini | 1 + .../config/broken_conf_mutually_exclusive7.ini | 1 + .../config/broken_conf_mutually_exclusive8.ini | 1 + .../config/broken_conf_mutually_exclusive9.ini | 1 + .../config/broken_conf_nonexisting_script.ini | 1 + .../config/broken_conf_quotes.ini | 3 +++ .../config/broken_conf_readonly_exec.ini | 1 + .../config/broken_conf_session_encryption.ini | 1 + ...f_session_encryption_without_encryption_key.ini | 2 ++ ...ken_conf_session_encryption_without_env_var.ini | 2 ++ .../config/broken_conf_to_few_args.ini | 1 + .../config/broken_conf_unserialize.ini | 1 + .../config/broken_conf_weird_keyword.ini | 1 + .../config/broken_conf_wrapper_whitelist.ini | 1 + .../config/broken_conf_wrong_quotes.ini | 1 + .../config/broken_conf_wrong_type.ini | 5 ++++ .../config/broken_config_regexp.ini | 1 + .../broken_config_regexp_no_closing_paren.ini | 1 + .../config/broken_regexp.ini | 1 + .../config/config_broken_conf_truncated.ini | 1 + .../config/config_encrypted_cookies_noname.ini | 3 +++ .../config_encrypted_regexp_cookies_bad_regexp.ini | 3 +++ .../config/config_unmatching_brackets.ini | 1 + .../config/disabled_functions_cidr.ini | 9 ++++++++ .../encrypt_regexp_cookies_bad_regexp.phpt | 22 ++++++++++++++++++ 148 files changed, 1233 insertions(+), 1 deletion(-) create mode 100644 src/tests/broken_configuration_php8/broken_conf.phpt create mode 100644 src/tests/broken_configuration_php8/broken_conf2.phpt create mode 100644 src/tests/broken_configuration_php8/broken_conf_allow_broken_disabled.phpt create mode 100644 src/tests/broken_configuration_php8/broken_conf_allow_broken_enabled.phpt create mode 100644 src/tests/broken_configuration_php8/broken_conf_config_regexp.phpt create mode 100644 src/tests/broken_configuration_php8/broken_conf_config_regexp_no_closing_paren.phpt create mode 100644 src/tests/broken_configuration_php8/broken_conf_cookie_encryption_without_encryption_key.phpt create mode 100644 src/tests/broken_configuration_php8/broken_conf_cookie_encryption_without_env_var.phpt create mode 100644 src/tests/broken_configuration_php8/broken_conf_cookie_name_and_regexp.phpt create mode 100644 src/tests/broken_configuration_php8/broken_conf_enable_disable.phpt create mode 100644 src/tests/broken_configuration_php8/broken_conf_eval.phpt create mode 100644 src/tests/broken_configuration_php8/broken_conf_expecting_bool.phpt create mode 100644 src/tests/broken_configuration_php8/broken_conf_invalid_cidr.phpt create mode 100644 src/tests/broken_configuration_php8/broken_conf_invalid_cidr6.phpt create mode 100644 src/tests/broken_configuration_php8/broken_conf_invalid_cidr6_no_slash.phpt create mode 100644 src/tests/broken_configuration_php8/broken_conf_invalid_cidr6_too_big.phpt create mode 100644 src/tests/broken_configuration_php8/broken_conf_invalid_cidr_value.phpt create mode 100644 src/tests/broken_configuration_php8/broken_conf_invalid_filename.phpt create mode 100644 src/tests/broken_configuration_php8/broken_conf_invalid_log_media.phpt create mode 100644 src/tests/broken_configuration_php8/broken_conf_invalid_type.phpt create mode 100644 src/tests/broken_configuration_php8/broken_conf_key_value.phpt create mode 100644 src/tests/broken_configuration_php8/broken_conf_line_empty_string.phpt create mode 100644 src/tests/broken_configuration_php8/broken_conf_line_no_closing.phpt create mode 100644 src/tests/broken_configuration_php8/broken_conf_local_var_1.phpt create mode 100644 src/tests/broken_configuration_php8/broken_conf_local_var_10.phpt create mode 100644 src/tests/broken_configuration_php8/broken_conf_local_var_11.phpt create mode 100644 src/tests/broken_configuration_php8/broken_conf_local_var_12.phpt create mode 100644 src/tests/broken_configuration_php8/broken_conf_local_var_13.phpt create mode 100644 src/tests/broken_configuration_php8/broken_conf_local_var_14.phpt create mode 100644 src/tests/broken_configuration_php8/broken_conf_local_var_15.phpt create mode 100644 src/tests/broken_configuration_php8/broken_conf_local_var_16.phpt create mode 100644 src/tests/broken_configuration_php8/broken_conf_local_var_2.phpt create mode 100644 src/tests/broken_configuration_php8/broken_conf_local_var_3.phpt create mode 100644 src/tests/broken_configuration_php8/broken_conf_local_var_4.phpt create mode 100644 src/tests/broken_configuration_php8/broken_conf_local_var_5.phpt create mode 100644 src/tests/broken_configuration_php8/broken_conf_local_var_6.phpt create mode 100644 src/tests/broken_configuration_php8/broken_conf_local_var_7.phpt create mode 100644 src/tests/broken_configuration_php8/broken_conf_local_var_8.phpt create mode 100644 src/tests/broken_configuration_php8/broken_conf_local_var_9.phpt create mode 100644 src/tests/broken_configuration_php8/broken_conf_lots_of_quotes.phpt create mode 100644 src/tests/broken_configuration_php8/broken_conf_missing_script.phpt create mode 100644 src/tests/broken_configuration_php8/broken_conf_mutually_exclusive.phpt create mode 100644 src/tests/broken_configuration_php8/broken_conf_mutually_exclusive10.phpt create mode 100644 src/tests/broken_configuration_php8/broken_conf_mutually_exclusive11.phpt create mode 100644 src/tests/broken_configuration_php8/broken_conf_mutually_exclusive12.phpt create mode 100644 src/tests/broken_configuration_php8/broken_conf_mutually_exclusive2.phpt create mode 100644 src/tests/broken_configuration_php8/broken_conf_mutually_exclusive3.phpt create mode 100644 src/tests/broken_configuration_php8/broken_conf_mutually_exclusive4.phpt create mode 100644 src/tests/broken_configuration_php8/broken_conf_mutually_exclusive5.phpt create mode 100644 src/tests/broken_configuration_php8/broken_conf_mutually_exclusive6.phpt create mode 100644 src/tests/broken_configuration_php8/broken_conf_mutually_exclusive7.phpt create mode 100644 src/tests/broken_configuration_php8/broken_conf_mutually_exclusive8.phpt create mode 100644 src/tests/broken_configuration_php8/broken_conf_mutually_exclusive9.phpt create mode 100644 src/tests/broken_configuration_php8/broken_conf_no_cookie_action.phpt create mode 100644 src/tests/broken_configuration_php8/broken_conf_no_cookie_name.phpt create mode 100644 src/tests/broken_configuration_php8/broken_conf_no_file_specified.phpt create mode 100644 src/tests/broken_configuration_php8/broken_conf_nonexisting_script.phpt create mode 100644 src/tests/broken_configuration_php8/broken_conf_quotes.phpt create mode 100644 src/tests/broken_configuration_php8/broken_conf_readonly_exec.phpt create mode 100644 src/tests/broken_configuration_php8/broken_conf_samesite.phpt create mode 100644 src/tests/broken_configuration_php8/broken_conf_session_encryption.phpt create mode 100644 src/tests/broken_configuration_php8/broken_conf_session_encryption_without_encryption_key.phpt create mode 100644 src/tests/broken_configuration_php8/broken_conf_session_encryption_without_env_var.phpt create mode 100644 src/tests/broken_configuration_php8/broken_conf_shown_in_phpinfo.phpt create mode 100644 src/tests/broken_configuration_php8/broken_conf_truncated.phpt create mode 100644 src/tests/broken_configuration_php8/broken_conf_unserialize.phpt create mode 100644 src/tests/broken_configuration_php8/broken_conf_upload_validation.phpt create mode 100644 src/tests/broken_configuration_php8/broken_conf_weird_keyword.phpt create mode 100644 src/tests/broken_configuration_php8/broken_conf_wrapper_whitelist.phpt create mode 100644 src/tests/broken_configuration_php8/broken_conf_wrong_quotes.phpt create mode 100644 src/tests/broken_configuration_php8/broken_conf_wrong_type.phpt create mode 100644 src/tests/broken_configuration_php8/broken_invalid_client_ip4.phpt create mode 100644 src/tests/broken_configuration_php8/broken_regexp.phpt create mode 100644 src/tests/broken_configuration_php8/broken_unmatching_brackets.phpt create mode 100644 src/tests/broken_configuration_php8/config/borken_conf_enable_disable.ini create mode 100644 src/tests/broken_configuration_php8/config/borken_conf_upload_validation.ini create mode 100644 src/tests/broken_configuration_php8/config/broken_conf.ini create mode 100644 src/tests/broken_configuration_php8/config/broken_conf2.ini create mode 100644 src/tests/broken_configuration_php8/config/broken_conf_cookie_action.ini create mode 100644 src/tests/broken_configuration_php8/config/broken_conf_cookie_encryption_without_encryption_key.ini create mode 100644 src/tests/broken_configuration_php8/config/broken_conf_cookie_encryption_without_env_var.ini create mode 100644 src/tests/broken_configuration_php8/config/broken_conf_cookie_name_and_regexp.ini create mode 100644 src/tests/broken_configuration_php8/config/broken_conf_cookie_samesite.ini create mode 100644 src/tests/broken_configuration_php8/config/broken_conf_eval.ini create mode 100644 src/tests/broken_configuration_php8/config/broken_conf_expecting_bool.ini create mode 100644 src/tests/broken_configuration_php8/config/broken_conf_invalid_cidr.ini create mode 100644 src/tests/broken_configuration_php8/config/broken_conf_invalid_cidr6.ini create mode 100644 src/tests/broken_configuration_php8/config/broken_conf_invalid_cidr6_no_slash.ini create mode 100644 src/tests/broken_configuration_php8/config/broken_conf_invalid_cidr6_too_big.ini create mode 100644 src/tests/broken_configuration_php8/config/broken_conf_invalid_cidr_value.ini create mode 100644 src/tests/broken_configuration_php8/config/broken_conf_invalid_filename.ini create mode 100644 src/tests/broken_configuration_php8/config/broken_conf_invalid_log_media.ini create mode 100644 src/tests/broken_configuration_php8/config/broken_conf_invalid_type.ini create mode 100644 src/tests/broken_configuration_php8/config/broken_conf_key_value.ini create mode 100644 src/tests/broken_configuration_php8/config/broken_conf_line_empty_string.ini create mode 100644 src/tests/broken_configuration_php8/config/broken_conf_line_no_closing.ini create mode 100644 src/tests/broken_configuration_php8/config/broken_conf_local_var_1.ini create mode 100644 src/tests/broken_configuration_php8/config/broken_conf_local_var_10.ini create mode 100644 src/tests/broken_configuration_php8/config/broken_conf_local_var_11.ini create mode 100644 src/tests/broken_configuration_php8/config/broken_conf_local_var_12.ini create mode 100644 src/tests/broken_configuration_php8/config/broken_conf_local_var_13.ini create mode 100644 src/tests/broken_configuration_php8/config/broken_conf_local_var_14.ini create mode 100644 src/tests/broken_configuration_php8/config/broken_conf_local_var_15.ini create mode 100644 src/tests/broken_configuration_php8/config/broken_conf_local_var_16.ini create mode 100644 src/tests/broken_configuration_php8/config/broken_conf_local_var_2.ini create mode 100644 src/tests/broken_configuration_php8/config/broken_conf_local_var_3.ini create mode 100644 src/tests/broken_configuration_php8/config/broken_conf_local_var_4.ini create mode 100644 src/tests/broken_configuration_php8/config/broken_conf_local_var_5.ini create mode 100644 src/tests/broken_configuration_php8/config/broken_conf_local_var_6.ini create mode 100644 src/tests/broken_configuration_php8/config/broken_conf_local_var_7.ini create mode 100644 src/tests/broken_configuration_php8/config/broken_conf_local_var_8.ini create mode 100644 src/tests/broken_configuration_php8/config/broken_conf_local_var_9.ini create mode 100644 src/tests/broken_configuration_php8/config/broken_conf_lots_of_quotes.ini create mode 100644 src/tests/broken_configuration_php8/config/broken_conf_missing_script.ini create mode 100644 src/tests/broken_configuration_php8/config/broken_conf_mutually_exclusive.ini create mode 100644 src/tests/broken_configuration_php8/config/broken_conf_mutually_exclusive10.ini create mode 100644 src/tests/broken_configuration_php8/config/broken_conf_mutually_exclusive11.ini create mode 100644 src/tests/broken_configuration_php8/config/broken_conf_mutually_exclusive12.ini create mode 100644 src/tests/broken_configuration_php8/config/broken_conf_mutually_exclusive2.ini create mode 100644 src/tests/broken_configuration_php8/config/broken_conf_mutually_exclusive3.ini create mode 100644 src/tests/broken_configuration_php8/config/broken_conf_mutually_exclusive4.ini create mode 100644 src/tests/broken_configuration_php8/config/broken_conf_mutually_exclusive5.ini create mode 100644 src/tests/broken_configuration_php8/config/broken_conf_mutually_exclusive6.ini create mode 100644 src/tests/broken_configuration_php8/config/broken_conf_mutually_exclusive7.ini create mode 100644 src/tests/broken_configuration_php8/config/broken_conf_mutually_exclusive8.ini create mode 100644 src/tests/broken_configuration_php8/config/broken_conf_mutually_exclusive9.ini create mode 100644 src/tests/broken_configuration_php8/config/broken_conf_nonexisting_script.ini create mode 100644 src/tests/broken_configuration_php8/config/broken_conf_quotes.ini create mode 100644 src/tests/broken_configuration_php8/config/broken_conf_readonly_exec.ini create mode 100644 src/tests/broken_configuration_php8/config/broken_conf_session_encryption.ini create mode 100644 src/tests/broken_configuration_php8/config/broken_conf_session_encryption_without_encryption_key.ini create mode 100644 src/tests/broken_configuration_php8/config/broken_conf_session_encryption_without_env_var.ini create mode 100644 src/tests/broken_configuration_php8/config/broken_conf_to_few_args.ini create mode 100644 src/tests/broken_configuration_php8/config/broken_conf_unserialize.ini create mode 100644 src/tests/broken_configuration_php8/config/broken_conf_weird_keyword.ini create mode 100644 src/tests/broken_configuration_php8/config/broken_conf_wrapper_whitelist.ini create mode 100644 src/tests/broken_configuration_php8/config/broken_conf_wrong_quotes.ini create mode 100644 src/tests/broken_configuration_php8/config/broken_conf_wrong_type.ini create mode 100644 src/tests/broken_configuration_php8/config/broken_config_regexp.ini create mode 100644 src/tests/broken_configuration_php8/config/broken_config_regexp_no_closing_paren.ini create mode 100644 src/tests/broken_configuration_php8/config/broken_regexp.ini create mode 100644 src/tests/broken_configuration_php8/config/config_broken_conf_truncated.ini create mode 100644 src/tests/broken_configuration_php8/config/config_encrypted_cookies_noname.ini create mode 100644 src/tests/broken_configuration_php8/config/config_encrypted_regexp_cookies_bad_regexp.ini create mode 100644 src/tests/broken_configuration_php8/config/config_unmatching_brackets.ini create mode 100644 src/tests/broken_configuration_php8/config/disabled_functions_cidr.ini create mode 100644 src/tests/broken_configuration_php8/encrypt_regexp_cookies_bad_regexp.phpt (limited to 'src') diff --git a/.travis.yml b/.travis.yml index b4c183e..a5a8737 100644 --- a/.travis.yml +++ b/.travis.yml @@ -44,8 +44,9 @@ script: - cd src/ - phpize - ./configure --enable-snuffleupagus --enable-coverage - - make -j 2 + - make -j `nproc` - sed -i "s/\$ext_params -d display_errors=0 -r/-d display_errors=0 -r/" run-tests.php + - if [ "${TARGET}" != "gcc php nightly novld" ] ; then rm -rf ./tests/*php8* ; fi - TEST_PHP_ARGS="-q" REPORT_EXIT_STATUS=1 make test after_success: diff --git a/src/tests/broken_configuration_php8/broken_conf.phpt b/src/tests/broken_configuration_php8/broken_conf.phpt new file mode 100644 index 0000000..7dde7d6 --- /dev/null +++ b/src/tests/broken_configuration_php8/broken_conf.phpt @@ -0,0 +1,14 @@ +--TEST-- +Broken configuration +--SKIPIF-- + + +--INI-- +sp.configuration_file={PWD}/config/broken_conf.ini +--FILE-- +--EXPECT-- + +Fatal error: [snuffleupagus][0.0.0.0][config][log] Invalid configuration prefix for 'this is a broken line' on line 1 in Unknown on line 0 + +Fatal error: [snuffleupagus][0.0.0.0][config][log] Invalid configuration file in Unknown on line 0 +Could not startup. diff --git a/src/tests/broken_configuration_php8/broken_conf2.phpt b/src/tests/broken_configuration_php8/broken_conf2.phpt new file mode 100644 index 0000000..bf337b4 --- /dev/null +++ b/src/tests/broken_configuration_php8/broken_conf2.phpt @@ -0,0 +1,14 @@ +--TEST-- +Broken configuration +--SKIPIF-- + + +--INI-- +sp.configuration_file={PWD}/config/broken_conf2.ini +--FILE-- +--EXPECT-- + +Fatal error: [snuffleupagus][0.0.0.0][config][log] Invalid configuration section 'sp.wrong' on line 1 in Unknown on line 0 + +Fatal error: [snuffleupagus][0.0.0.0][config][log] Invalid configuration file in Unknown on line 0 +Could not startup. diff --git a/src/tests/broken_configuration_php8/broken_conf_allow_broken_disabled.phpt b/src/tests/broken_configuration_php8/broken_conf_allow_broken_disabled.phpt new file mode 100644 index 0000000..9dd0c66 --- /dev/null +++ b/src/tests/broken_configuration_php8/broken_conf_allow_broken_disabled.phpt @@ -0,0 +1,18 @@ +--TEST-- +Broken configuration with allow broken turned off +--SKIPIF-- + + +--INI-- +sp.configuration_file={PWD}/config/broken_conf.ini +sp.allow_broken_configuration=Off +--FILE-- + +--EXPECT-- + +Fatal error: [snuffleupagus][0.0.0.0][config][log] Invalid configuration prefix for 'this is a broken line' on line 1 in Unknown on line 0 + +Fatal error: [snuffleupagus][0.0.0.0][config][log] Invalid configuration file in Unknown on line 0 +Could not startup. diff --git a/src/tests/broken_configuration_php8/broken_conf_allow_broken_enabled.phpt b/src/tests/broken_configuration_php8/broken_conf_allow_broken_enabled.phpt new file mode 100644 index 0000000..eccc8a8 --- /dev/null +++ b/src/tests/broken_configuration_php8/broken_conf_allow_broken_enabled.phpt @@ -0,0 +1,16 @@ +--TEST-- +Broken configuration with allow broken turned on +--SKIPIF-- + + +--INI-- +sp.configuration_file={PWD}/config/broken_conf.ini +sp.allow_broken_configuration=On +--FILE-- + +--EXPECT-- + +Fatal error: [snuffleupagus][0.0.0.0][config][log] Invalid configuration prefix for 'this is a broken line' on line 1 in Unknown on line 0 +1337 diff --git a/src/tests/broken_configuration_php8/broken_conf_config_regexp.phpt b/src/tests/broken_configuration_php8/broken_conf_config_regexp.phpt new file mode 100644 index 0000000..76ef208 --- /dev/null +++ b/src/tests/broken_configuration_php8/broken_conf_config_regexp.phpt @@ -0,0 +1,16 @@ +--TEST-- +Broken configuration +--SKIPIF-- + + +--INI-- +sp.configuration_file={PWD}/config/broken_config_regexp.ini +--FILE-- +--EXPECTF-- + +Fatal error: [snuffleupagus][0.0.0.0][config][log] Failed to compile '*.': %s on line 1. in Unknown on line 0 + +Fatal error: [snuffleupagus][0.0.0.0][config][log] '.filename_r()' is expecting a valid regexp, and not '"*."' on line 1 in Unknown on line 0 + +Fatal error: [snuffleupagus][0.0.0.0][config][log] Invalid configuration file in Unknown on line 0 +Could not startup. diff --git a/src/tests/broken_configuration_php8/broken_conf_config_regexp_no_closing_paren.phpt b/src/tests/broken_configuration_php8/broken_conf_config_regexp_no_closing_paren.phpt new file mode 100644 index 0000000..5bdca06 --- /dev/null +++ b/src/tests/broken_configuration_php8/broken_conf_config_regexp_no_closing_paren.phpt @@ -0,0 +1,16 @@ +--TEST-- +Broken configuration - regexp without a closing parenthesis +--SKIPIF-- + + +--INI-- +sp.configuration_file={PWD}/config/broken_config_regexp_no_closing_paren.ini +--FILE-- +--EXPECT-- + +Fatal error: [snuffleupagus][0.0.0.0][error][log] There is an issue with the parsing of '"*."': it doesn't look like a valid string on line 1 in Unknown on line 0 + +Fatal error: [snuffleupagus][0.0.0.0][config][log] '.filename_r()' is expecting a valid regexp, and not '"*."' on line 1 in Unknown on line 0 + +Fatal error: [snuffleupagus][0.0.0.0][config][log] Invalid configuration file in Unknown on line 0 +Could not startup. diff --git a/src/tests/broken_configuration_php8/broken_conf_cookie_encryption_without_encryption_key.phpt b/src/tests/broken_configuration_php8/broken_conf_cookie_encryption_without_encryption_key.phpt new file mode 100644 index 0000000..0447320 --- /dev/null +++ b/src/tests/broken_configuration_php8/broken_conf_cookie_encryption_without_encryption_key.phpt @@ -0,0 +1,14 @@ +--TEST-- +Broken configuration - encrypted cookie without encryption key +--SKIPIF-- + + +--INI-- +sp.configuration_file={PWD}/config/broken_conf_cookie_encryption_without_encryption_key.ini +--FILE-- +--EXPECT-- + +Fatal error: [snuffleupagus][0.0.0.0][config][log] You're trying to use the cookie encryption featureon line 2 without having set the `.encryption_key` option in`sp.global`: please set it first in Unknown on line 0 + +Fatal error: [snuffleupagus][0.0.0.0][config][log] Invalid configuration file in Unknown on line 0 +Could not startup. diff --git a/src/tests/broken_configuration_php8/broken_conf_cookie_encryption_without_env_var.phpt b/src/tests/broken_configuration_php8/broken_conf_cookie_encryption_without_env_var.phpt new file mode 100644 index 0000000..204430d --- /dev/null +++ b/src/tests/broken_configuration_php8/broken_conf_cookie_encryption_without_env_var.phpt @@ -0,0 +1,14 @@ +--TEST-- +Broken configuration - encrypted cookie with without cookie env var +--SKIPIF-- + + +--INI-- +sp.configuration_file={PWD}/config/broken_conf_cookie_encryption_without_env_var.ini +--FILE-- +--EXPECT-- + +Fatal error: [snuffleupagus][0.0.0.0][config][log] You're trying to use the cookie encryption featureon line 2 without having set the `.cookie_env_var` option in`sp.global`: please set it first in Unknown on line 0 + +Fatal error: [snuffleupagus][0.0.0.0][config][log] Invalid configuration file in Unknown on line 0 +Could not startup. diff --git a/src/tests/broken_configuration_php8/broken_conf_cookie_name_and_regexp.phpt b/src/tests/broken_configuration_php8/broken_conf_cookie_name_and_regexp.phpt new file mode 100644 index 0000000..8648b4f --- /dev/null +++ b/src/tests/broken_configuration_php8/broken_conf_cookie_name_and_regexp.phpt @@ -0,0 +1,14 @@ +--TEST-- +Broken configuration - encrypted cookie with name and regexp +--SKIPIF-- + + +--INI-- +sp.configuration_file={PWD}/config/broken_conf_cookie_name_and_regexp.ini +--FILE-- +--EXPECT-- + +Fatal error: [snuffleupagus][0.0.0.0][config][log] name and name_r are mutually exclusive on line 2 in Unknown on line 0 + +Fatal error: [snuffleupagus][0.0.0.0][config][log] Invalid configuration file in Unknown on line 0 +Could not startup. diff --git a/src/tests/broken_configuration_php8/broken_conf_enable_disable.phpt b/src/tests/broken_configuration_php8/broken_conf_enable_disable.phpt new file mode 100644 index 0000000..54e4d32 --- /dev/null +++ b/src/tests/broken_configuration_php8/broken_conf_enable_disable.phpt @@ -0,0 +1,14 @@ +--TEST-- +Global strict mode +--SKIPIF-- + + +--INI-- +sp.configuration_file={PWD}/config/borken_conf_enable_disable.ini +--FILE-- +--EXPECTF-- + +Fatal error: [snuffleupagus][0.0.0.0][config][log] A rule can't be enabled and disabled on line 1 in Unknown on line 0 + +Fatal error: [snuffleupagus][0.0.0.0][config][log] Invalid configuration file in Unknown on line 0 +Could not startup. diff --git a/src/tests/broken_configuration_php8/broken_conf_eval.phpt b/src/tests/broken_configuration_php8/broken_conf_eval.phpt new file mode 100644 index 0000000..1a6ad4d --- /dev/null +++ b/src/tests/broken_configuration_php8/broken_conf_eval.phpt @@ -0,0 +1,14 @@ +--TEST-- +Broken configuration for eval +--SKIPIF-- + + +--INI-- +sp.configuration_file={PWD}/config/broken_conf_eval.ini +--FILE-- +--EXPECT-- + +Fatal error: [snuffleupagus][0.0.0.0][error][log] There is an issue with the parsing of '"cos,sin': it doesn't look like a valid string on line 1 in Unknown on line 0 + +Fatal error: [snuffleupagus][0.0.0.0][config][log] Invalid configuration file in Unknown on line 0 +Could not startup. diff --git a/src/tests/broken_configuration_php8/broken_conf_expecting_bool.phpt b/src/tests/broken_configuration_php8/broken_conf_expecting_bool.phpt new file mode 100644 index 0000000..682a4f5 --- /dev/null +++ b/src/tests/broken_configuration_php8/broken_conf_expecting_bool.phpt @@ -0,0 +1,14 @@ +--TEST-- +Bad boolean value in configuration +--SKIPIF-- + + +--INI-- +sp.configuration_file={PWD}/config/broken_conf_expecting_bool.ini +--FILE-- +--EXPECT-- + +Fatal error: [snuffleupagus][0.0.0.0][config][log] Trailing chars '337);' at the end of '.enable(1337);' on line 5 in Unknown on line 0 + +Fatal error: [snuffleupagus][0.0.0.0][config][log] Invalid configuration file in Unknown on line 0 +Could not startup. diff --git a/src/tests/broken_configuration_php8/broken_conf_invalid_cidr.phpt b/src/tests/broken_configuration_php8/broken_conf_invalid_cidr.phpt new file mode 100644 index 0000000..f66d8b6 --- /dev/null +++ b/src/tests/broken_configuration_php8/broken_conf_invalid_cidr.phpt @@ -0,0 +1,14 @@ +--TEST-- +Broken configuration +--SKIPIF-- + + +--INI-- +sp.configuration_file={PWD}/config/broken_conf_invalid_cidr.ini +--FILE-- +--EXPECT-- + +Fatal error: [snuffleupagus][0.0.0.0][config][log] '42' isn't a valid ipv4 mask. in Unknown on line 0 + +Fatal error: [snuffleupagus][0.0.0.0][config][log] Invalid configuration file in Unknown on line 0 +Could not startup. diff --git a/src/tests/broken_configuration_php8/broken_conf_invalid_cidr6.phpt b/src/tests/broken_configuration_php8/broken_conf_invalid_cidr6.phpt new file mode 100644 index 0000000..91bd4a2 --- /dev/null +++ b/src/tests/broken_configuration_php8/broken_conf_invalid_cidr6.phpt @@ -0,0 +1,14 @@ +--TEST-- +Broken configuration +--SKIPIF-- + + +--INI-- +sp.configuration_file={PWD}/config/broken_conf_invalid_cidr6.ini +--FILE-- +--EXPECT-- + +Fatal error: [snuffleupagus][0.0.0.0][config][log] 'ZZZ' isn't a valid network mask. in Unknown on line 0 + +Fatal error: [snuffleupagus][0.0.0.0][config][log] Invalid configuration file in Unknown on line 0 +Could not startup. diff --git a/src/tests/broken_configuration_php8/broken_conf_invalid_cidr6_no_slash.phpt b/src/tests/broken_configuration_php8/broken_conf_invalid_cidr6_no_slash.phpt new file mode 100644 index 0000000..c6c8231 --- /dev/null +++ b/src/tests/broken_configuration_php8/broken_conf_invalid_cidr6_no_slash.phpt @@ -0,0 +1,14 @@ +--TEST-- +Broken configuration, invalid cidr for ipv6 because there is no `/` in it +--SKIPIF-- + + +--INI-- +sp.configuration_file={PWD}/config/broken_conf_invalid_cidr6_no_slash.ini +--FILE-- +--EXPECT-- + +Fatal error: [snuffleupagus][0.0.0.0][config][log] '2001:0db8:0000:0000:0000:ff00:0042:8329' isn't a valid network mask, it seems that you forgot a '/'. in Unknown on line 0 + +Fatal error: [snuffleupagus][0.0.0.0][config][log] Invalid configuration file in Unknown on line 0 +Could not startup. diff --git a/src/tests/broken_configuration_php8/broken_conf_invalid_cidr6_too_big.phpt b/src/tests/broken_configuration_php8/broken_conf_invalid_cidr6_too_big.phpt new file mode 100644 index 0000000..47d4a5d --- /dev/null +++ b/src/tests/broken_configuration_php8/broken_conf_invalid_cidr6_too_big.phpt @@ -0,0 +1,9 @@ +--TEST-- +Broken configuration, cidr for ipv6 is too big, that will `mod` to 25. +(13337%128 = 25) +--SKIPIF-- + +--INI-- +sp.configuration_file={PWD}/config/broken_conf_invalid_cidr6_too_big.ini +--FILE-- +--EXPECT-- diff --git a/src/tests/broken_configuration_php8/broken_conf_invalid_cidr_value.phpt b/src/tests/broken_configuration_php8/broken_conf_invalid_cidr_value.phpt new file mode 100644 index 0000000..dbe5414 --- /dev/null +++ b/src/tests/broken_configuration_php8/broken_conf_invalid_cidr_value.phpt @@ -0,0 +1,17 @@ +--TEST-- +Broken configuration, invalid cidr value +(13337%128 = 25) +--SKIPIF-- + + +--INI-- +sp.configuration_file={PWD}/config/broken_conf_invalid_cidr_value.ini +--FILE-- +--EXPECT-- + +Fatal error: [snuffleupagus][0.0.0.0][error][log] A valid string as parameter is expected on line 1 in Unknown on line 0 + +Fatal error: [snuffleupagus][0.0.0.0][config][log] " doesn't contain a valid cidr on line 1 in Unknown on line 0 + +Fatal error: [snuffleupagus][0.0.0.0][config][log] Invalid configuration file in Unknown on line 0 +Could not startup. diff --git a/src/tests/broken_configuration_php8/broken_conf_invalid_filename.phpt b/src/tests/broken_configuration_php8/broken_conf_invalid_filename.phpt new file mode 100644 index 0000000..cb78f85 --- /dev/null +++ b/src/tests/broken_configuration_php8/broken_conf_invalid_filename.phpt @@ -0,0 +1,14 @@ +--TEST-- +Broken configuration filename without absolute path +--SKIPIF-- + + +--INI-- +sp.configuration_file={PWD}/config/broken_conf_invalid_filename.ini +--FILE-- +--EXPECTF-- + +Fatal error: [snuffleupagus][0.0.0.0][config][log] Invalid configuration line: 'sp.disabled_functions.function("sprintf").filename("wrong file name").drop();':'.filename' must be an absolute path or a phar archive on line 1 in Unknown on line 0 + +Fatal error: [snuffleupagus][0.0.0.0][config][log] Invalid configuration file in Unknown on line 0 +Could not startup. diff --git a/src/tests/broken_configuration_php8/broken_conf_invalid_log_media.phpt b/src/tests/broken_configuration_php8/broken_conf_invalid_log_media.phpt new file mode 100644 index 0000000..68581b6 --- /dev/null +++ b/src/tests/broken_configuration_php8/broken_conf_invalid_log_media.phpt @@ -0,0 +1,14 @@ +--TEST-- +Broken configuration filename with improper log media +--SKIPIF-- + + +--INI-- +sp.configuration_file={PWD}/config/broken_conf_invalid_log_media.ini +--FILE-- +--EXPECTF-- + +Fatal error: [snuffleupagus][0.0.0.0][config][log] .log_media() only supports 'syslog' or 'php', on line 1 in Unknown on line 0 + +Fatal error: [snuffleupagus][0.0.0.0][config][log] Invalid configuration file in Unknown on line 0 +Could not startup. diff --git a/src/tests/broken_configuration_php8/broken_conf_invalid_type.phpt b/src/tests/broken_configuration_php8/broken_conf_invalid_type.phpt new file mode 100644 index 0000000..188d610 --- /dev/null +++ b/src/tests/broken_configuration_php8/broken_conf_invalid_type.phpt @@ -0,0 +1,14 @@ +--TEST-- +Broken conf with wrong type +--SKIPIF-- + + +--INI-- +sp.configuration_file={PWD}/config/broken_conf_invalid_type.ini +--FILE-- +--EXPECTF-- + +Fatal error: [snuffleupagus][0.0.0.0][error][log] There is an issue with the parsing of '"totally_wrong"_type")': it doesn't look like a valid string on line 1 in Unknown on line 0 + +Fatal error: [snuffleupagus][0.0.0.0][config][log] Invalid configuration file in Unknown on line 0 +Could not startup. diff --git a/src/tests/broken_configuration_php8/broken_conf_key_value.phpt b/src/tests/broken_configuration_php8/broken_conf_key_value.phpt new file mode 100644 index 0000000..1b51bd7 --- /dev/null +++ b/src/tests/broken_configuration_php8/broken_conf_key_value.phpt @@ -0,0 +1,14 @@ +--TEST-- +Broken configuration +--SKIPIF-- + + +--INI-- +sp.configuration_file={PWD}/config/broken_conf_key_value.ini +--FILE-- +--EXPECT-- + +Fatal error: [snuffleupagus][0.0.0.0][config][log] Invalid configuration line: 'sp.disabled_functions.function("system").var("").value("").key("").drop();':`key` and `value` are mutually exclusive on line 1 in Unknown on line 0 + +Fatal error: [snuffleupagus][0.0.0.0][config][log] Invalid configuration file in Unknown on line 0 +Could not startup. diff --git a/src/tests/broken_configuration_php8/broken_conf_line_empty_string.phpt b/src/tests/broken_configuration_php8/broken_conf_line_empty_string.phpt new file mode 100644 index 0000000..2d370ac --- /dev/null +++ b/src/tests/broken_configuration_php8/broken_conf_line_empty_string.phpt @@ -0,0 +1,14 @@ +--TEST-- +Configuration line with an empty string +--SKIPIF-- + + +--INI-- +sp.configuration_file={PWD}/config/broken_conf_line_empty_string.ini +--FILE-- +--EXPECT-- + +Fatal error: [snuffleupagus][0.0.0.0][error][log] A valid string as parameter is expected on line 1 in Unknown on line 0 + +Fatal error: [snuffleupagus][0.0.0.0][config][log] Invalid configuration file in Unknown on line 0 +Could not startup. diff --git a/src/tests/broken_configuration_php8/broken_conf_line_no_closing.phpt b/src/tests/broken_configuration_php8/broken_conf_line_no_closing.phpt new file mode 100644 index 0000000..d3c826f --- /dev/null +++ b/src/tests/broken_configuration_php8/broken_conf_line_no_closing.phpt @@ -0,0 +1,14 @@ +--TEST-- +Configuration line without closing parenthese +--SKIPIF-- + + +--INI-- +sp.configuration_file={PWD}/config/broken_conf_line_no_closing.ini +--FILE-- +--EXPECT-- + +Fatal error: [snuffleupagus][0.0.0.0][error][log] There is an issue with the parsing of '"123"': it doesn't look like a valid string on line 1 in Unknown on line 0 + +Fatal error: [snuffleupagus][0.0.0.0][config][log] Invalid configuration file in Unknown on line 0 +Could not startup. diff --git a/src/tests/broken_configuration_php8/broken_conf_local_var_1.phpt b/src/tests/broken_configuration_php8/broken_conf_local_var_1.phpt new file mode 100644 index 0000000..52cd962 --- /dev/null +++ b/src/tests/broken_configuration_php8/broken_conf_local_var_1.phpt @@ -0,0 +1,16 @@ +--TEST-- +Broken configuration +--SKIPIF-- + + +--INI-- +sp.configuration_file={PWD}/config/broken_conf_local_var_1.ini +--FILE-- +--EXPECT-- + +Fatal error: [snuffleupagus][0.0.0.0][config][log] Invalid `]` position. in Unknown on line 0 + +Fatal error: [snuffleupagus][0.0.0.0][config][log] Invalid value ']' for `var` on line 1 in Unknown on line 0 + +Fatal error: [snuffleupagus][0.0.0.0][config][log] Invalid configuration file in Unknown on line 0 +Could not startup. diff --git a/src/tests/broken_configuration_php8/broken_conf_local_var_10.phpt b/src/tests/broken_configuration_php8/broken_conf_local_var_10.phpt new file mode 100644 index 0000000..7817a19 --- /dev/null +++ b/src/tests/broken_configuration_php8/broken_conf_local_var_10.phpt @@ -0,0 +1,16 @@ +--TEST-- +Broken configuration +--SKIPIF-- + + +--INI-- +sp.configuration_file={PWD}/config/broken_conf_local_var_10.ini +--FILE-- +--EXPECT-- + +Fatal error: [snuffleupagus][0.0.0.0][config][log] Invalid `]` position. in Unknown on line 0 + +Fatal error: [snuffleupagus][0.0.0.0][config][log] Invalid value 'asd[asd]asd' for `var` on line 1 in Unknown on line 0 + +Fatal error: [snuffleupagus][0.0.0.0][config][log] Invalid configuration file in Unknown on line 0 +Could not startup. diff --git a/src/tests/broken_configuration_php8/broken_conf_local_var_11.phpt b/src/tests/broken_configuration_php8/broken_conf_local_var_11.phpt new file mode 100644 index 0000000..06099a5 --- /dev/null +++ b/src/tests/broken_configuration_php8/broken_conf_local_var_11.phpt @@ -0,0 +1,16 @@ +--TEST-- +Broken configuration +--SKIPIF-- + + +--INI-- +sp.configuration_file={PWD}/config/broken_conf_local_var_11.ini +--FILE-- +--EXPECT-- + +Fatal error: [snuffleupagus][0.0.0.0][config][log] Invalid `::` position. in Unknown on line 0 + +Fatal error: [snuffleupagus][0.0.0.0][config][log] Invalid value 'asd::' for `param` on line 1 in Unknown on line 0 + +Fatal error: [snuffleupagus][0.0.0.0][config][log] Invalid configuration file in Unknown on line 0 +Could not startup. diff --git a/src/tests/broken_configuration_php8/broken_conf_local_var_12.phpt b/src/tests/broken_configuration_php8/broken_conf_local_var_12.phpt new file mode 100644 index 0000000..df753df --- /dev/null +++ b/src/tests/broken_configuration_php8/broken_conf_local_var_12.phpt @@ -0,0 +1,14 @@ +--TEST-- +Broken configuration +--SKIPIF-- + + +--INI-- +sp.configuration_file={PWD}/config/broken_conf_local_var_12.ini +--FILE-- +--EXPECT-- + +Fatal error: [snuffleupagus][0.0.0.0][config][log] Empty value in `var` on line 1 in Unknown on line 0 + +Fatal error: [snuffleupagus][0.0.0.0][config][log] Invalid configuration file in Unknown on line 0 +Could not startup. diff --git a/src/tests/broken_configuration_php8/broken_conf_local_var_13.phpt b/src/tests/broken_configuration_php8/broken_conf_local_var_13.phpt new file mode 100644 index 0000000..80bc068 --- /dev/null +++ b/src/tests/broken_configuration_php8/broken_conf_local_var_13.phpt @@ -0,0 +1,16 @@ +--TEST-- +Broken configuration +--SKIPIF-- + + +--INI-- +sp.configuration_file={PWD}/config/broken_conf_local_var_13.ini +--FILE-- +--EXPECT-- + +Fatal error: [snuffleupagus][0.0.0.0][config][log] Invalid `->` position. in Unknown on line 0 + +Fatal error: [snuffleupagus][0.0.0.0][config][log] Invalid value 'asd->asd' for `var` on line 1 in Unknown on line 0 + +Fatal error: [snuffleupagus][0.0.0.0][config][log] Invalid configuration file in Unknown on line 0 +Could not startup. diff --git a/src/tests/broken_configuration_php8/broken_conf_local_var_14.phpt b/src/tests/broken_configuration_php8/broken_conf_local_var_14.phpt new file mode 100644 index 0000000..749c317 --- /dev/null +++ b/src/tests/broken_configuration_php8/broken_conf_local_var_14.phpt @@ -0,0 +1,16 @@ +--TEST-- +Broken configuration +--SKIPIF-- + + +--INI-- +sp.configuration_file={PWD}/config/broken_conf_local_var_14.ini +--FILE-- +--EXPECT-- + +Fatal error: [snuffleupagus][0.0.0.0][config][log] Invalid var name: $i+valid var name . in Unknown on line 0 + +Fatal error: [snuffleupagus][0.0.0.0][config][log] Invalid value '$i+valid var name ' for `var` on line 1 in Unknown on line 0 + +Fatal error: [snuffleupagus][0.0.0.0][config][log] Invalid configuration file in Unknown on line 0 +Could not startup. diff --git a/src/tests/broken_configuration_php8/broken_conf_local_var_15.phpt b/src/tests/broken_configuration_php8/broken_conf_local_var_15.phpt new file mode 100644 index 0000000..97eab54 --- /dev/null +++ b/src/tests/broken_configuration_php8/broken_conf_local_var_15.phpt @@ -0,0 +1,16 @@ +--TEST-- +Broken configuration +--SKIPIF-- + + +--INI-- +sp.configuration_file={PWD}/config/broken_conf_local_var_15.ini +--FILE-- +--EXPECT-- + +Fatal error: [snuffleupagus][0.0.0.0][config][log] Invalid var name: $i$$!@#. in Unknown on line 0 + +Fatal error: [snuffleupagus][0.0.0.0][config][log] Invalid value '$i$$!@#->qwe' for `var` on line 1 in Unknown on line 0 + +Fatal error: [snuffleupagus][0.0.0.0][config][log] Invalid configuration file in Unknown on line 0 +Could not startup. diff --git a/src/tests/broken_configuration_php8/broken_conf_local_var_16.phpt b/src/tests/broken_configuration_php8/broken_conf_local_var_16.phpt new file mode 100644 index 0000000..c643144 --- /dev/null +++ b/src/tests/broken_configuration_php8/broken_conf_local_var_16.phpt @@ -0,0 +1,16 @@ +--TEST-- +Broken configuration +--SKIPIF-- + + +--INI-- +sp.configuration_file={PWD}/config/broken_conf_local_var_16.ini +--FILE-- +--EXPECT-- + +Fatal error: [snuffleupagus][0.0.0.0][config][log] Missing a closing quote. in Unknown on line 0 + +Fatal error: [snuffleupagus][0.0.0.0][config][log] Invalid value '"' for `var` on line 1 in Unknown on line 0 + +Fatal error: [snuffleupagus][0.0.0.0][config][log] Invalid configuration file in Unknown on line 0 +Could not startup. diff --git a/src/tests/broken_configuration_php8/broken_conf_local_var_2.phpt b/src/tests/broken_configuration_php8/broken_conf_local_var_2.phpt new file mode 100644 index 0000000..8b769af --- /dev/null +++ b/src/tests/broken_configuration_php8/broken_conf_local_var_2.phpt @@ -0,0 +1,16 @@ +--TEST-- +Broken configuration +--SKIPIF-- + + +--INI-- +sp.configuration_file={PWD}/config/broken_conf_local_var_2.ini +--FILE-- +--EXPECT-- + +Fatal error: [snuffleupagus][0.0.0.0][config][log] Invalid `"` position. in Unknown on line 0 + +Fatal error: [snuffleupagus][0.0.0.0][config][log] Invalid value '""asd' for `var` on line 1 in Unknown on line 0 + +Fatal error: [snuffleupagus][0.0.0.0][config][log] Invalid configuration file in Unknown on line 0 +Could not startup. diff --git a/src/tests/broken_configuration_php8/broken_conf_local_var_3.phpt b/src/tests/broken_configuration_php8/broken_conf_local_var_3.phpt new file mode 100644 index 0000000..850a977 --- /dev/null +++ b/src/tests/broken_configuration_php8/broken_conf_local_var_3.phpt @@ -0,0 +1,16 @@ +--TEST-- +Broken configuration +--SKIPIF-- + + +--INI-- +sp.configuration_file={PWD}/config/broken_conf_local_var_3.ini +--FILE-- +--EXPECT-- + +Fatal error: [snuffleupagus][0.0.0.0][config][log] Invalid `->` position. in Unknown on line 0 + +Fatal error: [snuffleupagus][0.0.0.0][config][log] Invalid value '$qwe->::' for `var` on line 1 in Unknown on line 0 + +Fatal error: [snuffleupagus][0.0.0.0][config][log] Invalid configuration file in Unknown on line 0 +Could not startup. diff --git a/src/tests/broken_configuration_php8/broken_conf_local_var_4.phpt b/src/tests/broken_configuration_php8/broken_conf_local_var_4.phpt new file mode 100644 index 0000000..5146590 --- /dev/null +++ b/src/tests/broken_configuration_php8/broken_conf_local_var_4.phpt @@ -0,0 +1,16 @@ +--TEST-- +Broken configuration +--SKIPIF-- + + +--INI-- +sp.configuration_file={PWD}/config/broken_conf_local_var_4.ini +--FILE-- +--EXPECT-- + +Fatal error: [snuffleupagus][0.0.0.0][config][log] Invalid `"` position. in Unknown on line 0 + +Fatal error: [snuffleupagus][0.0.0.0][config][log] Invalid value '"asd"asd[]' for `var` on line 1 in Unknown on line 0 + +Fatal error: [snuffleupagus][0.0.0.0][config][log] Invalid configuration file in Unknown on line 0 +Could not startup. diff --git a/src/tests/broken_configuration_php8/broken_conf_local_var_5.phpt b/src/tests/broken_configuration_php8/broken_conf_local_var_5.phpt new file mode 100644 index 0000000..a7f8183 --- /dev/null +++ b/src/tests/broken_configuration_php8/broken_conf_local_var_5.phpt @@ -0,0 +1,16 @@ +--TEST-- +Broken configuration +--SKIPIF-- + + +--INI-- +sp.configuration_file={PWD}/config/broken_conf_local_var_5.ini +--FILE-- +--EXPECT-- + +Fatal error: [snuffleupagus][0.0.0.0][config][log] Invalid `'` position. in Unknown on line 0 + +Fatal error: [snuffleupagus][0.0.0.0][config][log] Invalid value ''asd'asd[]' for `var` on line 1 in Unknown on line 0 + +Fatal error: [snuffleupagus][0.0.0.0][config][log] Invalid configuration file in Unknown on line 0 +Could not startup. diff --git a/src/tests/broken_configuration_php8/broken_conf_local_var_6.phpt b/src/tests/broken_configuration_php8/broken_conf_local_var_6.phpt new file mode 100644 index 0000000..283cb41 --- /dev/null +++ b/src/tests/broken_configuration_php8/broken_conf_local_var_6.phpt @@ -0,0 +1,16 @@ +--TEST-- +Broken configuration +--SKIPIF-- + + +--INI-- +sp.configuration_file={PWD}/config/broken_conf_local_var_6.ini +--FILE-- +--EXPECT-- + +Fatal error: [snuffleupagus][0.0.0.0][config][log] Invalid `'` position. in Unknown on line 0 + +Fatal error: [snuffleupagus][0.0.0.0][config][log] Invalid value '''asd' for `var` on line 1 in Unknown on line 0 + +Fatal error: [snuffleupagus][0.0.0.0][config][log] Invalid configuration file in Unknown on line 0 +Could not startup. diff --git a/src/tests/broken_configuration_php8/broken_conf_local_var_7.phpt b/src/tests/broken_configuration_php8/broken_conf_local_var_7.phpt new file mode 100644 index 0000000..223e599 --- /dev/null +++ b/src/tests/broken_configuration_php8/broken_conf_local_var_7.phpt @@ -0,0 +1,16 @@ +--TEST-- +Broken configuration +--SKIPIF-- + + +--INI-- +sp.configuration_file={PWD}/config/broken_conf_local_var_7.ini +--FILE-- +--EXPECT-- + +Fatal error: [snuffleupagus][0.0.0.0][config][log] Invalid `->` position. in Unknown on line 0 + +Fatal error: [snuffleupagus][0.0.0.0][config][log] Invalid value 'asd-->' for `var` on line 1 in Unknown on line 0 + +Fatal error: [snuffleupagus][0.0.0.0][config][log] Invalid configuration file in Unknown on line 0 +Could not startup. diff --git a/src/tests/broken_configuration_php8/broken_conf_local_var_8.phpt b/src/tests/broken_configuration_php8/broken_conf_local_var_8.phpt new file mode 100644 index 0000000..058b5dd --- /dev/null +++ b/src/tests/broken_configuration_php8/broken_conf_local_var_8.phpt @@ -0,0 +1,16 @@ +--TEST-- +Broken configuration +--SKIPIF-- + + +--INI-- +sp.configuration_file={PWD}/config/broken_conf_local_var_8.ini +--FILE-- +--EXPECT-- + +Fatal error: [snuffleupagus][0.0.0.0][config][log] Invalid `]` position. in Unknown on line 0 + +Fatal error: [snuffleupagus][0.0.0.0][config][log] Invalid value 'asd[asd]"asd"' for `var` on line 1 in Unknown on line 0 + +Fatal error: [snuffleupagus][0.0.0.0][config][log] Invalid configuration file in Unknown on line 0 +Could not startup. diff --git a/src/tests/broken_configuration_php8/broken_conf_local_var_9.phpt b/src/tests/broken_configuration_php8/broken_conf_local_var_9.phpt new file mode 100644 index 0000000..c1eeae6 --- /dev/null +++ b/src/tests/broken_configuration_php8/broken_conf_local_var_9.phpt @@ -0,0 +1,16 @@ +--TEST-- +Broken configuration +--SKIPIF-- + + +--INI-- +sp.configuration_file={PWD}/config/broken_conf_local_var_9.ini +--FILE-- +--EXPECT-- + +Fatal error: [snuffleupagus][0.0.0.0][config][log] Invalid `]` position. in Unknown on line 0 + +Fatal error: [snuffleupagus][0.0.0.0][config][log] Invalid value 'asd[asd]'asd'' for `var` on line 1 in Unknown on line 0 + +Fatal error: [snuffleupagus][0.0.0.0][config][log] Invalid configuration file in Unknown on line 0 +Could not startup. diff --git a/src/tests/broken_configuration_php8/broken_conf_lots_of_quotes.phpt b/src/tests/broken_configuration_php8/broken_conf_lots_of_quotes.phpt new file mode 100644 index 0000000..e599e62 --- /dev/null +++ b/src/tests/broken_configuration_php8/broken_conf_lots_of_quotes.phpt @@ -0,0 +1,14 @@ +--TEST-- +Configuration line with too many quotes +--SKIPIF-- + + +--INI-- +sp.configuration_file={PWD}/config/broken_conf_lots_of_quotes.ini +--FILE-- +--EXPECT-- + +Fatal error: [snuffleupagus][0.0.0.0][error][log] There is an issue with the parsing of '"this\"is a weird\"\"\"cookie\"name"");': it doesn't look like a valid string on line 1 in Unknown on line 0 + +Fatal error: [snuffleupagus][0.0.0.0][config][log] Invalid configuration file in Unknown on line 0 +Could not startup. diff --git a/src/tests/broken_configuration_php8/broken_conf_missing_script.phpt b/src/tests/broken_configuration_php8/broken_conf_missing_script.phpt new file mode 100644 index 0000000..2ddb70f --- /dev/null +++ b/src/tests/broken_configuration_php8/broken_conf_missing_script.phpt @@ -0,0 +1,17 @@ +--TEST-- +Invalid configuration file for upload +--SKIPIF-- + +--INI-- +file_uploads=1 +sp.configuration_file={PWD}/config/broken_conf_missing_script.ini +--FILE-- + +--EXPECTF-- + +Fatal error: [snuffleupagus][0.0.0.0][config][log] The `script` directive is mandatory in '.enable();' on line 1 in Unknown on line 0 + +Fatal error: [snuffleupagus][0.0.0.0][config][log] Invalid configuration file in Unknown on line 0 +Could not startup. diff --git a/src/tests/broken_configuration_php8/broken_conf_mutually_exclusive.phpt b/src/tests/broken_configuration_php8/broken_conf_mutually_exclusive.phpt new file mode 100644 index 0000000..800cffa --- /dev/null +++ b/src/tests/broken_configuration_php8/broken_conf_mutually_exclusive.phpt @@ -0,0 +1,14 @@ +--TEST-- +Broken configuration +--SKIPIF-- + + +--INI-- +sp.configuration_file={PWD}/config/broken_conf_mutually_exclusive.ini +--FILE-- +--EXPECT-- + +Fatal error: [snuffleupagus][0.0.0.0][config][log] Invalid configuration line: 'sp.disabled_functions.function("system").param("id").value("42").value_r("^id$").drop();': '.r_value' and '.value' are mutually exclusive on line 1 in Unknown on line 0 + +Fatal error: [snuffleupagus][0.0.0.0][config][log] Invalid configuration file in Unknown on line 0 +Could not startup. diff --git a/src/tests/broken_configuration_php8/broken_conf_mutually_exclusive10.phpt b/src/tests/broken_configuration_php8/broken_conf_mutually_exclusive10.phpt new file mode 100644 index 0000000..c863bf9 --- /dev/null +++ b/src/tests/broken_configuration_php8/broken_conf_mutually_exclusive10.phpt @@ -0,0 +1,14 @@ +--TEST-- +Broken configuration - enabled/disabled readonly +--SKIPIF-- + + +--INI-- +sp.configuration_file={PWD}/config/broken_conf_mutually_exclusive10.ini +--FILE-- +--EXPECT-- + +Fatal error: [snuffleupagus][0.0.0.0][config][log] A rule can't be enabled and disabled on line 1 in Unknown on line 0 + +Fatal error: [snuffleupagus][0.0.0.0][config][log] Invalid configuration file in Unknown on line 0 +Could not startup. diff --git a/src/tests/broken_configuration_php8/broken_conf_mutually_exclusive11.phpt b/src/tests/broken_configuration_php8/broken_conf_mutually_exclusive11.phpt new file mode 100644 index 0000000..6bdb959 --- /dev/null +++ b/src/tests/broken_configuration_php8/broken_conf_mutually_exclusive11.phpt @@ -0,0 +1,14 @@ +--TEST-- +Broken configuration - ret and var are mutually exclusives +--SKIPIF-- + + +--INI-- +sp.configuration_file={PWD}/config/broken_conf_mutually_exclusive11.ini +--FILE-- +--EXPECT-- + +Fatal error: [snuffleupagus][0.0.0.0][config][log] Invalid configuration line: 'sp.disabled_functions.function("strcmp").drop().ret("hip").var("hop");':`ret` and `var` are mutually exclusive on line 1 in Unknown on line 0 + +Fatal error: [snuffleupagus][0.0.0.0][config][log] Invalid configuration file in Unknown on line 0 +Could not startup. diff --git a/src/tests/broken_configuration_php8/broken_conf_mutually_exclusive12.phpt b/src/tests/broken_configuration_php8/broken_conf_mutually_exclusive12.phpt new file mode 100644 index 0000000..1855fca --- /dev/null +++ b/src/tests/broken_configuration_php8/broken_conf_mutually_exclusive12.phpt @@ -0,0 +1,14 @@ +--TEST-- +Broken configuration - ret and value are mutually exclusive +--SKIPIF-- + + +--INI-- +sp.configuration_file={PWD}/config/broken_conf_mutually_exclusive12.ini +--FILE-- +--EXPECT-- + +Fatal error: [snuffleupagus][0.0.0.0][config][log] Invalid configuration line: 'sp.disabled_functions.function("strcmp").drop().ret("hip").value("hop");':`ret` and `value` are mutually exclusive on line 1 in Unknown on line 0 + +Fatal error: [snuffleupagus][0.0.0.0][config][log] Invalid configuration file in Unknown on line 0 +Could not startup. diff --git a/src/tests/broken_configuration_php8/broken_conf_mutually_exclusive2.phpt b/src/tests/broken_configuration_php8/broken_conf_mutually_exclusive2.phpt new file mode 100644 index 0000000..286ea04 --- /dev/null +++ b/src/tests/broken_configuration_php8/broken_conf_mutually_exclusive2.phpt @@ -0,0 +1,14 @@ +--TEST-- +Broken configuration +--SKIPIF-- + + +--INI-- +sp.configuration_file={PWD}/config/broken_conf_mutually_exclusive2.ini +--FILE-- +--EXPECT-- + +Fatal error: [snuffleupagus][0.0.0.0][config][log] Invalid configuration line: 'sp.disabled_functions.function("system").function_r("system").param("id").value("42").drop();': '.r_function' and '.function' are mutually exclusive on line 1 in Unknown on line 0 + +Fatal error: [snuffleupagus][0.0.0.0][config][log] Invalid configuration file in Unknown on line 0 +Could not startup. diff --git a/src/tests/broken_configuration_php8/broken_conf_mutually_exclusive3.phpt b/src/tests/broken_configuration_php8/broken_conf_mutually_exclusive3.phpt new file mode 100644 index 0000000..b377179 --- /dev/null +++ b/src/tests/broken_configuration_php8/broken_conf_mutually_exclusive3.phpt @@ -0,0 +1,14 @@ +--TEST-- +Broken configuration +--SKIPIF-- + + +--INI-- +sp.configuration_file={PWD}/config/broken_conf_mutually_exclusive3.ini +--FILE-- +--EXPECT-- + +Fatal error: [snuffleupagus][0.0.0.0][config][log] Invalid configuration line: 'sp.disabled_functions.function("system").param("id").value("42").filename_r("^id$").filename("pouet.txt").drop();': '.r_filename' and '.filename' are mutually exclusive on line 1 in Unknown on line 0 + +Fatal error: [snuffleupagus][0.0.0.0][config][log] Invalid configuration file in Unknown on line 0 +Could not startup. diff --git a/src/tests/broken_configuration_php8/broken_conf_mutually_exclusive4.phpt b/src/tests/broken_configuration_php8/broken_conf_mutually_exclusive4.phpt new file mode 100644 index 0000000..5f22a47 --- /dev/null +++ b/src/tests/broken_configuration_php8/broken_conf_mutually_exclusive4.phpt @@ -0,0 +1,14 @@ +--TEST-- +Broken configuration +--SKIPIF-- + + +--INI-- +sp.configuration_file={PWD}/config/broken_conf_mutually_exclusive4.ini +--FILE-- +--EXPECT-- + +Fatal error: [snuffleupagus][0.0.0.0][config][log] Invalid configuration line: 'sp.disabled_functions.function("system").param("id").value("42").param_r("^id$").drop();':'.r_param', '.param' and '.pos' are mutually exclusive on line 1 in Unknown on line 0 + +Fatal error: [snuffleupagus][0.0.0.0][config][log] Invalid configuration file in Unknown on line 0 +Could not startup. diff --git a/src/tests/broken_configuration_php8/broken_conf_mutually_exclusive5.phpt b/src/tests/broken_configuration_php8/broken_conf_mutually_exclusive5.phpt new file mode 100644 index 0000000..55d0eda --- /dev/null +++ b/src/tests/broken_configuration_php8/broken_conf_mutually_exclusive5.phpt @@ -0,0 +1,14 @@ +--TEST-- +Broken configuration +--SKIPIF-- + + +--INI-- +sp.configuration_file={PWD}/config/broken_conf_mutually_exclusive5.ini +--FILE-- +--EXPECT-- + +Fatal error: [snuffleupagus][0.0.0.0][config][log] Invalid configuration line: 'sp.disabled_functions.function("system").ret("0").drop().ret_r("^0$");': '.r_ret' and '.ret' are mutually exclusive on line 1 in Unknown on line 0 + +Fatal error: [snuffleupagus][0.0.0.0][config][log] Invalid configuration file in Unknown on line 0 +Could not startup. diff --git a/src/tests/broken_configuration_php8/broken_conf_mutually_exclusive6.phpt b/src/tests/broken_configuration_php8/broken_conf_mutually_exclusive6.phpt new file mode 100644 index 0000000..7dc6985 --- /dev/null +++ b/src/tests/broken_configuration_php8/broken_conf_mutually_exclusive6.phpt @@ -0,0 +1,14 @@ +--TEST-- +Broken configuration +--SKIPIF-- + + +--INI-- +sp.configuration_file={PWD}/config/broken_conf_mutually_exclusive6.ini +--FILE-- +--EXPECT-- + +Fatal error: [snuffleupagus][0.0.0.0][config][log] Invalid configuration line: 'sp.disabled_functions.function("system").param("id").value("42").ret_r("^0$").drop();':`ret` and `param` are mutually exclusive on line 1 in Unknown on line 0 + +Fatal error: [snuffleupagus][0.0.0.0][config][log] Invalid configuration file in Unknown on line 0 +Could not startup. diff --git a/src/tests/broken_configuration_php8/broken_conf_mutually_exclusive7.phpt b/src/tests/broken_configuration_php8/broken_conf_mutually_exclusive7.phpt new file mode 100644 index 0000000..ff7f415 --- /dev/null +++ b/src/tests/broken_configuration_php8/broken_conf_mutually_exclusive7.phpt @@ -0,0 +1,14 @@ +--TEST-- +Broken configuration +--SKIPIF-- + + +--INI-- +sp.configuration_file={PWD}/config/broken_conf_mutually_exclusive7.ini +--FILE-- +--EXPECT-- + +Fatal error: [snuffleupagus][0.0.0.0][config][log] Invalid configuration line: 'sp.disabled_functions.function("system").ret("0").drop().allow();': The rule must either be a `drop` or `allow` one on line 1 in Unknown on line 0 + +Fatal error: [snuffleupagus][0.0.0.0][config][log] Invalid configuration file in Unknown on line 0 +Could not startup. diff --git a/src/tests/broken_configuration_php8/broken_conf_mutually_exclusive8.phpt b/src/tests/broken_configuration_php8/broken_conf_mutually_exclusive8.phpt new file mode 100644 index 0000000..6ccd508 --- /dev/null +++ b/src/tests/broken_configuration_php8/broken_conf_mutually_exclusive8.phpt @@ -0,0 +1,14 @@ +--TEST-- +Broken configuration +--SKIPIF-- + + +--INI-- +sp.configuration_file={PWD}/config/broken_conf_mutually_exclusive8.ini +--FILE-- +--EXPECT-- + +Fatal error: [snuffleupagus][0.0.0.0][config][log] Invalid configuration line: 'sp.disabled_functions.ret("0").drop();': must take a function name on line 1 in Unknown on line 0 + +Fatal error: [snuffleupagus][0.0.0.0][config][log] Invalid configuration file in Unknown on line 0 +Could not startup. diff --git a/src/tests/broken_configuration_php8/broken_conf_mutually_exclusive9.phpt b/src/tests/broken_configuration_php8/broken_conf_mutually_exclusive9.phpt new file mode 100644 index 0000000..e4a2d6f --- /dev/null +++ b/src/tests/broken_configuration_php8/broken_conf_mutually_exclusive9.phpt @@ -0,0 +1,14 @@ +--TEST-- +Broken configuration - enabled/disabled unserialize +--SKIPIF-- + + +--INI-- +sp.configuration_file={PWD}/config/broken_conf_mutually_exclusive9.ini +--FILE-- +--EXPECT-- + +Fatal error: [snuffleupagus][0.0.0.0][config][log] A rule can't be enabled and disabled on line 1 in Unknown on line 0 + +Fatal error: [snuffleupagus][0.0.0.0][config][log] Invalid configuration file in Unknown on line 0 +Could not startup. diff --git a/src/tests/broken_configuration_php8/broken_conf_no_cookie_action.phpt b/src/tests/broken_configuration_php8/broken_conf_no_cookie_action.phpt new file mode 100644 index 0000000..5fb3f0b --- /dev/null +++ b/src/tests/broken_configuration_php8/broken_conf_no_cookie_action.phpt @@ -0,0 +1,14 @@ +--TEST-- +Bad config, invalid action. +--SKIPIF-- + + +--INI-- +sp.configuration_file={PWD}/config/broken_conf_cookie_action.ini +--FILE-- +--EXPECT-- + +Fatal error: [snuffleupagus][0.0.0.0][config][log] You must specify a at least one action to a cookie on line 1 in Unknown on line 0 + +Fatal error: [snuffleupagus][0.0.0.0][config][log] Invalid configuration file in Unknown on line 0 +Could not startup. diff --git a/src/tests/broken_configuration_php8/broken_conf_no_cookie_name.phpt b/src/tests/broken_configuration_php8/broken_conf_no_cookie_name.phpt new file mode 100644 index 0000000..1b2922b --- /dev/null +++ b/src/tests/broken_configuration_php8/broken_conf_no_cookie_name.phpt @@ -0,0 +1,14 @@ +--TEST-- +Broken configuration - encrypted cookie with no name +--SKIPIF-- + + +--INI-- +sp.configuration_file={PWD}/config/config_encrypted_cookies_noname.ini +--FILE-- +--EXPECT-- + +Fatal error: [snuffleupagus][0.0.0.0][config][log] You must specify a cookie name/regexp on line 2 in Unknown on line 0 + +Fatal error: [snuffleupagus][0.0.0.0][config][log] Invalid configuration file in Unknown on line 0 +Could not startup. diff --git a/src/tests/broken_configuration_php8/broken_conf_no_file_specified.phpt b/src/tests/broken_configuration_php8/broken_conf_no_file_specified.phpt new file mode 100644 index 0000000..cb2d95f --- /dev/null +++ b/src/tests/broken_configuration_php8/broken_conf_no_file_specified.phpt @@ -0,0 +1,10 @@ +--TEST-- +Broken configuration - No configuration file specified +--INI-- +--SKIPIF-- + +--FILE-- + +--EXPECT-- +Warning: [snuffleupagus][0.0.0.0][config][log] No configuration specificed via sp.configuration_file in Unknown on line 0 +1 diff --git a/src/tests/broken_configuration_php8/broken_conf_nonexisting_script.phpt b/src/tests/broken_configuration_php8/broken_conf_nonexisting_script.phpt new file mode 100644 index 0000000..21717a8 --- /dev/null +++ b/src/tests/broken_configuration_php8/broken_conf_nonexisting_script.phpt @@ -0,0 +1,17 @@ +--TEST-- +Invalid configuration file for upload +--SKIPIF-- + +--INI-- +file_uploads=1 +sp.configuration_file={PWD}/config/broken_conf_nonexisting_script.ini +--FILE-- + +--EXPECTF-- + +Fatal error: [snuffleupagus][0.0.0.0][config][log] The `script` (./non_existing_script.sh) doesn't exist on line 1 in Unknown on line 0 + +Fatal error: [snuffleupagus][0.0.0.0][config][log] Invalid configuration file in Unknown on line 0 +Could not startup. diff --git a/src/tests/broken_configuration_php8/broken_conf_quotes.phpt b/src/tests/broken_configuration_php8/broken_conf_quotes.phpt new file mode 100644 index 0000000..d437669 --- /dev/null +++ b/src/tests/broken_configuration_php8/broken_conf_quotes.phpt @@ -0,0 +1,16 @@ +--TEST-- +Broken configuration - missing quote +--SKIPIF-- + + +--INI-- +sp.configuration_file={PWD}/config/broken_conf_quotes.ini +--FILE-- +--EXPECT-- + +Fatal error: [snuffleupagus][0.0.0.0][config][log] You forgot to close a bracket. in Unknown on line 0 + +Fatal error: [snuffleupagus][0.0.0.0][config][log] Invalid value '_SERVER[PHP_SELF' for `var` on line 1 in Unknown on line 0 + +Fatal error: [snuffleupagus][0.0.0.0][config][log] Invalid configuration file in Unknown on line 0 +Could not startup. diff --git a/src/tests/broken_configuration_php8/broken_conf_readonly_exec.phpt b/src/tests/broken_configuration_php8/broken_conf_readonly_exec.phpt new file mode 100644 index 0000000..7e74683 --- /dev/null +++ b/src/tests/broken_configuration_php8/broken_conf_readonly_exec.phpt @@ -0,0 +1,17 @@ +--TEST-- +Invalid configuration file for readonly_exec +--SKIPIF-- + +--INI-- +file_uploads=1 +sp.configuration_file={PWD}/config/broken_conf_readonly_exec.ini +--FILE-- + +--EXPECTF-- + +Fatal error: [snuffleupagus][0.0.0.0][config][log] Trailing chars '234);' at the end of '.enable(1234);' on line 1 in Unknown on line 0 + +Fatal error: [snuffleupagus][0.0.0.0][config][log] Invalid configuration file in Unknown on line 0 +Could not startup. diff --git a/src/tests/broken_configuration_php8/broken_conf_samesite.phpt b/src/tests/broken_configuration_php8/broken_conf_samesite.phpt new file mode 100644 index 0000000..c905fd8 --- /dev/null +++ b/src/tests/broken_configuration_php8/broken_conf_samesite.phpt @@ -0,0 +1,14 @@ +--TEST-- +Bad config, invalid samesite type. +--SKIPIF-- + + +--INI-- +sp.configuration_file={PWD}/config/broken_conf_cookie_samesite.ini +--FILE-- +--EXPECT-- + +Fatal error: [snuffleupagus][0.0.0.0][config][log] nop is an invalid value to samesite (expected Lax or Strict) on line 1 in Unknown on line 0 + +Fatal error: [snuffleupagus][0.0.0.0][config][log] Invalid configuration file in Unknown on line 0 +Could not startup. diff --git a/src/tests/broken_configuration_php8/broken_conf_session_encryption.phpt b/src/tests/broken_configuration_php8/broken_conf_session_encryption.phpt new file mode 100644 index 0000000..886eb13 --- /dev/null +++ b/src/tests/broken_configuration_php8/broken_conf_session_encryption.phpt @@ -0,0 +1,14 @@ +--TEST-- +Broken config, session encryption +--SKIPIF-- + + +--INI-- +sp.configuration_file={PWD}/config/broken_conf_session_encryption.ini +--FILE-- +--EXPECT-- + +Fatal error: [snuffleupagus][0.0.0.0][config][log] Trailing chars 'nvalid value :/);' at the end of '.encrypt(invalid value :/);' on line 1 in Unknown on line 0 + +Fatal error: [snuffleupagus][0.0.0.0][config][log] Invalid configuration file in Unknown on line 0 +Could not startup. diff --git a/src/tests/broken_configuration_php8/broken_conf_session_encryption_without_encryption_key.phpt b/src/tests/broken_configuration_php8/broken_conf_session_encryption_without_encryption_key.phpt new file mode 100644 index 0000000..046dc7d --- /dev/null +++ b/src/tests/broken_configuration_php8/broken_conf_session_encryption_without_encryption_key.phpt @@ -0,0 +1,14 @@ +--TEST-- +Broken configuration - encrypted session without encryption key +--SKIPIF-- + + +--INI-- +sp.configuration_file={PWD}/config/broken_conf_session_encryption_without_encryption_key.ini +--FILE-- +--EXPECT-- + +Fatal error: [snuffleupagus][0.0.0.0][config][log] You're trying to use the session cookie encryption feature on line 2 without having set the `.secret_key` option in`sp.global`: please set it first in Unknown on line 0 + +Fatal error: [snuffleupagus][0.0.0.0][config][log] Invalid configuration file in Unknown on line 0 +Could not startup. diff --git a/src/tests/broken_configuration_php8/broken_conf_session_encryption_without_env_var.phpt b/src/tests/broken_configuration_php8/broken_conf_session_encryption_without_env_var.phpt new file mode 100644 index 0000000..bb0f212 --- /dev/null +++ b/src/tests/broken_configuration_php8/broken_conf_session_encryption_without_env_var.phpt @@ -0,0 +1,14 @@ +--TEST-- +Broken configuration - encrypted session without env var +--SKIPIF-- + + +--INI-- +sp.configuration_file={PWD}/config/broken_conf_session_encryption_without_env_var.ini +--FILE-- +--EXPECT-- + +Fatal error: [snuffleupagus][0.0.0.0][config][log] You're trying to use the session cookie encryption feature on line 2 without having set the `.cookie_env_var` option in`sp.global`: please set it first in Unknown on line 0 + +Fatal error: [snuffleupagus][0.0.0.0][config][log] Invalid configuration file in Unknown on line 0 +Could not startup. diff --git a/src/tests/broken_configuration_php8/broken_conf_shown_in_phpinfo.phpt b/src/tests/broken_configuration_php8/broken_conf_shown_in_phpinfo.phpt new file mode 100644 index 0000000..2503943 --- /dev/null +++ b/src/tests/broken_configuration_php8/broken_conf_shown_in_phpinfo.phpt @@ -0,0 +1,27 @@ +--TEST-- +Broken configuration +--SKIPIF-- + + +--INI-- +sp.configuration_file={PWD}/config/broken_config_regexp.ini +--FILE-- + no') !== FALSE) { + echo "win"; +} else { + echo "lose"; +} +?> +--EXPECTF-- + +Fatal error: [snuffleupagus][0.0.0.0][config][log] Failed to compile '*.': %s on line 1. in Unknown on line 0 + +Fatal error: [snuffleupagus][0.0.0.0][config][log] '.filename_r()' is expecting a valid regexp, and not '"*."' on line 1 in Unknown on line 0 + +Fatal error: [snuffleupagus][0.0.0.0][config][log] Invalid configuration file in Unknown on line 0 +Could not startup. diff --git a/src/tests/broken_configuration_php8/broken_conf_truncated.phpt b/src/tests/broken_configuration_php8/broken_conf_truncated.phpt new file mode 100644 index 0000000..059dcac --- /dev/null +++ b/src/tests/broken_configuration_php8/broken_conf_truncated.phpt @@ -0,0 +1,14 @@ +--TEST-- +Bad boolean value in configuration +--SKIPIF-- + + +--INI-- +sp.configuration_file={PWD}/config/config_broken_conf_truncated.ini +--FILE-- +--EXPECT-- + +Fatal error: [snuffleupagus][0.0.0.0][error][log] A valid string as parameter is expected on line 1 in Unknown on line 0 + +Fatal error: [snuffleupagus][0.0.0.0][config][log] Invalid configuration file in Unknown on line 0 +Could not startup. diff --git a/src/tests/broken_configuration_php8/broken_conf_unserialize.phpt b/src/tests/broken_configuration_php8/broken_conf_unserialize.phpt new file mode 100644 index 0000000..327b622 --- /dev/null +++ b/src/tests/broken_configuration_php8/broken_conf_unserialize.phpt @@ -0,0 +1,17 @@ +--TEST-- +Invalid configuration file for unserialize +--SKIPIF-- + +--INI-- +file_uploads=1 +sp.configuration_file={PWD}/config/broken_conf_unserialize.ini +--FILE-- + +--EXPECTF-- + +Fatal error: [snuffleupagus][0.0.0.0][config][log] Trailing chars '234);' at the end of '.enable(1234);' on line 1 in Unknown on line 0 + +Fatal error: [snuffleupagus][0.0.0.0][config][log] Invalid configuration file in Unknown on line 0 +Could not startup. diff --git a/src/tests/broken_configuration_php8/broken_conf_upload_validation.phpt b/src/tests/broken_configuration_php8/broken_conf_upload_validation.phpt new file mode 100644 index 0000000..9edede6 --- /dev/null +++ b/src/tests/broken_configuration_php8/broken_conf_upload_validation.phpt @@ -0,0 +1,17 @@ +--TEST-- +Invalid configuration file for upload validation +--SKIPIF-- + +--INI-- +file_uploads=1 +sp.configuration_file={PWD}/config/borken_conf_upload_validation.ini +--FILE-- + +--EXPECTF-- + +Fatal error: [snuffleupagus][0.0.0.0][error][log] A valid string as parameter is expected on line 1 in Unknown on line 0 + +Fatal error: [snuffleupagus][0.0.0.0][config][log] Invalid configuration file in Unknown on line 0 +Could not startup. diff --git a/src/tests/broken_configuration_php8/broken_conf_weird_keyword.phpt b/src/tests/broken_configuration_php8/broken_conf_weird_keyword.phpt new file mode 100644 index 0000000..75c2e0e --- /dev/null +++ b/src/tests/broken_configuration_php8/broken_conf_weird_keyword.phpt @@ -0,0 +1,14 @@ +--TEST-- +Bad config, unknown keyword +--SKIPIF-- + + +--INI-- +sp.configuration_file={PWD}/config/broken_conf_weird_keyword.ini +--FILE-- +--EXPECT-- + +Fatal error: [snuffleupagus][0.0.0.0][config][log] Trailing chars '.not_a_valid_keyword("test");' at the end of '.enable().not_a_valid_keyword("test");' on line 1 in Unknown on line 0 + +Fatal error: [snuffleupagus][0.0.0.0][config][log] Invalid configuration file in Unknown on line 0 +Could not startup. diff --git a/src/tests/broken_configuration_php8/broken_conf_wrapper_whitelist.phpt b/src/tests/broken_configuration_php8/broken_conf_wrapper_whitelist.phpt new file mode 100644 index 0000000..0011a6e --- /dev/null +++ b/src/tests/broken_configuration_php8/broken_conf_wrapper_whitelist.phpt @@ -0,0 +1,18 @@ +--TEST-- +Broken configuration with invalid token for wrapper whitelist +--SKIPIF-- + + +--INI-- +sp.configuration_file={PWD}/config/broken_conf_wrapper_whitelist.ini +sp.allow_broken_configuration=Off +--FILE-- + +--EXPECT-- + +Fatal error: [snuffleupagus][0.0.0.0][config][log] Trailing chars '.invalid_param();' at the end of '.invalid_param();' on line 1 in Unknown on line 0 + +Fatal error: [snuffleupagus][0.0.0.0][config][log] Invalid configuration file in Unknown on line 0 +Could not startup. diff --git a/src/tests/broken_configuration_php8/broken_conf_wrong_quotes.phpt b/src/tests/broken_configuration_php8/broken_conf_wrong_quotes.phpt new file mode 100644 index 0000000..b073369 --- /dev/null +++ b/src/tests/broken_configuration_php8/broken_conf_wrong_quotes.phpt @@ -0,0 +1,14 @@ +--TEST-- +Configuration line with too many quotes +--SKIPIF-- + + +--INI-- +sp.configuration_file={PWD}/config/broken_conf_wrong_quotes.ini +--FILE-- +--EXPECT-- + +Fatal error: [snuffleupagus][0.0.0.0][error][log] There is an issue with the parsing of '"\)': it doesn't look like a valid string on line 1 in Unknown on line 0 + +Fatal error: [snuffleupagus][0.0.0.0][config][log] Invalid configuration file in Unknown on line 0 +Could not startup. diff --git a/src/tests/broken_configuration_php8/broken_conf_wrong_type.phpt b/src/tests/broken_configuration_php8/broken_conf_wrong_type.phpt new file mode 100644 index 0000000..1f1cead --- /dev/null +++ b/src/tests/broken_configuration_php8/broken_conf_wrong_type.phpt @@ -0,0 +1,14 @@ +--TEST-- +Broken conf with wrong type +--SKIPIF-- + + +--INI-- +sp.configuration_file={PWD}/config/broken_conf_wrong_type.ini +--FILE-- +--EXPECTF-- + +Fatal error: [snuffleupagus][0.0.0.0][error][log] .ret_type() is expecting a valid php type ('false', 'true', 'array'. 'object', 'long', 'double', 'null', 'resource', 'reference', 'undef') on line 5 in Unknown on line 0 + +Fatal error: [snuffleupagus][0.0.0.0][config][log] Invalid configuration file in Unknown on line 0 +Could not startup. diff --git a/src/tests/broken_configuration_php8/broken_invalid_client_ip4.phpt b/src/tests/broken_configuration_php8/broken_invalid_client_ip4.phpt new file mode 100644 index 0000000..a96b059 --- /dev/null +++ b/src/tests/broken_configuration_php8/broken_invalid_client_ip4.phpt @@ -0,0 +1,16 @@ +--TEST-- +Invalid client IP +--SKIPIF-- + +--ENV-- +return << +--EXPECTF-- +Fatal error: [snuffleupagus][xyz][cidr_match][log] Weird ip (xyz) family in %a/broken_invalid_client_ip4.php on line 2 \ No newline at end of file diff --git a/src/tests/broken_configuration_php8/broken_regexp.phpt b/src/tests/broken_configuration_php8/broken_regexp.phpt new file mode 100644 index 0000000..877f801 --- /dev/null +++ b/src/tests/broken_configuration_php8/broken_regexp.phpt @@ -0,0 +1,16 @@ +--TEST-- +Broken regexp +--SKIPIF-- + + +--INI-- +sp.configuration_file={PWD}/config/broken_regexp.ini +--FILE-- +--EXPECTF-- + +Fatal error: [snuffleupagus][0.0.0.0][config][log] Failed to compile '^$[': missing terminating ] for character class on line 1. in Unknown on line 0 + +Fatal error: [snuffleupagus][0.0.0.0][config][log] '.value_r()' is expecting a valid regexp, and not '"^$["' on line 1 in Unknown on line 0 + +Fatal error: [snuffleupagus][0.0.0.0][config][log] Invalid configuration file in Unknown on line 0 +Could not startup. diff --git a/src/tests/broken_configuration_php8/broken_unmatching_brackets.phpt b/src/tests/broken_configuration_php8/broken_unmatching_brackets.phpt new file mode 100644 index 0000000..d143cbd --- /dev/null +++ b/src/tests/broken_configuration_php8/broken_unmatching_brackets.phpt @@ -0,0 +1,16 @@ +--TEST-- +Broken configuration - unmatching brackets +--SKIPIF-- + + +--INI-- +sp.configuration_file={PWD}/config/config_unmatching_brackets.ini +--FILE-- +--EXPECTF-- + +Fatal error: [snuffleupagus][0.0.0.0][config][log] Invalid `]` position. in Unknown on line 0 + +Fatal error: [snuffleupagus][0.0.0.0][config][log] Invalid value 'arr[b]]]]]' for `param` on line 1 in Unknown on line 0 + +Fatal error: [snuffleupagus][0.0.0.0][config][log] Invalid configuration file in Unknown on line 0 +Could not startup. diff --git a/src/tests/broken_configuration_php8/config/borken_conf_enable_disable.ini b/src/tests/broken_configuration_php8/config/borken_conf_enable_disable.ini new file mode 100644 index 0000000..4e95294 --- /dev/null +++ b/src/tests/broken_configuration_php8/config/borken_conf_enable_disable.ini @@ -0,0 +1 @@ +sp.global_strict.disable().enable(); diff --git a/src/tests/broken_configuration_php8/config/borken_conf_upload_validation.ini b/src/tests/broken_configuration_php8/config/borken_conf_upload_validation.ini new file mode 100644 index 0000000..7c94185 --- /dev/null +++ b/src/tests/broken_configuration_php8/config/borken_conf_upload_validation.ini @@ -0,0 +1 @@ +sp.upload_validation.script( diff --git a/src/tests/broken_configuration_php8/config/broken_conf.ini b/src/tests/broken_configuration_php8/config/broken_conf.ini new file mode 100644 index 0000000..0595320 --- /dev/null +++ b/src/tests/broken_configuration_php8/config/broken_conf.ini @@ -0,0 +1 @@ +this is a broken line diff --git a/src/tests/broken_configuration_php8/config/broken_conf2.ini b/src/tests/broken_configuration_php8/config/broken_conf2.ini new file mode 100644 index 0000000..fdb6b8f --- /dev/null +++ b/src/tests/broken_configuration_php8/config/broken_conf2.ini @@ -0,0 +1 @@ +sp.wrong diff --git a/src/tests/broken_configuration_php8/config/broken_conf_cookie_action.ini b/src/tests/broken_configuration_php8/config/broken_conf_cookie_action.ini new file mode 100644 index 0000000..5f07c28 --- /dev/null +++ b/src/tests/broken_configuration_php8/config/broken_conf_cookie_action.ini @@ -0,0 +1 @@ +sp.cookie.name("my_cookie_name"); diff --git a/src/tests/broken_configuration_php8/config/broken_conf_cookie_encryption_without_encryption_key.ini b/src/tests/broken_configuration_php8/config/broken_conf_cookie_encryption_without_encryption_key.ini new file mode 100644 index 0000000..a100bd8 --- /dev/null +++ b/src/tests/broken_configuration_php8/config/broken_conf_cookie_encryption_without_encryption_key.ini @@ -0,0 +1,2 @@ +sp.global.cookie_env_var("MY_SUPER_ENV_VAR_YAY"); +sp.cookie.name("my_cookie_name").encrypt(); diff --git a/src/tests/broken_configuration_php8/config/broken_conf_cookie_encryption_without_env_var.ini b/src/tests/broken_configuration_php8/config/broken_conf_cookie_encryption_without_env_var.ini new file mode 100644 index 0000000..54cb101 --- /dev/null +++ b/src/tests/broken_configuration_php8/config/broken_conf_cookie_encryption_without_env_var.ini @@ -0,0 +1,2 @@ +sp.global.secret_key("super secret encryption key"); +sp.cookie.name("my_cookie_name").encrypt(); diff --git a/src/tests/broken_configuration_php8/config/broken_conf_cookie_name_and_regexp.ini b/src/tests/broken_configuration_php8/config/broken_conf_cookie_name_and_regexp.ini new file mode 100644 index 0000000..503889b --- /dev/null +++ b/src/tests/broken_configuration_php8/config/broken_conf_cookie_name_and_regexp.ini @@ -0,0 +1,2 @@ +sp.global.secret_key("abcdef").cookie_env_var("REMOTE_ADDR"); +sp.cookie.name("my_cookie_name").name_r("my_cookie_regexp").encrypt(); diff --git a/src/tests/broken_configuration_php8/config/broken_conf_cookie_samesite.ini b/src/tests/broken_configuration_php8/config/broken_conf_cookie_samesite.ini new file mode 100644 index 0000000..acc4aa0 --- /dev/null +++ b/src/tests/broken_configuration_php8/config/broken_conf_cookie_samesite.ini @@ -0,0 +1 @@ +sp.cookie.name("my_cookie_name").samesite("nop"); diff --git a/src/tests/broken_configuration_php8/config/broken_conf_eval.ini b/src/tests/broken_configuration_php8/config/broken_conf_eval.ini new file mode 100644 index 0000000..80ef7e5 --- /dev/null +++ b/src/tests/broken_configuration_php8/config/broken_conf_eval.ini @@ -0,0 +1 @@ +sp.eval_blacklist.list("cos,sin diff --git a/src/tests/broken_configuration_php8/config/broken_conf_expecting_bool.ini b/src/tests/broken_configuration_php8/config/broken_conf_expecting_bool.ini new file mode 100644 index 0000000..51c28b2 --- /dev/null +++ b/src/tests/broken_configuration_php8/config/broken_conf_expecting_bool.ini @@ -0,0 +1,5 @@ + # this is an example of broken conf + + + ; this is another comment +sp.harden_random.enable(1337); diff --git a/src/tests/broken_configuration_php8/config/broken_conf_invalid_cidr.ini b/src/tests/broken_configuration_php8/config/broken_conf_invalid_cidr.ini new file mode 100644 index 0000000..b1929c1 --- /dev/null +++ b/src/tests/broken_configuration_php8/config/broken_conf_invalid_cidr.ini @@ -0,0 +1 @@ +sp.disable_function.function("system").drop().cidr("127.0.0.1/42"); diff --git a/src/tests/broken_configuration_php8/config/broken_conf_invalid_cidr6.ini b/src/tests/broken_configuration_php8/config/broken_conf_invalid_cidr6.ini new file mode 100644 index 0000000..5e91faf --- /dev/null +++ b/src/tests/broken_configuration_php8/config/broken_conf_invalid_cidr6.ini @@ -0,0 +1 @@ +sp.disable_function.function("system").drop().cidr("2001:0db8:0000:0000:0000:ff00:0042:8329/ZZZ"); diff --git a/src/tests/broken_configuration_php8/config/broken_conf_invalid_cidr6_no_slash.ini b/src/tests/broken_configuration_php8/config/broken_conf_invalid_cidr6_no_slash.ini new file mode 100644 index 0000000..067209f --- /dev/null +++ b/src/tests/broken_configuration_php8/config/broken_conf_invalid_cidr6_no_slash.ini @@ -0,0 +1 @@ +sp.disable_function.function("system").drop().cidr("2001:0db8:0000:0000:0000:ff00:0042:8329"); diff --git a/src/tests/broken_configuration_php8/config/broken_conf_invalid_cidr6_too_big.ini b/src/tests/broken_configuration_php8/config/broken_conf_invalid_cidr6_too_big.ini new file mode 100644 index 0000000..f82b18b --- /dev/null +++ b/src/tests/broken_configuration_php8/config/broken_conf_invalid_cidr6_too_big.ini @@ -0,0 +1 @@ +sp.disable_function.function("system").drop().cidr("2001:0db8:0000:0000:0000:ff00:0042:8329/13337"); diff --git a/src/tests/broken_configuration_php8/config/broken_conf_invalid_cidr_value.ini b/src/tests/broken_configuration_php8/config/broken_conf_invalid_cidr_value.ini new file mode 100644 index 0000000..06a56bd --- /dev/null +++ b/src/tests/broken_configuration_php8/config/broken_conf_invalid_cidr_value.ini @@ -0,0 +1 @@ +sp.disable_function.function("system").drop().cidr(" diff --git a/src/tests/broken_configuration_php8/config/broken_conf_invalid_filename.ini b/src/tests/broken_configuration_php8/config/broken_conf_invalid_filename.ini new file mode 100644 index 0000000..1be3b51 --- /dev/null +++ b/src/tests/broken_configuration_php8/config/broken_conf_invalid_filename.ini @@ -0,0 +1 @@ +sp.disable_function.function("sprintf").filename("wrong file name").drop(); diff --git a/src/tests/broken_configuration_php8/config/broken_conf_invalid_log_media.ini b/src/tests/broken_configuration_php8/config/broken_conf_invalid_log_media.ini new file mode 100644 index 0000000..9e7cea0 --- /dev/null +++ b/src/tests/broken_configuration_php8/config/broken_conf_invalid_log_media.ini @@ -0,0 +1 @@ +sp.log_media("pouet"); diff --git a/src/tests/broken_configuration_php8/config/broken_conf_invalid_type.ini b/src/tests/broken_configuration_php8/config/broken_conf_invalid_type.ini new file mode 100644 index 0000000..c52994e --- /dev/null +++ b/src/tests/broken_configuration_php8/config/broken_conf_invalid_type.ini @@ -0,0 +1 @@ +sp.disable_function.function("strpos").ret_type("totally_wrong"_type") diff --git a/src/tests/broken_configuration_php8/config/broken_conf_key_value.ini b/src/tests/broken_configuration_php8/config/broken_conf_key_value.ini new file mode 100644 index 0000000..a0edaf2 --- /dev/null +++ b/src/tests/broken_configuration_php8/config/broken_conf_key_value.ini @@ -0,0 +1 @@ +sp.disable_function.function("system").var("").value("").key("").drop(); diff --git a/src/tests/broken_configuration_php8/config/broken_conf_line_empty_string.ini b/src/tests/broken_configuration_php8/config/broken_conf_line_empty_string.ini new file mode 100644 index 0000000..dfa5520 --- /dev/null +++ b/src/tests/broken_configuration_php8/config/broken_conf_line_empty_string.ini @@ -0,0 +1 @@ +sp.cookie.name( diff --git a/src/tests/broken_configuration_php8/config/broken_conf_line_no_closing.ini b/src/tests/broken_configuration_php8/config/broken_conf_line_no_closing.ini new file mode 100644 index 0000000..6a8c922 --- /dev/null +++ b/src/tests/broken_configuration_php8/config/broken_conf_line_no_closing.ini @@ -0,0 +1 @@ +sp.cookie.name("123" diff --git a/src/tests/broken_configuration_php8/config/broken_conf_local_var_1.ini b/src/tests/broken_configuration_php8/config/broken_conf_local_var_1.ini new file mode 100644 index 0000000..ae5165c --- /dev/null +++ b/src/tests/broken_configuration_php8/config/broken_conf_local_var_1.ini @@ -0,0 +1 @@ +sp.disable_function.function("system").var("]").drop(); diff --git a/src/tests/broken_configuration_php8/config/broken_conf_local_var_10.ini b/src/tests/broken_configuration_php8/config/broken_conf_local_var_10.ini new file mode 100644 index 0000000..93dd07f --- /dev/null +++ b/src/tests/broken_configuration_php8/config/broken_conf_local_var_10.ini @@ -0,0 +1 @@ +sp.disable_function.function("system").var("asd[asd]asd").drop(); diff --git a/src/tests/broken_configuration_php8/config/broken_conf_local_var_11.ini b/src/tests/broken_configuration_php8/config/broken_conf_local_var_11.ini new file mode 100644 index 0000000..028b1bd --- /dev/null +++ b/src/tests/broken_configuration_php8/config/broken_conf_local_var_11.ini @@ -0,0 +1 @@ +sp.disable_function.function("system").param("asd::").drop(); diff --git a/src/tests/broken_configuration_php8/config/broken_conf_local_var_12.ini b/src/tests/broken_configuration_php8/config/broken_conf_local_var_12.ini new file mode 100644 index 0000000..a151960 --- /dev/null +++ b/src/tests/broken_configuration_php8/config/broken_conf_local_var_12.ini @@ -0,0 +1 @@ +sp.disable_function.function("system").var("").drop(); diff --git a/src/tests/broken_configuration_php8/config/broken_conf_local_var_13.ini b/src/tests/broken_configuration_php8/config/broken_conf_local_var_13.ini new file mode 100644 index 0000000..e7c9778 --- /dev/null +++ b/src/tests/broken_configuration_php8/config/broken_conf_local_var_13.ini @@ -0,0 +1 @@ +sp.disable_function.function("system").var("asd->asd").drop(); diff --git a/src/tests/broken_configuration_php8/config/broken_conf_local_var_14.ini b/src/tests/broken_configuration_php8/config/broken_conf_local_var_14.ini new file mode 100644 index 0000000..6c98ec3 --- /dev/null +++ b/src/tests/broken_configuration_php8/config/broken_conf_local_var_14.ini @@ -0,0 +1 @@ +sp.disable_function.function("system").var("$i+valid var name ").drop(); diff --git a/src/tests/broken_configuration_php8/config/broken_conf_local_var_15.ini b/src/tests/broken_configuration_php8/config/broken_conf_local_var_15.ini new file mode 100644 index 0000000..a8dc5a4 --- /dev/null +++ b/src/tests/broken_configuration_php8/config/broken_conf_local_var_15.ini @@ -0,0 +1 @@ +sp.disable_function.function("system").var("$i$$!@#->qwe").drop(); diff --git a/src/tests/broken_configuration_php8/config/broken_conf_local_var_16.ini b/src/tests/broken_configuration_php8/config/broken_conf_local_var_16.ini new file mode 100644 index 0000000..550719b --- /dev/null +++ b/src/tests/broken_configuration_php8/config/broken_conf_local_var_16.ini @@ -0,0 +1 @@ +sp.disable_function.function("system").var("\"").drop(); diff --git a/src/tests/broken_configuration_php8/config/broken_conf_local_var_2.ini b/src/tests/broken_configuration_php8/config/broken_conf_local_var_2.ini new file mode 100644 index 0000000..145a3b5 --- /dev/null +++ b/src/tests/broken_configuration_php8/config/broken_conf_local_var_2.ini @@ -0,0 +1 @@ +sp.disable_function.function("system").var("\"\"asd").drop(); diff --git a/src/tests/broken_configuration_php8/config/broken_conf_local_var_3.ini b/src/tests/broken_configuration_php8/config/broken_conf_local_var_3.ini new file mode 100644 index 0000000..5d89076 --- /dev/null +++ b/src/tests/broken_configuration_php8/config/broken_conf_local_var_3.ini @@ -0,0 +1 @@ +sp.disable_function.function("system").var("\$qwe->::").drop(); diff --git a/src/tests/broken_configuration_php8/config/broken_conf_local_var_4.ini b/src/tests/broken_configuration_php8/config/broken_conf_local_var_4.ini new file mode 100644 index 0000000..3ec073b --- /dev/null +++ b/src/tests/broken_configuration_php8/config/broken_conf_local_var_4.ini @@ -0,0 +1 @@ +sp.disable_function.function("system").var("\"asd\"asd[]").drop(); diff --git a/src/tests/broken_configuration_php8/config/broken_conf_local_var_5.ini b/src/tests/broken_configuration_php8/config/broken_conf_local_var_5.ini new file mode 100644 index 0000000..cd350b6 --- /dev/null +++ b/src/tests/broken_configuration_php8/config/broken_conf_local_var_5.ini @@ -0,0 +1 @@ +sp.disable_function.function("system").var("'asd'asd[]").drop(); diff --git a/src/tests/broken_configuration_php8/config/broken_conf_local_var_6.ini b/src/tests/broken_configuration_php8/config/broken_conf_local_var_6.ini new file mode 100644 index 0000000..02f4f1a --- /dev/null +++ b/src/tests/broken_configuration_php8/config/broken_conf_local_var_6.ini @@ -0,0 +1 @@ +sp.disable_function.function("system").var("''asd").drop(); diff --git a/src/tests/broken_configuration_php8/config/broken_conf_local_var_7.ini b/src/tests/broken_configuration_php8/config/broken_conf_local_var_7.ini new file mode 100644 index 0000000..abbd223 --- /dev/null +++ b/src/tests/broken_configuration_php8/config/broken_conf_local_var_7.ini @@ -0,0 +1 @@ +sp.disable_function.function("system").var("asd-->").drop(); diff --git a/src/tests/broken_configuration_php8/config/broken_conf_local_var_8.ini b/src/tests/broken_configuration_php8/config/broken_conf_local_var_8.ini new file mode 100644 index 0000000..fd18487 --- /dev/null +++ b/src/tests/broken_configuration_php8/config/broken_conf_local_var_8.ini @@ -0,0 +1 @@ +sp.disable_function.function("system").var("asd[asd]\"asd\"").drop(); diff --git a/src/tests/broken_configuration_php8/config/broken_conf_local_var_9.ini b/src/tests/broken_configuration_php8/config/broken_conf_local_var_9.ini new file mode 100644 index 0000000..a311b86 --- /dev/null +++ b/src/tests/broken_configuration_php8/config/broken_conf_local_var_9.ini @@ -0,0 +1 @@ +sp.disable_function.function("system").var("asd[asd]\'asd\'").drop(); diff --git a/src/tests/broken_configuration_php8/config/broken_conf_lots_of_quotes.ini b/src/tests/broken_configuration_php8/config/broken_conf_lots_of_quotes.ini new file mode 100644 index 0000000..189a10d --- /dev/null +++ b/src/tests/broken_configuration_php8/config/broken_conf_lots_of_quotes.ini @@ -0,0 +1 @@ +sp.cookie.name("this\"is a weird\"\"\"cookie\"name""); diff --git a/src/tests/broken_configuration_php8/config/broken_conf_missing_script.ini b/src/tests/broken_configuration_php8/config/broken_conf_missing_script.ini new file mode 100644 index 0000000..a46f590 --- /dev/null +++ b/src/tests/broken_configuration_php8/config/broken_conf_missing_script.ini @@ -0,0 +1 @@ +sp.upload_validation.enable(); diff --git a/src/tests/broken_configuration_php8/config/broken_conf_mutually_exclusive.ini b/src/tests/broken_configuration_php8/config/broken_conf_mutually_exclusive.ini new file mode 100644 index 0000000..7ea483f --- /dev/null +++ b/src/tests/broken_configuration_php8/config/broken_conf_mutually_exclusive.ini @@ -0,0 +1 @@ +sp.disable_function.function("system").param("id").value("42").value_r("^id$").drop(); diff --git a/src/tests/broken_configuration_php8/config/broken_conf_mutually_exclusive10.ini b/src/tests/broken_configuration_php8/config/broken_conf_mutually_exclusive10.ini new file mode 100644 index 0000000..da8426e --- /dev/null +++ b/src/tests/broken_configuration_php8/config/broken_conf_mutually_exclusive10.ini @@ -0,0 +1 @@ +sp.readonly_exec.enable().disable(); diff --git a/src/tests/broken_configuration_php8/config/broken_conf_mutually_exclusive11.ini b/src/tests/broken_configuration_php8/config/broken_conf_mutually_exclusive11.ini new file mode 100644 index 0000000..cab163f --- /dev/null +++ b/src/tests/broken_configuration_php8/config/broken_conf_mutually_exclusive11.ini @@ -0,0 +1 @@ +sp.disable_function.function("strcmp").drop().ret("hip").var("hop"); diff --git a/src/tests/broken_configuration_php8/config/broken_conf_mutually_exclusive12.ini b/src/tests/broken_configuration_php8/config/broken_conf_mutually_exclusive12.ini new file mode 100644 index 0000000..fe140db --- /dev/null +++ b/src/tests/broken_configuration_php8/config/broken_conf_mutually_exclusive12.ini @@ -0,0 +1 @@ +sp.disable_function.function("strcmp").drop().ret("hip").value("hop"); diff --git a/src/tests/broken_configuration_php8/config/broken_conf_mutually_exclusive2.ini b/src/tests/broken_configuration_php8/config/broken_conf_mutually_exclusive2.ini new file mode 100644 index 0000000..3ff3ca7 --- /dev/null +++ b/src/tests/broken_configuration_php8/config/broken_conf_mutually_exclusive2.ini @@ -0,0 +1 @@ +sp.disable_function.function("system").function_r("system").param("id").value("42").drop(); diff --git a/src/tests/broken_configuration_php8/config/broken_conf_mutually_exclusive3.ini b/src/tests/broken_configuration_php8/config/broken_conf_mutually_exclusive3.ini new file mode 100644 index 0000000..f4f7604 --- /dev/null +++ b/src/tests/broken_configuration_php8/config/broken_conf_mutually_exclusive3.ini @@ -0,0 +1 @@ +sp.disable_function.function("system").param("id").value("42").filename_r("^id$").filename("pouet.txt").drop(); diff --git a/src/tests/broken_configuration_php8/config/broken_conf_mutually_exclusive4.ini b/src/tests/broken_configuration_php8/config/broken_conf_mutually_exclusive4.ini new file mode 100644 index 0000000..c38a727 --- /dev/null +++ b/src/tests/broken_configuration_php8/config/broken_conf_mutually_exclusive4.ini @@ -0,0 +1 @@ +sp.disable_function.function("system").param("id").value("42").param_r("^id$").drop(); diff --git a/src/tests/broken_configuration_php8/config/broken_conf_mutually_exclusive5.ini b/src/tests/broken_configuration_php8/config/broken_conf_mutually_exclusive5.ini new file mode 100644 index 0000000..254b2a3 --- /dev/null +++ b/src/tests/broken_configuration_php8/config/broken_conf_mutually_exclusive5.ini @@ -0,0 +1 @@ +sp.disable_function.function("system").ret("0").drop().ret_r("^0$"); diff --git a/src/tests/broken_configuration_php8/config/broken_conf_mutually_exclusive6.ini b/src/tests/broken_configuration_php8/config/broken_conf_mutually_exclusive6.ini new file mode 100644 index 0000000..7c6712c --- /dev/null +++ b/src/tests/broken_configuration_php8/config/broken_conf_mutually_exclusive6.ini @@ -0,0 +1 @@ +sp.disable_function.function("system").param("id").value("42").ret_r("^0$").drop(); diff --git a/src/tests/broken_configuration_php8/config/broken_conf_mutually_exclusive7.ini b/src/tests/broken_configuration_php8/config/broken_conf_mutually_exclusive7.ini new file mode 100644 index 0000000..feb3486 --- /dev/null +++ b/src/tests/broken_configuration_php8/config/broken_conf_mutually_exclusive7.ini @@ -0,0 +1 @@ +sp.disable_function.function("system").ret("0").drop().allow(); diff --git a/src/tests/broken_configuration_php8/config/broken_conf_mutually_exclusive8.ini b/src/tests/broken_configuration_php8/config/broken_conf_mutually_exclusive8.ini new file mode 100644 index 0000000..c9c9ea2 --- /dev/null +++ b/src/tests/broken_configuration_php8/config/broken_conf_mutually_exclusive8.ini @@ -0,0 +1 @@ +sp.disable_function.ret("0").drop(); diff --git a/src/tests/broken_configuration_php8/config/broken_conf_mutually_exclusive9.ini b/src/tests/broken_configuration_php8/config/broken_conf_mutually_exclusive9.ini new file mode 100644 index 0000000..7bf6a62 --- /dev/null +++ b/src/tests/broken_configuration_php8/config/broken_conf_mutually_exclusive9.ini @@ -0,0 +1 @@ +sp.unserialize_hmac.enable().disable(); diff --git a/src/tests/broken_configuration_php8/config/broken_conf_nonexisting_script.ini b/src/tests/broken_configuration_php8/config/broken_conf_nonexisting_script.ini new file mode 100644 index 0000000..8327438 --- /dev/null +++ b/src/tests/broken_configuration_php8/config/broken_conf_nonexisting_script.ini @@ -0,0 +1 @@ +sp.upload_validation.enable().script("./non_existing_script.sh"); diff --git a/src/tests/broken_configuration_php8/config/broken_conf_quotes.ini b/src/tests/broken_configuration_php8/config/broken_conf_quotes.ini new file mode 100644 index 0000000..eac8739 --- /dev/null +++ b/src/tests/broken_configuration_php8/config/broken_conf_quotes.ini @@ -0,0 +1,3 @@ +sp.disable_function.function("system").filename("/static_pages/index.php").var("_SERVER[PHP_SELF").value_r("\"").drop().alias("XSS"); +sp.disable_function.filename("include/imageobject_im.class.php").function("exec").var("CONFIG[im_options]).value_r("[^a-z0-9]").drop(); + diff --git a/src/tests/broken_configuration_php8/config/broken_conf_readonly_exec.ini b/src/tests/broken_configuration_php8/config/broken_conf_readonly_exec.ini new file mode 100644 index 0000000..9e11313 --- /dev/null +++ b/src/tests/broken_configuration_php8/config/broken_conf_readonly_exec.ini @@ -0,0 +1 @@ +sp.readonly_exec.enable(1234); diff --git a/src/tests/broken_configuration_php8/config/broken_conf_session_encryption.ini b/src/tests/broken_configuration_php8/config/broken_conf_session_encryption.ini new file mode 100644 index 0000000..66b7956 --- /dev/null +++ b/src/tests/broken_configuration_php8/config/broken_conf_session_encryption.ini @@ -0,0 +1 @@ +sp.session.encrypt(invalid value :/); diff --git a/src/tests/broken_configuration_php8/config/broken_conf_session_encryption_without_encryption_key.ini b/src/tests/broken_configuration_php8/config/broken_conf_session_encryption_without_encryption_key.ini new file mode 100644 index 0000000..2b6f674 --- /dev/null +++ b/src/tests/broken_configuration_php8/config/broken_conf_session_encryption_without_encryption_key.ini @@ -0,0 +1,2 @@ +sp.global.cookie_env_var("MY_SUPER_ENV_VAR_YAY"); +sp.session.encrypt(); diff --git a/src/tests/broken_configuration_php8/config/broken_conf_session_encryption_without_env_var.ini b/src/tests/broken_configuration_php8/config/broken_conf_session_encryption_without_env_var.ini new file mode 100644 index 0000000..43caf4a --- /dev/null +++ b/src/tests/broken_configuration_php8/config/broken_conf_session_encryption_without_env_var.ini @@ -0,0 +1,2 @@ +sp.global.secret_key("super secret key, shhhh"); +sp.session.encrypt(); diff --git a/src/tests/broken_configuration_php8/config/broken_conf_to_few_args.ini b/src/tests/broken_configuration_php8/config/broken_conf_to_few_args.ini new file mode 100644 index 0000000..89e19be --- /dev/null +++ b/src/tests/broken_configuration_php8/config/broken_conf_to_few_args.ini @@ -0,0 +1 @@ +sp.harden_random.enable(); diff --git a/src/tests/broken_configuration_php8/config/broken_conf_unserialize.ini b/src/tests/broken_configuration_php8/config/broken_conf_unserialize.ini new file mode 100644 index 0000000..9cdc9a6 --- /dev/null +++ b/src/tests/broken_configuration_php8/config/broken_conf_unserialize.ini @@ -0,0 +1 @@ +sp.unserialize_hmac.enable(1234); diff --git a/src/tests/broken_configuration_php8/config/broken_conf_weird_keyword.ini b/src/tests/broken_configuration_php8/config/broken_conf_weird_keyword.ini new file mode 100644 index 0000000..bf5e7f5 --- /dev/null +++ b/src/tests/broken_configuration_php8/config/broken_conf_weird_keyword.ini @@ -0,0 +1 @@ +sp.harden_random.enable().not_a_valid_keyword("test"); diff --git a/src/tests/broken_configuration_php8/config/broken_conf_wrapper_whitelist.ini b/src/tests/broken_configuration_php8/config/broken_conf_wrapper_whitelist.ini new file mode 100644 index 0000000..b8e08a8 --- /dev/null +++ b/src/tests/broken_configuration_php8/config/broken_conf_wrapper_whitelist.ini @@ -0,0 +1 @@ +sp.wrappers_whitelist.invalid_param(); diff --git a/src/tests/broken_configuration_php8/config/broken_conf_wrong_quotes.ini b/src/tests/broken_configuration_php8/config/broken_conf_wrong_quotes.ini new file mode 100644 index 0000000..ff41f93 --- /dev/null +++ b/src/tests/broken_configuration_php8/config/broken_conf_wrong_quotes.ini @@ -0,0 +1 @@ +sp.cookie.name("\) diff --git a/src/tests/broken_configuration_php8/config/broken_conf_wrong_type.ini b/src/tests/broken_configuration_php8/config/broken_conf_wrong_type.ini new file mode 100644 index 0000000..b2943db --- /dev/null +++ b/src/tests/broken_configuration_php8/config/broken_conf_wrong_type.ini @@ -0,0 +1,5 @@ +sp.disable_function.function("strpos").ret_type("undef").drop().alias("Return value is undef"); +sp.disable_function.function("strpos").ret_type("null").drop().alias("Return value is null"); +sp.disable_function.function("strpos").ret_type("object").drop().alias("Return value is object"); +sp.disable_function.function("strpos").ret_type("reference").drop().alias("Return value is reference"); +sp.disable_function.function("strpos").ret_type("totally_wrong_type").drop().alias("Return value is FALSE"); diff --git a/src/tests/broken_configuration_php8/config/broken_config_regexp.ini b/src/tests/broken_configuration_php8/config/broken_config_regexp.ini new file mode 100644 index 0000000..62bed11 --- /dev/null +++ b/src/tests/broken_configuration_php8/config/broken_config_regexp.ini @@ -0,0 +1 @@ +sp.disable_function.function_r("^system$").filename_r("*.").drop(); diff --git a/src/tests/broken_configuration_php8/config/broken_config_regexp_no_closing_paren.ini b/src/tests/broken_configuration_php8/config/broken_config_regexp_no_closing_paren.ini new file mode 100644 index 0000000..93e150b --- /dev/null +++ b/src/tests/broken_configuration_php8/config/broken_config_regexp_no_closing_paren.ini @@ -0,0 +1 @@ +sp.disable_function.function_r("^system$").drop().filename_r("*." diff --git a/src/tests/broken_configuration_php8/config/broken_regexp.ini b/src/tests/broken_configuration_php8/config/broken_regexp.ini new file mode 100644 index 0000000..8e4bf69 --- /dev/null +++ b/src/tests/broken_configuration_php8/config/broken_regexp.ini @@ -0,0 +1 @@ +sp.disable_function.function("AwesomeClass::method3").param("a").drop().value_r("^$["); diff --git a/src/tests/broken_configuration_php8/config/config_broken_conf_truncated.ini b/src/tests/broken_configuration_php8/config/config_broken_conf_truncated.ini new file mode 100644 index 0000000..bf05dfb --- /dev/null +++ b/src/tests/broken_configuration_php8/config/config_broken_conf_truncated.ini @@ -0,0 +1 @@ +sp.disable_function.function("").param(no quote, omg! diff --git a/src/tests/broken_configuration_php8/config/config_encrypted_cookies_noname.ini b/src/tests/broken_configuration_php8/config/config_encrypted_cookies_noname.ini new file mode 100644 index 0000000..048e404 --- /dev/null +++ b/src/tests/broken_configuration_php8/config/config_encrypted_cookies_noname.ini @@ -0,0 +1,3 @@ +sp.global.secret_key("abcdef").cookie_env_var("REMOTE_ADDR"); +sp.cookie.name("").encrypt(); +sp.auto_cookie_secure.enable(); diff --git a/src/tests/broken_configuration_php8/config/config_encrypted_regexp_cookies_bad_regexp.ini b/src/tests/broken_configuration_php8/config/config_encrypted_regexp_cookies_bad_regexp.ini new file mode 100644 index 0000000..4fe92fd --- /dev/null +++ b/src/tests/broken_configuration_php8/config/config_encrypted_regexp_cookies_bad_regexp.ini @@ -0,0 +1,3 @@ +sp.global.secret_key("abcdef").cookie_env_var("REMOTE_ADDR"); +sp.cookie.name_r("^super_co[a-z+$").encrypt(); +sp.auto_cookie_secure.enable(); diff --git a/src/tests/broken_configuration_php8/config/config_unmatching_brackets.ini b/src/tests/broken_configuration_php8/config/config_unmatching_brackets.ini new file mode 100644 index 0000000..45fa4fe --- /dev/null +++ b/src/tests/broken_configuration_php8/config/config_unmatching_brackets.ini @@ -0,0 +1 @@ +sp.disable_function.function("foo").param("arr[b]]]]]").value("aaa").alias("4").drop(); diff --git a/src/tests/broken_configuration_php8/config/disabled_functions_cidr.ini b/src/tests/broken_configuration_php8/config/disabled_functions_cidr.ini new file mode 100644 index 0000000..f69ce07 --- /dev/null +++ b/src/tests/broken_configuration_php8/config/disabled_functions_cidr.ini @@ -0,0 +1,9 @@ +sp.disable_function.function("system").drop().cidr("2001:ab9:a::123/64"); +sp.disable_function.function("system").drop().cidr("192.168.0.1/16"); +sp.disable_function.function("system").drop().cidr("127.0.0.1/8"); +sp.disable_function.function("printf").drop().cidr("10.0.0.1/8"); +sp.disable_function.function("strpos").drop().cidr("127.0.0.2/4"); +sp.disable_function.function("strpos").drop().cidr("::ffff:192.0.2.128/128"); +sp.disable_function.function("strpos").drop().cidr("2001:ab9:a::123/64"); +sp.disable_function.function("strpos").drop().cidr("2001:0db8:f000:f000:f000:ff00:0042:8329/124"); +sp.disable_function.function("printf").drop().cidr("2002:0db8:0000:0000:0000:ff00:0042:8329/24"); diff --git a/src/tests/broken_configuration_php8/encrypt_regexp_cookies_bad_regexp.phpt b/src/tests/broken_configuration_php8/encrypt_regexp_cookies_bad_regexp.phpt new file mode 100644 index 0000000..7a8c909 --- /dev/null +++ b/src/tests/broken_configuration_php8/encrypt_regexp_cookies_bad_regexp.phpt @@ -0,0 +1,22 @@ +--TEST-- +Cookie decryption in ipv4 +--SKIPIF-- + +--INI-- +sp.configuration_file={PWD}/config/config_encrypted_regexp_cookies_bad_regexp.ini +error_reporting=1 +--COOKIE-- +super_cookie=AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAP3gV9YJZL/pUeNAjCKFW0U2ywmf1CwHzwd2pWM=;awful_cookie=awful_cookie_value; +--ENV-- +return << +--EXPECT-- +Fatal error: [snuffleupagus][127.0.0.1][config][log] Invalid configuration file in Unknown on line 0 + +Fatal error: [snuffleupagus][127.0.0.1][config][log] Failed to compile '^super_co[a-z+$': missing terminating ] for character class on line 2. in Unknown on line 0 + +Fatal error: [snuffleupagus][127.0.0.1][config][log] '.name_r()' is expecting a valid regexp, and not '"^super_co[a-z+$"' on line 2 in Unknown on line 0 -- cgit v1.3 From b0e54ddd81b01cffc8695fb2ff4e9862d6daf27c Mon Sep 17 00:00:00 2001 From: jvoisin Date: Thu, 31 Dec 2020 14:26:09 +0100 Subject: Enable 3 more tests for php8 --- src/tests/cookies_encryption/encrypt_cookies2.phpt | 1 - src/tests/cookies_encryption/encrypt_regexp_cookies2.phpt | 1 - src/tests/disable_function/disabled_functions_drop_include.phpt | 1 - 3 files changed, 3 deletions(-) (limited to 'src') diff --git a/src/tests/cookies_encryption/encrypt_cookies2.phpt b/src/tests/cookies_encryption/encrypt_cookies2.phpt index b71aaa9..18c6b41 100644 --- a/src/tests/cookies_encryption/encrypt_cookies2.phpt +++ b/src/tests/cookies_encryption/encrypt_cookies2.phpt @@ -2,7 +2,6 @@ Cookie encryption in ipv4 --SKIPIF-- -= 80000) print "skip"; ?> --INI-- sp.configuration_file={PWD}/config/config_encrypted_regexp_cookies.ini --COOKIE-- diff --git a/src/tests/cookies_encryption/encrypt_regexp_cookies2.phpt b/src/tests/cookies_encryption/encrypt_regexp_cookies2.phpt index b71aaa9..18c6b41 100644 --- a/src/tests/cookies_encryption/encrypt_regexp_cookies2.phpt +++ b/src/tests/cookies_encryption/encrypt_regexp_cookies2.phpt @@ -2,7 +2,6 @@ Cookie encryption in ipv4 --SKIPIF-- -= 80000) print "skip"; ?> --INI-- sp.configuration_file={PWD}/config/config_encrypted_regexp_cookies.ini --COOKIE-- diff --git a/src/tests/disable_function/disabled_functions_drop_include.phpt b/src/tests/disable_function/disabled_functions_drop_include.phpt index 014a627..975168e 100644 --- a/src/tests/disable_function/disabled_functions_drop_include.phpt +++ b/src/tests/disable_function/disabled_functions_drop_include.phpt @@ -2,7 +2,6 @@ Disable function, bug : https://github.com/jvoisin/snuffleupagus/issues/181 --SKIPIF-- -= 80000) print "skip"; ?> --INI-- sp.configuration_file={PWD}/config/disabled_functions_drop_include.ini --FILE-- -- cgit v1.3 From 69b4fca9a673f9f01dd01a4e2ea4df8011ac5bd7 Mon Sep 17 00:00:00 2001 From: jvoisin Date: Thu, 31 Dec 2020 14:36:17 +0100 Subject: Add a tests for unserialize with php8 --- src/tests/unserialize_php8/config/config_serialize.ini | 1 + src/tests/unserialize_php8/unserialize_wrong_call.phpt | 18 ++++++++++++++++++ 2 files changed, 19 insertions(+) create mode 100644 src/tests/unserialize_php8/config/config_serialize.ini create mode 100644 src/tests/unserialize_php8/unserialize_wrong_call.phpt (limited to 'src') diff --git a/src/tests/unserialize_php8/config/config_serialize.ini b/src/tests/unserialize_php8/config/config_serialize.ini new file mode 100644 index 0000000..7de4438 --- /dev/null +++ b/src/tests/unserialize_php8/config/config_serialize.ini @@ -0,0 +1 @@ +sp.global.secret_key("abcdef"); diff --git a/src/tests/unserialize_php8/unserialize_wrong_call.phpt b/src/tests/unserialize_php8/unserialize_wrong_call.phpt new file mode 100644 index 0000000..4c62356 --- /dev/null +++ b/src/tests/unserialize_php8/unserialize_wrong_call.phpt @@ -0,0 +1,18 @@ +--TEST-- +Unserialize ok, but called with the wrong number of arguments +--SKIPIF-- + + +--INI-- +sp.configuration_file={PWD}/config/config_serialize.ini +--FILE-- + +--EXPECTF-- +Fatal error: Uncaught ArgumentCountError: unserialize() expects at most 2 arguments, 4 given in %s/tests/unserialize_php8/unserialize_wrong_call.php:3 +Stack trace: +#0 %s/tests/unserialize_php8/unserialize_wrong_call.php(3): unserialize('s:1:"a";', 'too', 'many', 'aaaaaaaargument...') +#1 {main} + thrown in %s/tests/unserialize_php8/unserialize_wrong_call.php on line 3 -- cgit v1.3 From 6db0b53393015c639afb7e1fd8efcba65fb6234b Mon Sep 17 00:00:00 2001 From: jvoisin Date: Thu, 31 Dec 2020 14:56:20 +0100 Subject: Enable 3 more tests PHP8 is changing the capitalization of the error message --- src/tests/stream_wrapper/stream_wrapper.phpt | 7 +++---- src/tests/stream_wrapper/stream_wrapper_register.phpt | 2 +- src/tests/stream_wrapper/stream_wrapper_without_openssl.phpt | 6 +++--- 3 files changed, 7 insertions(+), 8 deletions(-) (limited to 'src') diff --git a/src/tests/stream_wrapper/stream_wrapper.phpt b/src/tests/stream_wrapper/stream_wrapper.phpt index 5a1dab7..588a10d 100644 --- a/src/tests/stream_wrapper/stream_wrapper.phpt +++ b/src/tests/stream_wrapper/stream_wrapper.phpt @@ -5,7 +5,6 @@ Stream wrapper if (!extension_loaded("snuffleupagus")) print "skip snuffleupagus extension missing"; if (!extension_loaded("openssl")) print "skip openssl extension missing"; ?> -= 80000) print "skip"; ?> --INI-- sp.configuration_file={PWD}/config/config_stream_wrapper.ini --FILE-- @@ -26,10 +25,10 @@ Warning: file_get_contents(): Unable to find the wrapper "http" - did you forget Warning: file_get_contents(): php_network_getaddresses: getaddrinfo failed: %s -Warning: file_get_contents(https://qweqwezxc): failed to open stream: php_network_getaddresses: getaddrinfo failed: %s +Warning: file_get_contents(https://qweqwezxc): %s to open stream: php_network_getaddresses: getaddrinfo failed: %s -Warning: file_get_contents(ftp://qweqwezxc): failed to open stream: operation failed in %a/stream_wrapper.php on line %d +Warning: file_get_contents(ftp://qweqwezxc): %s to open stream: operation failed in %a/stream_wrapper.php on line %d Warning: file_get_contents(): Unable to find the wrapper "lelel" - did you forget to enable it when you configured PHP? in %a/stream_wrapper.php on line %d -Warning: file_get_contents(lelel://qweqwezxc): failed to open stream: No such file or directory in %a/stream_wrapper.php on line %d +Warning: file_get_contents(lelel://qweqwezxc): %s to open stream: No such file or directory in %a/stream_wrapper.php on line %d diff --git a/src/tests/stream_wrapper/stream_wrapper_register.phpt b/src/tests/stream_wrapper/stream_wrapper_register.phpt index a3ffb2e..15eb444 100644 --- a/src/tests/stream_wrapper/stream_wrapper_register.phpt +++ b/src/tests/stream_wrapper/stream_wrapper_register.phpt @@ -23,4 +23,4 @@ Warning: fopen(): Unable to find the wrapper "lolol" - did you forget to enable Warning: fopen(): file:// wrapper is disabled in the server configuration in %a/stream_wrapper_register.php on line %d -Warning: fopen(lolol://asdasd): failed to open stream: no suitable wrapper could be found in %a/stream_wrapper_register.php on line %d +Warning: fopen(lolol://asdasd): %s to open stream: no suitable wrapper could be found in %a/stream_wrapper_register.php on line %d diff --git a/src/tests/stream_wrapper/stream_wrapper_without_openssl.phpt b/src/tests/stream_wrapper/stream_wrapper_without_openssl.phpt index 73090ff..b4bdc3f 100644 --- a/src/tests/stream_wrapper/stream_wrapper_without_openssl.phpt +++ b/src/tests/stream_wrapper/stream_wrapper_without_openssl.phpt @@ -20,10 +20,10 @@ Warning: Unknown: Unable to find the wrapper "php" - did you forget to enable it Warning: file_get_contents(): Unable to find the wrapper "http" - did you forget to enable it when you configured PHP? in %a/stream_wrapper_without_openssl.php on line 2 -Warning: file_get_contents(http://qweqwezxc): failed to open stream: No such file or directory in %a/stream_wrapper_without_openssl.php on line 2 +Warning: file_get_contents(http://qweqwezxc): %s to open stream: No such file or directory in %a/stream_wrapper_without_openssl.php on line 2 -Warning: file_get_contents(ftp://qweqwezxc): failed to open stream: operation failed in %a/stream_wrapper_without_openssl.php on line 3 +Warning: file_get_contents(ftp://qweqwezxc): %s to open stream: operation failed in %a/stream_wrapper_without_openssl.php on line 3 Warning: file_get_contents(): Unable to find the wrapper "lelel" - did you forget to enable it when you configured PHP? in %a/stream_wrapper_without_openssl.php on line 4 -Warning: file_get_contents(lelel://qweqwezxc): failed to open stream: No such file or directory in %a/stream_wrapper_without_openssl.php on line 4 +Warning: file_get_contents(lelel://qweqwezxc): %s to open stream: No such file or directory in %a/stream_wrapper_without_openssl.php on line 4 -- cgit v1.3 From 3934044e873a24ac7a89014c1ad79e585d6a1148 Mon Sep 17 00:00:00 2001 From: jvoisin Date: Thu, 31 Dec 2020 14:58:37 +0100 Subject: Actually enable the tests --- src/tests/stream_wrapper/stream_wrapper_register.phpt | 1 - src/tests/stream_wrapper/stream_wrapper_without_openssl.phpt | 1 - 2 files changed, 2 deletions(-) (limited to 'src') diff --git a/src/tests/stream_wrapper/stream_wrapper_register.phpt b/src/tests/stream_wrapper/stream_wrapper_register.phpt index 15eb444..27d8afb 100644 --- a/src/tests/stream_wrapper/stream_wrapper_register.phpt +++ b/src/tests/stream_wrapper/stream_wrapper_register.phpt @@ -2,7 +2,6 @@ Stream wrapper --SKIPIF-- -= 80000) print "skip"; ?> --INI-- sp.configuration_file={PWD}/config/config_stream_wrapper_register.ini --FILE-- diff --git a/src/tests/stream_wrapper/stream_wrapper_without_openssl.phpt b/src/tests/stream_wrapper/stream_wrapper_without_openssl.phpt index b4bdc3f..54fd067 100644 --- a/src/tests/stream_wrapper/stream_wrapper_without_openssl.phpt +++ b/src/tests/stream_wrapper/stream_wrapper_without_openssl.phpt @@ -2,7 +2,6 @@ Stream wrapper, without a dependency on openssl --SKIPIF-- -= 80000) print "skip"; ?> --INI-- sp.configuration_file={PWD}/config/config_stream_wrapper.ini --FILE-- -- cgit v1.3 From c3a35b46107fc5ddf94b15ccd6a4d1697610e48f Mon Sep 17 00:00:00 2001 From: jvoisin Date: Thu, 31 Dec 2020 15:11:56 +0100 Subject: Add two tests for inexistant config files --- src/tests/php8/inexistent_conf_file.phpt | 14 ++++++++++++++ src/tests/php8/inexistent_conf_file_list.phpt | 14 ++++++++++++++ 2 files changed, 28 insertions(+) create mode 100644 src/tests/php8/inexistent_conf_file.phpt create mode 100644 src/tests/php8/inexistent_conf_file_list.phpt (limited to 'src') diff --git a/src/tests/php8/inexistent_conf_file.phpt b/src/tests/php8/inexistent_conf_file.phpt new file mode 100644 index 0000000..ac763aa --- /dev/null +++ b/src/tests/php8/inexistent_conf_file.phpt @@ -0,0 +1,14 @@ +--TEST-- +Test for unexistent configuration file, in php8 +--SKIPIF-- + + +--INI-- +sp.configuration_file={PWD}/config/unexistent_configuration_file.ini +--FILE-- + +--EXPECTF-- +Fatal error: [snuffleupagus][0.0.0.0][config][log] Could not open configuration file %a/config/unexistent_configuration_file.ini : No such file or directory in Unknown on line 0 + +Fatal error: [snuffleupagus][0.0.0.0][config][log] Invalid configuration file in Unknown on line 0 +Could not startup. diff --git a/src/tests/php8/inexistent_conf_file_list.phpt b/src/tests/php8/inexistent_conf_file_list.phpt new file mode 100644 index 0000000..2309fc6 --- /dev/null +++ b/src/tests/php8/inexistent_conf_file_list.phpt @@ -0,0 +1,14 @@ +--TEST-- +Non-existent configuration file in a list in php8 +--SKIPIF-- + + +--INI-- +sp.configuration_file={PWD}/../../../config/default.rules,{PWD}/non_existent_configuration_file +--FILE-- + +--EXPECTF-- +Fatal error: [snuffleupagus][0.0.0.0][config][log] Could not open configuration file %a/non_existent_configuration_file : No such file or directory in Unknown on line 0 + +Fatal error: [snuffleupagus][0.0.0.0][config][log] Invalid configuration file in Unknown on line 0 +Could not startup. -- cgit v1.3 From 22793562313fd7efaeaa663d405357bbb788da5f Mon Sep 17 00:00:00 2001 From: jvoisin Date: Thu, 31 Dec 2020 15:33:08 +0100 Subject: Add tests for harden_rand --- src/tests/harden_rand_php8/config/harden_rand.ini | 1 + src/tests/harden_rand_php8/harden_rand_noargs.phpt | 43 ++++++++++++++++++++++ 2 files changed, 44 insertions(+) create mode 100644 src/tests/harden_rand_php8/config/harden_rand.ini create mode 100644 src/tests/harden_rand_php8/harden_rand_noargs.phpt (limited to 'src') diff --git a/src/tests/harden_rand_php8/config/harden_rand.ini b/src/tests/harden_rand_php8/config/harden_rand.ini new file mode 100644 index 0000000..89e19be --- /dev/null +++ b/src/tests/harden_rand_php8/config/harden_rand.ini @@ -0,0 +1 @@ +sp.harden_random.enable(); diff --git a/src/tests/harden_rand_php8/harden_rand_noargs.phpt b/src/tests/harden_rand_php8/harden_rand_noargs.phpt new file mode 100644 index 0000000..5f00c8f --- /dev/null +++ b/src/tests/harden_rand_php8/harden_rand_noargs.phpt @@ -0,0 +1,43 @@ +--TEST-- +Harden rand without any arguments +--SKIPIF-- + + +--INI-- +sp.configuration_file={PWD}/config/harden_rand.ini +--FILE-- + +--EXPECTF-- +Fatal error: Uncaught ArgumentCountError: rand() expects exactly 2 arguments, 1 given in %s/tests/harden_rand_php8/harden_rand_noargs.php:5 +Stack trace: +#0 %s/tests/harden_rand_php8/harden_rand_noargs.php(5): rand(1) +#1 {main} + thrown in %s/tests/harden_rand_php8/harden_rand_noargs.php on line 5 -- cgit v1.3 From c8ba12081260ea71d693b84ca5afbd163732c9fc Mon Sep 17 00:00:00 2001 From: jvoisin Date: Thu, 31 Dec 2020 16:04:34 +0100 Subject: Add two tests for cookies encryption on php8 --- .../config/config_encrypted_cookies.ini | 3 ++ src/tests/cookies_php8/encrypt_cookies4.phpt | 31 ++++++++++++++++++ src/tests/cookies_php8/setcookie.phpt | 37 ++++++++++++++++++++++ 3 files changed, 71 insertions(+) create mode 100644 src/tests/cookies_php8/config/config_encrypted_cookies.ini create mode 100644 src/tests/cookies_php8/encrypt_cookies4.phpt create mode 100644 src/tests/cookies_php8/setcookie.phpt (limited to 'src') diff --git a/src/tests/cookies_php8/config/config_encrypted_cookies.ini b/src/tests/cookies_php8/config/config_encrypted_cookies.ini new file mode 100644 index 0000000..4b50440 --- /dev/null +++ b/src/tests/cookies_php8/config/config_encrypted_cookies.ini @@ -0,0 +1,3 @@ +sp.global.secret_key("abcdef").cookie_env_var("REMOTE_ADDR"); +sp.cookie.name("super_cookie").encrypt(); +sp.auto_cookie_secure.enable(); diff --git a/src/tests/cookies_php8/encrypt_cookies4.phpt b/src/tests/cookies_php8/encrypt_cookies4.phpt new file mode 100644 index 0000000..8b51838 --- /dev/null +++ b/src/tests/cookies_php8/encrypt_cookies4.phpt @@ -0,0 +1,31 @@ +--TEST-- +Cookie encryption in ipv6 +--SKIPIF-- + + +--INI-- +sp.configuration_file={PWD}/config/config_encrypted_cookies.ini +--COOKIE-- +--ENV-- +return << +--EXPECTF-- +Fatal error: Uncaught ValueError: setcookie(): Argument #1 ($name) cannot be empty in %s/tests/cookies_php8/encrypt_cookies4.php:5 +Stack trace: +#0 %s/tests/cookies_php8/encrypt_cookies4.php(5): setcookie('', 'Cookie with no ...', 1, '1', '1', true, true) +#1 {main} + thrown in %s/tests/cookies_php8/encrypt_cookies4.php on line 5 diff --git a/src/tests/cookies_php8/setcookie.phpt b/src/tests/cookies_php8/setcookie.phpt new file mode 100644 index 0000000..67f1f50 --- /dev/null +++ b/src/tests/cookies_php8/setcookie.phpt @@ -0,0 +1,37 @@ +--TEST-- +Set cookies. +--SKIPIF-- + + +--INI-- +sp.configuration_file={PWD}/config/config_encrypted_cookies.ini +--COOKIE-- +--ENV-- +return << +--EXPECTF-- +Fatal error: Uncaught ArgumentCountError: setcookie() expects at most 7 arguments, 8 given in %s/tests/cookies_php8/setcookie.php:13 +Stack trace: +#0 %s/tests/cookies_php8/setcookie.php(13): setcookie('name', 'value', 1, '/super/path', 'super_domain2', true, false, 1337) +#1 {main} + thrown in %s/tests/cookies_php8/setcookie.php on line 13 -- cgit v1.3 From 53f83f80d87b80408d14f75c1364cf6ba233c7e5 Mon Sep 17 00:00:00 2001 From: jvoisin Date: Thu, 31 Dec 2020 16:12:40 +0100 Subject: Enable a PHP<8 test --- src/tests/upload_validation/upload_validation_real.phpt | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'src') diff --git a/src/tests/upload_validation/upload_validation_real.phpt b/src/tests/upload_validation/upload_validation_real.phpt index f8f3612..d20c5d7 100644 --- a/src/tests/upload_validation/upload_validation_real.phpt +++ b/src/tests/upload_validation/upload_validation_real.phpt @@ -6,8 +6,8 @@ if (!extension_loaded("snuffleupagus")) { print "skip"; } -if (PHP_VERSION_ID >= 70300) { - print "skip BROKEN with 7.3"; +if (PHP_VERSION_ID >= 80000) { + print "vld isn't supported by PHP8"; } if (strpos(system(PHP_BINARY . " -d error_log=/dev/null -d extension=vld.so -m 2>/dev/null"), "vld") === FALSE) { -- cgit v1.3 From a6c6934433979796a6c490899e9d21acf6b50571 Mon Sep 17 00:00:00 2001 From: jvoisin Date: Thu, 31 Dec 2020 16:36:18 +0100 Subject: Enabled matching on local var in php8 PHP8 failed hard when it couldn't find the local variable we're looking for. using ZEND_FETCH_CLASS_SILENT makes it silent. --- src/sp_var_value.c | 2 +- src/tests/disable_function/disabled_function_local_var.phpt | 1 - src/tests/disable_function/disabled_function_local_var_10.phpt | 1 - src/tests/disable_function/disabled_function_local_var_2.phpt | 1 - src/tests/disable_function/disabled_function_local_var_3.phpt | 1 - src/tests/disable_function/disabled_function_local_var_4.phpt | 1 - src/tests/disable_function/disabled_function_local_var_5.phpt | 1 - src/tests/disable_function/disabled_function_local_var_9.phpt | 1 - src/tests/disable_function/disabled_function_local_var_crash.phpt | 1 - src/tests/disable_function/disabled_function_param.phpt | 1 - src/tests/disable_function/disabled_function_super_global_var.phpt | 1 - .../disable_function/disabled_functions_drop_include_simulation.phpt | 1 - src/tests/disable_function/disabled_functions_eval_filename.phpt | 1 - src/tests/disable_function/disabled_functions_filename_r.phpt | 1 - src/tests/disable_function/disabled_functions_include_once.phpt | 1 - src/tests/disable_function/disabled_functions_include_simulation.phpt | 1 - src/tests/disable_function/disabled_functions_local_var_array.phpt | 1 - src/tests/disable_function/disabled_functions_local_var_array_key.phpt | 1 - .../disable_function/disabled_functions_local_var_array_not_array.phpt | 1 - src/tests/disable_function/disabled_functions_param_array.phpt | 1 - src/tests/disable_function/disabled_functions_param_array_deref.phpt | 1 - src/tests/disable_function/disabled_functions_param_array_no_value.phpt | 1 - .../disable_function/disabled_functions_param_array_several_levels.phpt | 1 - .../disabled_functions_param_array_several_levels_int.phpt | 1 - .../disabled_functions_param_array_several_levels_keys.phpt | 1 - .../disabled_functions_param_array_several_levels_keys_int.phpt | 1 - 26 files changed, 1 insertion(+), 26 deletions(-) (limited to 'src') diff --git a/src/sp_var_value.c b/src/sp_var_value.c index 7f08c46..8109377 100644 --- a/src/sp_var_value.c +++ b/src/sp_var_value.c @@ -50,7 +50,7 @@ static zval *get_local_var(zend_execute_data *ed, const char *var_name) { static zval *get_constant(const char *value) { zend_string *name = zend_string_init(value, strlen(value), 0); - zval *zvalue = zend_get_constant_ex(name, NULL, 0); + zval *zvalue = zend_get_constant_ex(name, NULL, ZEND_FETCH_CLASS_SILENT); zend_string_release(name); return zvalue; diff --git a/src/tests/disable_function/disabled_function_local_var.phpt b/src/tests/disable_function/disabled_function_local_var.phpt index fb4b7a1..c28fd8c 100644 --- a/src/tests/disable_function/disabled_function_local_var.phpt +++ b/src/tests/disable_function/disabled_function_local_var.phpt @@ -2,7 +2,6 @@ Disable functions - match on a local variable --SKIPIF-- -= 80000) print "skip"; ?> --INI-- sp.configuration_file={PWD}/config/disabled_function_local_var.ini --FILE-- diff --git a/src/tests/disable_function/disabled_function_local_var_10.phpt b/src/tests/disable_function/disabled_function_local_var_10.phpt index b9c9491..2d5478d 100644 --- a/src/tests/disable_function/disabled_function_local_var_10.phpt +++ b/src/tests/disable_function/disabled_function_local_var_10.phpt @@ -2,7 +2,6 @@ Disable functions - match on a local variable --SKIPIF-- -= 80000) print "skip"; ?> --INI-- sp.configuration_file={PWD}/config/disabled_function_local_var.ini --FILE-- diff --git a/src/tests/disable_function/disabled_function_local_var_2.phpt b/src/tests/disable_function/disabled_function_local_var_2.phpt index b073f8b..076c3c5 100644 --- a/src/tests/disable_function/disabled_function_local_var_2.phpt +++ b/src/tests/disable_function/disabled_function_local_var_2.phpt @@ -2,7 +2,6 @@ Disable functions - match on a local variable --SKIPIF-- -= 80000) print "skip"; ?> --INI-- sp.configuration_file={PWD}/config/disabled_function_local_var.ini --FILE-- diff --git a/src/tests/disable_function/disabled_function_local_var_3.phpt b/src/tests/disable_function/disabled_function_local_var_3.phpt index 0bb3074..f404682 100644 --- a/src/tests/disable_function/disabled_function_local_var_3.phpt +++ b/src/tests/disable_function/disabled_function_local_var_3.phpt @@ -2,7 +2,6 @@ Disable functions - match on a local variable --SKIPIF-- -= 80000) print "skip"; ?> --INI-- sp.configuration_file={PWD}/config/disabled_function_local_var.ini --FILE-- diff --git a/src/tests/disable_function/disabled_function_local_var_4.phpt b/src/tests/disable_function/disabled_function_local_var_4.phpt index 7aa5e0c..ec44c3f 100644 --- a/src/tests/disable_function/disabled_function_local_var_4.phpt +++ b/src/tests/disable_function/disabled_function_local_var_4.phpt @@ -2,7 +2,6 @@ Disable functions - match on a local variable --SKIPIF-- -= 80000) print "skip"; ?> --INI-- sp.configuration_file={PWD}/config/disabled_function_local_var_2.ini --FILE-- diff --git a/src/tests/disable_function/disabled_function_local_var_5.phpt b/src/tests/disable_function/disabled_function_local_var_5.phpt index dec1140..7e592cd 100644 --- a/src/tests/disable_function/disabled_function_local_var_5.phpt +++ b/src/tests/disable_function/disabled_function_local_var_5.phpt @@ -2,7 +2,6 @@ Disable functions - match on a local variable --SKIPIF-- -= 80000) print "skip"; ?> --INI-- sp.configuration_file={PWD}/config/disabled_function_local_var.ini --FILE-- diff --git a/src/tests/disable_function/disabled_function_local_var_9.phpt b/src/tests/disable_function/disabled_function_local_var_9.phpt index dd86d21..7e56a67 100644 --- a/src/tests/disable_function/disabled_function_local_var_9.phpt +++ b/src/tests/disable_function/disabled_function_local_var_9.phpt @@ -2,7 +2,6 @@ Disable functions - match on a local variable --SKIPIF-- -= 80000) print "skip"; ?> --INI-- sp.configuration_file={PWD}/config/disabled_function_local_var.ini --FILE-- diff --git a/src/tests/disable_function/disabled_function_local_var_crash.phpt b/src/tests/disable_function/disabled_function_local_var_crash.phpt index d29fcdc..f36b2c7 100644 --- a/src/tests/disable_function/disabled_function_local_var_crash.phpt +++ b/src/tests/disable_function/disabled_function_local_var_crash.phpt @@ -2,7 +2,6 @@ Disable functions - match on a local variable --SKIPIF-- -= 80000) print "skip"; ?> --INI-- sp.configuration_file={PWD}/config/disabled_function_local_var.ini --FILE-- diff --git a/src/tests/disable_function/disabled_function_param.phpt b/src/tests/disable_function/disabled_function_param.phpt index fe673d8..e318a15 100644 --- a/src/tests/disable_function/disabled_function_param.phpt +++ b/src/tests/disable_function/disabled_function_param.phpt @@ -2,7 +2,6 @@ Disable functions - match on a param --SKIPIF-- -= 80000) print "skip"; ?> --INI-- sp.configuration_file={PWD}/config/disabled_function_param.ini --FILE-- diff --git a/src/tests/disable_function/disabled_function_super_global_var.phpt b/src/tests/disable_function/disabled_function_super_global_var.phpt index 1a3d0ad..6232e19 100644 --- a/src/tests/disable_function/disabled_function_super_global_var.phpt +++ b/src/tests/disable_function/disabled_function_super_global_var.phpt @@ -2,7 +2,6 @@ Disable functions - match on a super global --SKIPIF-- -= 80000) print "skip"; ?> --INI-- sp.configuration_file={PWD}/config/disabled_function_super_global_var.ini --GET-- diff --git a/src/tests/disable_function/disabled_functions_drop_include_simulation.phpt b/src/tests/disable_function/disabled_functions_drop_include_simulation.phpt index 97e1569..0a693be 100644 --- a/src/tests/disable_function/disabled_functions_drop_include_simulation.phpt +++ b/src/tests/disable_function/disabled_functions_drop_include_simulation.phpt @@ -2,7 +2,6 @@ Disable function, bug : https://github.com/jvoisin/snuffleupagus/issues/181 --SKIPIF-- -= 80000) print "skip"; ?> --INI-- sp.configuration_file={PWD}/config/disabled_functions_drop_include_simulation.ini --FILE-- diff --git a/src/tests/disable_function/disabled_functions_eval_filename.phpt b/src/tests/disable_function/disabled_functions_eval_filename.phpt index eb714e5..8ee482d 100644 --- a/src/tests/disable_function/disabled_functions_eval_filename.phpt +++ b/src/tests/disable_function/disabled_functions_eval_filename.phpt @@ -2,7 +2,6 @@ Disable functions - eval --SKIPIF-- -= 80000) print "skip"; ?> --INI-- sp.configuration_file={PWD}/config/config_disabled_functions_eval_filename.ini --FILE-- diff --git a/src/tests/disable_function/disabled_functions_filename_r.phpt b/src/tests/disable_function/disabled_functions_filename_r.phpt index a636675..97e703b 100644 --- a/src/tests/disable_function/disabled_functions_filename_r.phpt +++ b/src/tests/disable_function/disabled_functions_filename_r.phpt @@ -2,7 +2,6 @@ Disable functions - filename regexp --SKIPIF-- -= 80000) print "skip"; ?> --INI-- sp.configuration_file={PWD}/config/config_disabled_functions_filename_r.ini --FILE-- diff --git a/src/tests/disable_function/disabled_functions_include_once.phpt b/src/tests/disable_function/disabled_functions_include_once.phpt index 93a6491..57cb5a1 100644 --- a/src/tests/disable_function/disabled_functions_include_once.phpt +++ b/src/tests/disable_function/disabled_functions_include_once.phpt @@ -2,7 +2,6 @@ Disable functions - include_once --SKIPIF-- -= 80000) print "skip"; ?> --INI-- sp.configuration_file={PWD}/config/config_disabled_functions_include.ini --FILE-- diff --git a/src/tests/disable_function/disabled_functions_include_simulation.phpt b/src/tests/disable_function/disabled_functions_include_simulation.phpt index d88e823..53ea2a4 100644 --- a/src/tests/disable_function/disabled_functions_include_simulation.phpt +++ b/src/tests/disable_function/disabled_functions_include_simulation.phpt @@ -2,7 +2,6 @@ Disable functions - Include (simulation) --SKIPIF-- -= 80000) print "skip"; ?> --INI-- sp.configuration_file={PWD}/config/config_disabled_functions_include.ini --FILE-- diff --git a/src/tests/disable_function/disabled_functions_local_var_array.phpt b/src/tests/disable_function/disabled_functions_local_var_array.phpt index 4790148..bff34eb 100644 --- a/src/tests/disable_function/disabled_functions_local_var_array.phpt +++ b/src/tests/disable_function/disabled_functions_local_var_array.phpt @@ -2,7 +2,6 @@ Disable functions - match on an array value buried in several levels --SKIPIF-- -= 80000) print "skip"; ?> --INI-- sp.configuration_file={PWD}/config/config_disabled_functions_local_var_array.ini --FILE-- diff --git a/src/tests/disable_function/disabled_functions_local_var_array_key.phpt b/src/tests/disable_function/disabled_functions_local_var_array_key.phpt index d11ae7e..bb66ac0 100644 --- a/src/tests/disable_function/disabled_functions_local_var_array_key.phpt +++ b/src/tests/disable_function/disabled_functions_local_var_array_key.phpt @@ -2,7 +2,6 @@ Disable functions - match on an array value buried in several levels --SKIPIF-- -= 80000) print "skip"; ?> --INI-- sp.configuration_file={PWD}/config/config_disabled_functions_local_var_array_key.ini --FILE-- diff --git a/src/tests/disable_function/disabled_functions_local_var_array_not_array.phpt b/src/tests/disable_function/disabled_functions_local_var_array_not_array.phpt index 627e7ca..6a62074 100644 --- a/src/tests/disable_function/disabled_functions_local_var_array_not_array.phpt +++ b/src/tests/disable_function/disabled_functions_local_var_array_not_array.phpt @@ -2,7 +2,6 @@ Disable functions --SKIPIF-- -= 80000) print "skip"; ?> --INI-- sp.configuration_file={PWD}/config/disabled_function_local_var_array_not_array.ini --FILE-- diff --git a/src/tests/disable_function/disabled_functions_param_array.phpt b/src/tests/disable_function/disabled_functions_param_array.phpt index 7194548..c8bca3a 100644 --- a/src/tests/disable_function/disabled_functions_param_array.phpt +++ b/src/tests/disable_function/disabled_functions_param_array.phpt @@ -2,7 +2,6 @@ Disable functions --SKIPIF-- -= 80000) print "skip"; ?> --INI-- sp.configuration_file={PWD}/config/config_disabled_functions_param_array.ini --FILE-- diff --git a/src/tests/disable_function/disabled_functions_param_array_deref.phpt b/src/tests/disable_function/disabled_functions_param_array_deref.phpt index c8c9732..e2efc79 100644 --- a/src/tests/disable_function/disabled_functions_param_array_deref.phpt +++ b/src/tests/disable_function/disabled_functions_param_array_deref.phpt @@ -2,7 +2,6 @@ Disable functions --SKIPIF-- -= 80000) print "skip"; ?> --INI-- sp.configuration_file={PWD}/config/config_disabled_functions_param_array.ini --FILE-- diff --git a/src/tests/disable_function/disabled_functions_param_array_no_value.phpt b/src/tests/disable_function/disabled_functions_param_array_no_value.phpt index d31cef9..c857aa0 100644 --- a/src/tests/disable_function/disabled_functions_param_array_no_value.phpt +++ b/src/tests/disable_function/disabled_functions_param_array_no_value.phpt @@ -2,7 +2,6 @@ Disable functions - matching on an array's variable only --SKIPIF-- -= 80000) print "skip"; ?> --INI-- sp.configuration_file={PWD}/config/config_disabled_functions_param_array.ini --FILE-- diff --git a/src/tests/disable_function/disabled_functions_param_array_several_levels.phpt b/src/tests/disable_function/disabled_functions_param_array_several_levels.phpt index 7d0adeb..a642f2b 100644 --- a/src/tests/disable_function/disabled_functions_param_array_several_levels.phpt +++ b/src/tests/disable_function/disabled_functions_param_array_several_levels.phpt @@ -2,7 +2,6 @@ Disable functions - match on an array value buried in several levels --SKIPIF-- -= 80000) print "skip"; ?> --INI-- sp.configuration_file={PWD}/config/config_disabled_functions_param_array.ini --FILE-- diff --git a/src/tests/disable_function/disabled_functions_param_array_several_levels_int.phpt b/src/tests/disable_function/disabled_functions_param_array_several_levels_int.phpt index ecf1fb1..01f0a36 100644 --- a/src/tests/disable_function/disabled_functions_param_array_several_levels_int.phpt +++ b/src/tests/disable_function/disabled_functions_param_array_several_levels_int.phpt @@ -2,7 +2,6 @@ Disable functions - match on an array value buried in several levels --SKIPIF-- -= 80000) print "skip"; ?> --INI-- sp.configuration_file={PWD}/config/config_disabled_functions_param_array.ini --FILE-- diff --git a/src/tests/disable_function/disabled_functions_param_array_several_levels_keys.phpt b/src/tests/disable_function/disabled_functions_param_array_several_levels_keys.phpt index 6d8cbb0..c2a66ee 100644 --- a/src/tests/disable_function/disabled_functions_param_array_several_levels_keys.phpt +++ b/src/tests/disable_function/disabled_functions_param_array_several_levels_keys.phpt @@ -2,7 +2,6 @@ Disable functions - match on an array value buried in several levels --SKIPIF-- -= 80000) print "skip"; ?> --INI-- sp.configuration_file={PWD}/config/config_disabled_functions_param_array.ini --FILE-- diff --git a/src/tests/disable_function/disabled_functions_param_array_several_levels_keys_int.phpt b/src/tests/disable_function/disabled_functions_param_array_several_levels_keys_int.phpt index fef5364..27bbe24 100644 --- a/src/tests/disable_function/disabled_functions_param_array_several_levels_keys_int.phpt +++ b/src/tests/disable_function/disabled_functions_param_array_several_levels_keys_int.phpt @@ -2,7 +2,6 @@ Disable functions - match on an array value buried in several levels --SKIPIF-- -= 80000) print "skip"; ?> --INI-- sp.configuration_file={PWD}/config/config_disabled_functions_param_array.ini --FILE-- -- cgit v1.3 From dc900601f36465ddef997a9f59fc208b00086033 Mon Sep 17 00:00:00 2001 From: jvoisin Date: Thu, 31 Dec 2020 16:48:47 +0100 Subject: Fix a test on php8 --- src/tests/deny_writable/deny_writable_execution_simulation.phpt | 1 + 1 file changed, 1 insertion(+) (limited to 'src') diff --git a/src/tests/deny_writable/deny_writable_execution_simulation.phpt b/src/tests/deny_writable/deny_writable_execution_simulation.phpt index d825cfa..4352e77 100644 --- a/src/tests/deny_writable/deny_writable_execution_simulation.phpt +++ b/src/tests/deny_writable/deny_writable_execution_simulation.phpt @@ -1,6 +1,7 @@ --TEST-- Readonly execution attempt (simulation mode) --SKIPIF-- += 80000) print "skip"; ?> -= 70300) { print "skip BROKEN with 7.3"; } ?> += 80000) print "skip"; ?> --INI-- sp.configuration_file={PWD}/config/config_stream_wrapper_register.ini --FILE-- @@ -11,7 +11,7 @@ stream_wrapper_restore("stdin"); fopen("stdin://asdasd", "r"); ?> --EXPECTF-- -Notice: stream_wrapper_restore(): stdin:// was never changed, nothing to restore in %a/stream_wrapper_restore.php on line %d +%s Warning: fopen(): Unable to find the wrapper "stdin" - did you forget to enable it when you configured PHP? in %a/stream_wrapper_restore.php on line %d -- cgit v1.3 From 837fbdb88a513500520f057d27bdfedd0d3995ca Mon Sep 17 00:00:00 2001 From: jvoisin Date: Fri, 1 Jan 2021 16:31:33 +0100 Subject: Constify a function --- src/sp_disabled_functions.c | 4 ++-- src/sp_pcre_compat.c | 6 ++++-- src/sp_pcre_compat.h | 1 - src/sp_sloppy.c | 3 ++- src/sp_utils.c | 3 ++- src/sp_utils.h | 3 ++- 6 files changed, 12 insertions(+), 8 deletions(-) (limited to 'src') diff --git a/src/sp_disabled_functions.c b/src/sp_disabled_functions.c index c5ea437..41c9f23 100644 --- a/src/sp_disabled_functions.c +++ b/src/sp_disabled_functions.c @@ -40,7 +40,7 @@ static bool is_functions_list_matching(zend_execute_data* execute_data, sp_list_node* functions_list) { zend_execute_data *orig_execute_data, *current; orig_execute_data = current = execute_data; - sp_list_node const * it = functions_list; + sp_list_node const* it = functions_list; while (current) { if (it == NULL) { // every function in the list matched, we've got a match! @@ -60,7 +60,7 @@ static bool is_functions_list_matching(zend_execute_data* execute_data, if (0 == match) { it = it->next; } - current = current->prev_execute_data; + current = current->prev_execute_data; } EG(current_execute_data) = orig_execute_data; diff --git a/src/sp_pcre_compat.c b/src/sp_pcre_compat.c index d2efc71..b4d29f0 100644 --- a/src/sp_pcre_compat.c +++ b/src/sp_pcre_compat.c @@ -14,7 +14,8 @@ sp_pcre* sp_pcre_compile(const char* const pattern) { #else const char* pcre_error = NULL; int erroroffset; - ret = php_pcre_compile(pattern, PCRE_CASELESS, &pcre_error, &erroroffset, NULL); + ret = + php_pcre_compile(pattern, PCRE_CASELESS, &pcre_error, &erroroffset, NULL); #endif if (NULL == ret) { @@ -37,7 +38,8 @@ bool ZEND_HOT sp_is_regexp_matching_len(const sp_pcre* regexp, const char* str, ret = pcre2_match(regexp, (PCRE2_SPTR)str, len, 0, 0, match_data, NULL); #else int vec[30]; - ret = php_pcre_exec(regexp, NULL, str, len, 0, 0, vec, sizeof(vec) / sizeof(int)); + ret = php_pcre_exec(regexp, NULL, str, len, 0, 0, vec, + sizeof(vec) / sizeof(int)); #endif if (ret < 0) { diff --git a/src/sp_pcre_compat.h b/src/sp_pcre_compat.h index b70630d..11f7f7c 100644 --- a/src/sp_pcre_compat.h +++ b/src/sp_pcre_compat.h @@ -7,7 +7,6 @@ #undef pcre_exec #undef pcre_compile - #define PCRE2_CODE_UNIT_WIDTH 8 #if PHP_VERSION_ID >= 70300 #define SP_HAS_PCRE2 diff --git a/src/sp_sloppy.c b/src/sp_sloppy.c index d9c9e8d..f9ed718 100644 --- a/src/sp_sloppy.c +++ b/src/sp_sloppy.c @@ -26,7 +26,8 @@ static void modify_opcode(zend_op_array* opline) { } #if PHP_VERSION_ID >= 80000 -ZEND_API zend_op_array* sp_compile_string(zend_string* source_string, const char* filename) { +ZEND_API zend_op_array* sp_compile_string(zend_string* source_string, + const char* filename) { #else ZEND_API zend_op_array* sp_compile_string(zval* source_string, char* filename) { #endif diff --git a/src/sp_utils.c b/src/sp_utils.c index cb63037..04074bf 100644 --- a/src/sp_utils.c +++ b/src/sp_utils.c @@ -140,7 +140,8 @@ static int construct_filename(char* filename, } int sp_log_request(const zend_string* restrict folder, - const zend_string* restrict text_repr, char* from) { + const zend_string* restrict text_repr, + char const* const from) { FILE* file; const char* current_filename = zend_get_executed_filename(TSRMLS_C); const int current_line = zend_get_executed_lineno(TSRMLS_C); diff --git a/src/sp_utils.h b/src/sp_utils.h index 24c74bf..a883d6d 100644 --- a/src/sp_utils.h +++ b/src/sp_utils.h @@ -76,7 +76,8 @@ int hook_function(const char *, HashTable *, zif_handler); int hook_regexp(const sp_pcre *, HashTable *, zif_handler); bool check_is_in_eval_whitelist(const zend_string *const function_name); int sp_log_request(const zend_string *restrict folder, - const zend_string *restrict text_repr, char *from); + const zend_string *restrict text_repr, + char const *const from); bool sp_zend_string_equals(const zend_string *s1, const zend_string *s2); #endif /* SP_UTILS_H */ -- cgit v1.3 From 838511b707990e9dc5a75e2d97004c0045424b4d Mon Sep 17 00:00:00 2001 From: jvoisin Date: Fri, 1 Jan 2021 16:34:00 +0100 Subject: Simplify sp_match_array_value --- src/sp_utils.c | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) (limited to 'src') diff --git a/src/sp_utils.c b/src/sp_utils.c index 04074bf..4d66d3c 100644 --- a/src/sp_utils.c +++ b/src/sp_utils.c @@ -368,10 +368,8 @@ bool sp_match_array_value(const zval* arr, const zend_string* to_match, ZEND_HASH_FOREACH_VAL(Z_ARRVAL_P(arr), value) { if (Z_TYPE_P(value) != IS_ARRAY) { - const zend_string* value_str = sp_zval_to_zend_string(value); - if (sp_match_value(value_str, to_match, rx)) { + if (sp_match_value(sp_zval_to_zend_string(value), to_match, rx)) { return true; - } else { } } else if (sp_match_array_value(value, to_match, rx)) { return true; -- cgit v1.3 From 594a2de7b4358e3b5c076d47e722bd99cee12868 Mon Sep 17 00:00:00 2001 From: jvoisin Date: Fri, 1 Jan 2021 16:38:20 +0100 Subject: Simplify a loop condition --- src/sp_utils.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'src') diff --git a/src/sp_utils.c b/src/sp_utils.c index 4d66d3c..1253eff 100644 --- a/src/sp_utils.c +++ b/src/sp_utils.c @@ -165,7 +165,7 @@ int sp_log_request(const zend_string* restrict folder, fprintf(file, "RULE: sp%s%s\n", from, ZSTR_VAL(text_repr)); fprintf(file, "FILE: %s:%d\n", current_filename, current_line); - for (size_t i = 0; i < (sizeof(zones) / sizeof(zones[0])) - 1; i++) { + for (size_t i = 0; zones[i].str; i++) { zval* variable_value; zend_string* variable_key; -- cgit v1.3 From 4e0adde7c9f59b39e280d5766cc1b0fca8d71864 Mon Sep 17 00:00:00 2001 From: jvoisin Date: Sat, 2 Jan 2021 15:38:02 +0100 Subject: Fix a test on php8+ --- src/tests/upload_validation/upload_validation_real.phpt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'src') diff --git a/src/tests/upload_validation/upload_validation_real.phpt b/src/tests/upload_validation/upload_validation_real.phpt index d20c5d7..1c919ec 100644 --- a/src/tests/upload_validation/upload_validation_real.phpt +++ b/src/tests/upload_validation/upload_validation_real.phpt @@ -7,7 +7,7 @@ if (!extension_loaded("snuffleupagus")) { } if (PHP_VERSION_ID >= 80000) { - print "vld isn't supported by PHP8"; + print "skip"; } if (strpos(system(PHP_BINARY . " -d error_log=/dev/null -d extension=vld.so -m 2>/dev/null"), "vld") === FALSE) { -- cgit v1.3 From b65565ac2c13e717dfc12d89479dd98e24089e08 Mon Sep 17 00:00:00 2001 From: jvoisin Date: Sat, 2 Jan 2021 15:49:24 +0100 Subject: Use gitlab-ci for all supported php versions --- .gitlab-ci.yml | 57 ++++++++++++---------- .../deny_writable_execution_simulation.phpt | 2 +- 2 files changed, 33 insertions(+), 26 deletions(-) (limited to 'src') diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml index 8f99bb8..14317f5 100644 --- a/.gitlab-ci.yml +++ b/.gitlab-ci.yml @@ -1,37 +1,44 @@ stages: - testsuite -testsuite:debian: - image: debian +.php7: stage: testsuite script: - - apt-get -qqy update - - apt-get -qqy install --no-install-recommends php-dev gcc make libpcre3-dev + - pecl install vld-beta + - rm -rf src/tests/*php8*/ - make tests + after_script: + - grep -r . ./src/tests/*/*.out + - grep -r . ./src/tests/*/*.diff -testsuite:fedora: - image: fedora +.php8: stage: testsuite script: - - dnf install -y php-devel gcc make pcre-devel - make tests + after_script: + - grep -r . ./src/tests/*/*.out + - grep -r . ./src/tests/*/*.diff -testsuite:ubuntu: - image: ubuntu - stage: testsuite - script: - - apt-get -qqy update - - DEBIAN_FRONTEND=noninteractive apt-get -qqy install --no-install-recommends php-dev gcc make libpcre3-dev php-cgi php-curl php-xml - - make tests +testsuite:php7.0: + extends: .php7 + image: php:7.0 -testsuite:alpine: - image: alpine - stage: testsuite - script: - - apk update - - apk add php7-dev php7-cgi php7-simplexml php7-xml make gcc musl-dev pcre-dev - - make compile_debug - - TEST_PHP_ARGS='-q' REPORT_EXIT_STATUS=1 make -C src test TESTS="tests/cookies_encryption tests/deny_writable tests/disable_function" - - TEST_PHP_ARGS='-q' REPORT_EXIT_STATUS=1 make -C src test TESTS="tests/dump_request tests/eval_blacklist tests/global_strict" - - TEST_PHP_ARGS='-q' REPORT_EXIT_STATUS=1 make -C src test TESTS="tests/harden_rand tests/sloppy_comparison" - - TEST_PHP_ARGS='-q' REPORT_EXIT_STATUS=1 make -C src test TESTS="tests/unserialize tests/xx tests/xxee" +testsuite:php7.1: + extends: .php7 + image: php:7.1 + +testsuite:php7.2: + extends: .php7 + image: php:7.2 + +testsuite:php7.3: + extends: .php7 + image: php:7.3 + +testsuite:php7.4: + extends: .php7 + image: php:7.3 + +testsuite:php8.0: + extends: .php8 + image: php:8.0 diff --git a/src/tests/deny_writable/deny_writable_execution_simulation.phpt b/src/tests/deny_writable/deny_writable_execution_simulation.phpt index 4352e77..30f8cb1 100644 --- a/src/tests/deny_writable/deny_writable_execution_simulation.phpt +++ b/src/tests/deny_writable/deny_writable_execution_simulation.phpt @@ -4,7 +4,6 @@ Readonly execution attempt (simulation mode) = 80000) print "skip"; ?> --INI-- sp.configuration_file={PWD}/config/config_disable_writable_simulation.ini +--XFAIL-- --FILE-- prev_execute_data; + } + EG(current_execute_data) = orig_execute_data; + + for (size_t i = 0; zones[i].str; i++) { zval* variable_value; zend_string* variable_key; diff --git a/src/tests/dump_request/config/dump_request.ini b/src/tests/dump_request/config/dump_request.ini index 974601d..734b718 100644 --- a/src/tests/dump_request/config/dump_request.ini +++ b/src/tests/dump_request/config/dump_request.ini @@ -1 +1,2 @@ sp.disable_function.function("system").drop().dump("/tmp/dump_result/").simulation(); +sp.disable_function.function("a").drop().dump("/tmp/dump_result/").simulation(); diff --git a/src/tests/dump_request/dump_eval_blacklist.phpt b/src/tests/dump_request/dump_eval_blacklist.phpt index 4a209f6..07c17f2 100644 --- a/src/tests/dump_request/dump_eval_blacklist.phpt +++ b/src/tests/dump_request/dump_eval_blacklist.phpt @@ -25,12 +25,12 @@ eval('$a = strtoupper("1234");'); echo "After eval: $a\n"; $filename = glob('/tmp/dump_result/sp_dump.*')[0]; $res = file($filename); -if ($res[2] != "GET:get_a='data_get_a' get_b='data_get_b' \n") { - echo "1\n"; -} elseif ($res[3] != "POST:post_a='data_post_a' post_b='data_post_b' \n") { - echo "2\n"; -} elseif ($res[4] != "COOKIE:cookie_a='data_cookie_a&cookie_b=data_cookie_b' \n") { - echo "3\n"; +if ($res[3] != "GET:get_a='data_get_a' get_b='data_get_b' \n") { + echo "Invalid GET"; +} elseif ($res[4] != "POST:post_a='data_post_a' post_b='data_post_b' \n") { + echo "Invalid POST"; +} elseif ($res[5] != "COOKIE:cookie_a='data_cookie_a&cookie_b=data_cookie_b' \n") { + echo "Invalid COOKIE"; } ?> --EXPECTF-- diff --git a/src/tests/dump_request/dump_eval_whitelist.phpt b/src/tests/dump_request/dump_eval_whitelist.phpt index cf696ad..09f5523 100644 --- a/src/tests/dump_request/dump_eval_whitelist.phpt +++ b/src/tests/dump_request/dump_eval_whitelist.phpt @@ -35,12 +35,12 @@ eval('$a = my_other_fun("1234");'); echo "After eval: $a\n"; $filename = glob('/tmp/dump_result/sp_dump.*')[0]; $res = file($filename); -if ($res[2] != "GET:get_a='data_get_a' get_b='data_get_b' \n") { - echo "1\n"; -} elseif ($res[3] != "POST:post_a='data_post_a' post_b='data_post_b' \n") { - echo "2\n"; -} elseif ($res[4] != "COOKIE:cookie_a='data_cookie_a&cookie_b=data_cookie_b' \n") { - echo "3\n"; +if ($res[3] != "GET:get_a='data_get_a' get_b='data_get_b' \n") { + echo "Invalid GETn"; +} elseif ($res[4] != "POST:post_a='data_post_a' post_b='data_post_b' \n") { + echo "Invalid POST\n"; +} elseif ($res[5] != "COOKIE:cookie_a='data_cookie_a&cookie_b=data_cookie_b' \n") { + echo "Invalid COOKIE\n"; } ?> diff --git a/src/tests/dump_request/dump_request.phpt b/src/tests/dump_request/dump_request.phpt index d177445..d18580b 100644 --- a/src/tests/dump_request/dump_request.phpt +++ b/src/tests/dump_request/dump_request.phpt @@ -29,12 +29,12 @@ echo "1\n"; system("echo 1337;"); $filename = glob('/tmp/dump_result/sp_dump.*')[0]; $res = file($filename); -if ($res[2] != "GET:get_a='data_get_a' get_b='data_get_b' \n") { - echo "1\n"; -} elseif ($res[3] != "POST:post_a='data_post_a' post_b='data_post_b' \n") { - echo "2\n"; -} elseif ($res[4] != "COOKIE:cookie_a='data_cookie_a&cookie_b=data_cookie_b' \n") { - echo "3\n"; +if ($res[3] != "GET:get_a='data_get_a' get_b='data_get_b' \n") { + echo "Invalid GET"; +} elseif ($res[4] != "POST:post_a='data_post_a' post_b='data_post_b' \n") { + echo "Invalid POST"; +} elseif ($res[5] != "COOKIE:cookie_a='data_cookie_a&cookie_b=data_cookie_b' \n") { + echo "Invalid COOKIE"; } ?> --EXPECTF-- diff --git a/src/tests/dump_request/dump_request_stacktrace.phpt b/src/tests/dump_request/dump_request_stacktrace.phpt new file mode 100644 index 0000000..0a8b94e --- /dev/null +++ b/src/tests/dump_request/dump_request_stacktrace.phpt @@ -0,0 +1,58 @@ +--TEST-- +Dump request +--SKIPIF-- + +--POST-- +post_a=data_post_a&post_b=data_post_b +--GET-- +get_a=data_get_a&get_b=data_get_b +--COOKIE-- +cookie_a=data_cookie_a&cookie_b=data_cookie_b +--INI-- +sp.configuration_file={PWD}/config/dump_request.ini +--FILE-- + +--EXPECTF-- +1 + +Warning: [snuffleupagus][0.0.0.0][disabled_function][simulation] Aborted execution on call of the function 'a' in %a/dump_request_stacktrace.php on line 7 +a diff --git a/src/tests/dump_request/dump_request_too_big.phpt b/src/tests/dump_request/dump_request_too_big.phpt index be5d370..e82ddc4 100644 --- a/src/tests/dump_request/dump_request_too_big.phpt +++ b/src/tests/dump_request/dump_request_too_big.phpt @@ -29,12 +29,12 @@ echo "1\n"; system("echo 1337;"); $filename = glob('/tmp/dump_result/*')[0]; $res = file($filename); -if ($res[2] != "GET:get_a='data_get_a' get_b='data_get_b' get_c='aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa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aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaBBBB' \n") { + echo "Invalid GET"; +} elseif ($res[4] != "POST:post_a='data_post_a' post_b='data_post_b' post_c='c' \n") { + echo "Invalid POST"; +} elseif ($res[5] != "COOKIE:cookie_a='data_cookie_a&cookie_b=data_cookie_b&data_cookie_c=cookie_c' \n") { + echo "Invalid COOKIE"; } ?> --EXPECTF-- diff --git a/src/tests/unserialize/dump_unserialize.phpt b/src/tests/unserialize/dump_unserialize.phpt index 6a61297..1ef8dcb 100644 --- a/src/tests/unserialize/dump_unserialize.phpt +++ b/src/tests/unserialize/dump_unserialize.phpt @@ -25,12 +25,12 @@ echo "1\n"; var_dump(unserialize('s:1:"a";alyualskdufyhalkdjsfhalkjdhflaksjdfhlkasdhflkahdawkuerylksjdfhlkssjgdflaksjdhflkasjdf')); $filename = glob('/tmp/dump_result/sp_dump.*')[0]; $res = file($filename); -if ($res[2] != "GET:get_a='data_get_a' get_b='data_get_b' \n") { - echo "1\n"; -} elseif ($res[3] != "POST:post_a='data_post_a' post_b='data_post_b' \n") { - echo "2\n"; -} elseif ($res[4] != "COOKIE:cookie_a='data_cookie_a&cookie_b=data_cookie_b' \n") { - echo "3\n"; +if ($res[3] != "GET:get_a='data_get_a' get_b='data_get_b' \n") { + echo "Invalid GET\n"; +} elseif ($res[4] != "POST:post_a='data_post_a' post_b='data_post_b' \n") { + echo "Invalid POST\n"; +} elseif ($res[5] != "COOKIE:cookie_a='data_cookie_a&cookie_b=data_cookie_b' \n") { + echo "Invalid COOKIE\n"; } ?> --EXPECTF-- -- cgit v1.3 From fb4e6f5fe0f1424db610b7dd563853a5d9a707ab Mon Sep 17 00:00:00 2001 From: jvoisin Date: Sat, 2 Jan 2021 18:18:58 +0100 Subject: Do a clang-format pass --- src/sp_utils.c | 21 ++++++++++----------- 1 file changed, 10 insertions(+), 11 deletions(-) (limited to 'src') diff --git a/src/sp_utils.c b/src/sp_utils.c index 8550168..147cc46 100644 --- a/src/sp_utils.c +++ b/src/sp_utils.c @@ -166,20 +166,19 @@ int sp_log_request(const zend_string* restrict folder, fprintf(file, "FILE: %s:%d\n", current_filename, current_line); - - zend_execute_data *orig_execute_data = EG(current_execute_data); - zend_execute_data *current = EG(current_execute_data); - while (current) { + zend_execute_data* orig_execute_data = EG(current_execute_data); + zend_execute_data* current = EG(current_execute_data); + while (current) { EG(current_execute_data) = current; char* const complete_path_function = get_complete_function_path(current); - if (complete_path_function) { - const int current_line = zend_get_executed_lineno(TSRMLS_C); - fprintf(file, "STACKTRACE: %s:%d\n", complete_path_function, current_line); - } + if (complete_path_function) { + const int current_line = zend_get_executed_lineno(TSRMLS_C); + fprintf(file, "STACKTRACE: %s:%d\n", complete_path_function, + current_line); + } current = current->prev_execute_data; - } - EG(current_execute_data) = orig_execute_data; - + } + EG(current_execute_data) = orig_execute_data; for (size_t i = 0; zones[i].str; i++) { zval* variable_value; -- cgit v1.3 From 047b2d08a5d01c2c8654f16fb97bb99d0b25052b Mon Sep 17 00:00:00 2001 From: jvoisin Date: Sat, 2 Jan 2021 19:22:07 +0100 Subject: Bump the changelog --- debian/changelog | 10 +++++++++- doc/source/changelog.rst | 21 +++++++++++++++++++++ src/php_snuffleupagus.h | 2 +- 3 files changed, 31 insertions(+), 2 deletions(-) (limited to 'src') diff --git a/debian/changelog b/debian/changelog index 3177034..d0ab5e0 100644 --- a/debian/changelog +++ b/debian/changelog @@ -1,3 +1,12 @@ +snuffleupagus (0.7.0) UNRELEASED; urgency=medium + [ jvoisin ] + * PHP8 support + * Stacktraces in dumps + * The `>` operator skips over functions + * PCRE2 is used when possible + * The `generate_rules.php` script is now more portable + * The strict mode is now disableable + snuffleupagus (0.6.0) UNRELEASED; urgency=medium [ jvoisin ] @@ -12,7 +21,6 @@ snuffleupagus (0.6.0) UNRELEASED; urgency=medium -- jvoisin Fri, 06 Nov 2020 17:45:00 +0200 - snuffleupagus (0.5.1) UNRELEASED; urgency=medium [ jvoisin ] diff --git a/doc/source/changelog.rst b/doc/source/changelog.rst index b4b87b8..307c92c 100644 --- a/doc/source/changelog.rst +++ b/doc/source/changelog.rst @@ -1,6 +1,27 @@ Changelog ========= +0.7.0 - `Los Elefantes `__ 2021/01/02 +---------------------------------------------------------------------------------------------------------- + +New features +^^^^^^^^^^^^ +* PHP8 support +* Stacktraces in dumps +* The ``>`` operator now skips over functions + +Improvements +^^^^^^^^^^^^ +* Move the CI from travis to gitlab-ci +* Some code simplifications and constifications +* PCRE2 is now used when possible +* The ``generate_rules.php`` script is now more portable + +Bug fixes +^^^^^^^^^ +* The strict mode is now disableable + + 0.6.0 - `Elephant in the room `__ 2020/11/06 ---------------------------------------------------------------------------------------------------------- diff --git a/src/php_snuffleupagus.h b/src/php_snuffleupagus.h index 02b464e..dc0a471 100644 --- a/src/php_snuffleupagus.h +++ b/src/php_snuffleupagus.h @@ -1,7 +1,7 @@ #ifndef PHP_SNUFFLEUPAGUS_H #define PHP_SNUFFLEUPAGUS_H -#define PHP_SNUFFLEUPAGUS_VERSION "0.6.0" +#define PHP_SNUFFLEUPAGUS_VERSION "0.7.0" #define PHP_SNUFFLEUPAGUS_EXTNAME "snuffleupagus" #define PHP_SNUFFLEUPAGUS_AUTHOR "NBS System & Julien (jvoisin) Voisin" #define PHP_SNUFFLEUPAGUS_URL "https://github.com/jvoisin/snuffleupagus" -- cgit v1.3 From 3c528d9d03cec872382a6f400b5701a8fbfd59b4 Mon Sep 17 00:00:00 2001 From: jvoisin Date: Sun, 3 Jan 2021 14:12:54 +0100 Subject: Don't check for bundled pcre in php8 Patch coming from https://gitlab.alpinelinux.org/alpine/aports/-/merge_requests/16372/diffs#diff-content-c2549fd272f686fb013e5c74164615ca073560bb --- src/php_snuffleupagus.h | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) (limited to 'src') diff --git a/src/php_snuffleupagus.h b/src/php_snuffleupagus.h index dc0a471..248045c 100644 --- a/src/php_snuffleupagus.h +++ b/src/php_snuffleupagus.h @@ -45,9 +45,6 @@ #include "zend_vm.h" /* Compatibility */ -#if ( !HAVE_PCRE && !HAVE_BUNDLED_PCRE ) -#error Snuffleupagus requires PHP7+ with PCRE support -#endif #if PHP_VERSION_ID < 70000 #error Snuffleupagus only works with PHP7+. You shouldn't use PHP5 anyway, \ since it's not supported anymore: https://secure.php.net/supported-versions.php @@ -58,6 +55,10 @@ typedef void (*zif_handler)(INTERNAL_FUNCTION_PARAMETERS); #if PHP_VERSION_ID >= 80000 #define TSRMLS_FETCH() #define TSRMLS_C +#else +#if ( !HAVE_PCRE && !HAVE_BUNDLED_PCRE ) +#error Snuffleupagus requires PHP7+ with PCRE support +#endif #endif #define SP_CONFIG_VALID 1 -- cgit v1.3 From 1e8e75b554955cc59866a41bb32853a96e8e83ae Mon Sep 17 00:00:00 2001 From: Sylvain "caillou" Lefevre Date: Sun, 3 Jan 2021 20:40:37 +0100 Subject: Don't fallback to local variables when unable to get function parameter --- src/sp_var_value.c | 11 +++-------- 1 file changed, 3 insertions(+), 8 deletions(-) (limited to 'src') diff --git a/src/sp_var_value.c b/src/sp_var_value.c index 8109377..986ea2d 100644 --- a/src/sp_var_value.c +++ b/src/sp_var_value.c @@ -51,7 +51,6 @@ static zval *get_local_var(zend_execute_data *ed, const char *var_name) { static zval *get_constant(const char *value) { zend_string *name = zend_string_init(value, strlen(value), 0); zval *zvalue = zend_get_constant_ex(name, NULL, ZEND_FETCH_CLASS_SILENT); - zend_string_release(name); return zvalue; } @@ -69,14 +68,10 @@ static zval *get_var_value(zend_execute_data *ed, const char *var_name, } if (is_param) { - zval *zvalue = get_param_var(ed, var_name); - if (!zvalue) { - return get_local_var(ed, var_name); - } - return zvalue; + return get_param_var(ed, var_name); + } else { + return get_local_var(ed, var_name); } - - return get_local_var(ed, var_name); } static void *get_entry_hashtable(const HashTable *ht, const char *entry, -- cgit v1.3 From 48f927e9694fcfd76d9fe97542359c8b0bd0a46d Mon Sep 17 00:00:00 2001 From: Remi Collet Date: Mon, 4 Jan 2021 19:32:08 +0100 Subject: Fix #368 build with system libpcre --- src/sp_pcre_compat.c | 4 ++-- src/sp_pcre_compat.h | 3 --- 2 files changed, 2 insertions(+), 5 deletions(-) (limited to 'src') diff --git a/src/sp_pcre_compat.c b/src/sp_pcre_compat.c index b4d29f0..283eeb7 100644 --- a/src/sp_pcre_compat.c +++ b/src/sp_pcre_compat.c @@ -15,7 +15,7 @@ sp_pcre* sp_pcre_compile(const char* const pattern) { const char* pcre_error = NULL; int erroroffset; ret = - php_pcre_compile(pattern, PCRE_CASELESS, &pcre_error, &erroroffset, NULL); + pcre_compile(pattern, PCRE_CASELESS, &pcre_error, &erroroffset, NULL); #endif if (NULL == ret) { @@ -38,7 +38,7 @@ bool ZEND_HOT sp_is_regexp_matching_len(const sp_pcre* regexp, const char* str, ret = pcre2_match(regexp, (PCRE2_SPTR)str, len, 0, 0, match_data, NULL); #else int vec[30]; - ret = php_pcre_exec(regexp, NULL, str, len, 0, 0, vec, + ret = pcre_exec(regexp, NULL, str, len, 0, 0, vec, sizeof(vec) / sizeof(int)); #endif diff --git a/src/sp_pcre_compat.h b/src/sp_pcre_compat.h index 11f7f7c..14c33b2 100644 --- a/src/sp_pcre_compat.h +++ b/src/sp_pcre_compat.h @@ -4,9 +4,6 @@ #include #include -#undef pcre_exec -#undef pcre_compile - #define PCRE2_CODE_UNIT_WIDTH 8 #if PHP_VERSION_ID >= 70300 #define SP_HAS_PCRE2 -- cgit v1.3 From f4e3a800aa5a243464911fc2e9fa81a7848c57f7 Mon Sep 17 00:00:00 2001 From: xXx-caillou-xXx Date: Sun, 3 Jan 2021 00:11:09 +0100 Subject: Add a check on parameters names Snuffleupagus will now warn when a particular function doesn't have the expected parameters configuration-wise. --- src/sp_pcre_compat.c | 6 ++---- src/sp_var_value.c | 13 ++++++++++++- .../broken_conf_config_invalid_param.phpt | 16 ++++++++++++++++ .../config/broken_conf_config_invalid_param.ini | 1 + .../config/config_disabled_functions_param_array.ini | 1 - 5 files changed, 31 insertions(+), 6 deletions(-) create mode 100644 src/tests/broken_configuration/broken_conf_config_invalid_param.phpt create mode 100644 src/tests/broken_configuration/config/broken_conf_config_invalid_param.ini (limited to 'src') diff --git a/src/sp_pcre_compat.c b/src/sp_pcre_compat.c index 283eeb7..509a8ea 100644 --- a/src/sp_pcre_compat.c +++ b/src/sp_pcre_compat.c @@ -14,8 +14,7 @@ sp_pcre* sp_pcre_compile(const char* const pattern) { #else const char* pcre_error = NULL; int erroroffset; - ret = - pcre_compile(pattern, PCRE_CASELESS, &pcre_error, &erroroffset, NULL); + ret = pcre_compile(pattern, PCRE_CASELESS, &pcre_error, &erroroffset, NULL); #endif if (NULL == ret) { @@ -38,8 +37,7 @@ bool ZEND_HOT sp_is_regexp_matching_len(const sp_pcre* regexp, const char* str, ret = pcre2_match(regexp, (PCRE2_SPTR)str, len, 0, 0, match_data, NULL); #else int vec[30]; - ret = pcre_exec(regexp, NULL, str, len, 0, 0, vec, - sizeof(vec) / sizeof(int)); + ret = pcre_exec(regexp, NULL, str, len, 0, 0, vec, sizeof(vec) / sizeof(int)); #endif if (ret < 0) { diff --git a/src/sp_var_value.c b/src/sp_var_value.c index 986ea2d..126ba0e 100644 --- a/src/sp_var_value.c +++ b/src/sp_var_value.c @@ -68,7 +68,18 @@ static zval *get_var_value(zend_execute_data *ed, const char *var_name, } if (is_param) { - return get_param_var(ed, var_name); + zval *zvalue = get_param_var(ed, var_name); + if (!zvalue) { + const char *complete_function_path = get_complete_function_path(ed); + sp_log_warn("config", + "It seems that you are filtering on a parameter " + "'%s' of the function '%s', but the parameter does " + "not exists.", + var_name, complete_function_path); + efree(complete_function_path); + return NULL; + } + return zvalue; } else { return get_local_var(ed, var_name); } diff --git a/src/tests/broken_configuration/broken_conf_config_invalid_param.phpt b/src/tests/broken_configuration/broken_conf_config_invalid_param.phpt new file mode 100644 index 0000000..ac85dea --- /dev/null +++ b/src/tests/broken_configuration/broken_conf_config_invalid_param.phpt @@ -0,0 +1,16 @@ +--TEST-- +Broken configuration with invalid parameter warning +--SKIPIF-- + +--INI-- +sp.configuration_file={PWD}/config/broken_conf_config_invalid_param.ini +--FILE-- + += 80000) print "skip"; ?> --INI-- sp.configuration_file={PWD}/config/config_disabled_functions_param_str_representation.ini --FILE-- -- cgit v1.3 From 42c56b40233ed7c8da29a7ae54631bc7e651b639 Mon Sep 17 00:00:00 2001 From: jvoisin Date: Tue, 5 Jan 2021 19:43:50 +0100 Subject: Fix a superfluous `const` --- src/sp_var_value.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'src') diff --git a/src/sp_var_value.c b/src/sp_var_value.c index 126ba0e..b9ac357 100644 --- a/src/sp_var_value.c +++ b/src/sp_var_value.c @@ -70,7 +70,7 @@ static zval *get_var_value(zend_execute_data *ed, const char *var_name, if (is_param) { zval *zvalue = get_param_var(ed, var_name); if (!zvalue) { - const char *complete_function_path = get_complete_function_path(ed); + char *complete_function_path = get_complete_function_path(ed); sp_log_warn("config", "It seems that you are filtering on a parameter " "'%s' of the function '%s', but the parameter does " -- cgit v1.3 From 467f965bf178b1c4d60ddac87af14718f6013bab Mon Sep 17 00:00:00 2001 From: jvoisin Date: Sat, 30 Jan 2021 21:19:29 +0100 Subject: Improve a bit type diversity --- src/sp_disabled_functions.c | 17 +++++++---------- src/sp_utils.c | 8 ++++---- src/sp_utils.h | 2 +- 3 files changed, 12 insertions(+), 15 deletions(-) (limited to 'src') diff --git a/src/sp_disabled_functions.c b/src/sp_disabled_functions.c index 41c9f23..6a559c8 100644 --- a/src/sp_disabled_functions.c +++ b/src/sp_disabled_functions.c @@ -532,13 +532,13 @@ static int hook_functions_regexp(const sp_list_node* config) { return SUCCESS; } -static int hook_functions(HashTable* to_hook_ht, HashTable* hooked_ht) { +static void hook_functions(HashTable* to_hook_ht, HashTable* hooked_ht) { zend_string* key; zval* value; ZEND_HASH_FOREACH_STR_KEY_VAL(to_hook_ht, key, value) { - bool hooked = !HOOK_FUNCTION(ZSTR_VAL(key), disabled_functions_hook, - PHP_FN(check_disabled_function)); + bool hooked = HOOK_FUNCTION(ZSTR_VAL(key), disabled_functions_hook, + PHP_FN(check_disabled_function)); bool is_builtin = check_is_builtin_name(((sp_list_node*)Z_PTR_P(value))->data); if (hooked || is_builtin) { @@ -547,7 +547,6 @@ static int hook_functions(HashTable* to_hook_ht, HashTable* hooked_ht) { } } ZEND_HASH_FOREACH_END(); - return SUCCESS; } ZEND_FUNCTION(eval_blacklist_callback) { @@ -595,13 +594,11 @@ int hook_disabled_functions(void) { int ret = SUCCESS; - ret |= - hook_functions(SNUFFLEUPAGUS_G(config).config_disabled_functions, - SNUFFLEUPAGUS_G(config).config_disabled_functions_hooked); + hook_functions(SNUFFLEUPAGUS_G(config).config_disabled_functions, + SNUFFLEUPAGUS_G(config).config_disabled_functions_hooked); - ret |= hook_functions( - SNUFFLEUPAGUS_G(config).config_disabled_functions_ret, - SNUFFLEUPAGUS_G(config).config_disabled_functions_ret_hooked); + hook_functions(SNUFFLEUPAGUS_G(config).config_disabled_functions_ret, + SNUFFLEUPAGUS_G(config).config_disabled_functions_ret_hooked); ret |= hook_functions_regexp( SNUFFLEUPAGUS_G(config) diff --git a/src/sp_utils.c b/src/sp_utils.c index 147cc46..a7a3d27 100644 --- a/src/sp_utils.c +++ b/src/sp_utils.c @@ -394,10 +394,10 @@ bool sp_match_array_value(const zval* arr, const zend_string* to_match, return false; } -int hook_function(const char* original_name, HashTable* hook_table, - zif_handler new_function) { +bool hook_function(const char* original_name, HashTable* hook_table, + zif_handler new_function) { zend_internal_function* func; - bool ret = FAILURE; + bool ret = false; /* The `mb` module likes to hook functions, like strlen->mb_strlen, * so we have to hook both of them. */ @@ -416,7 +416,7 @@ int hook_function(const char* original_name, HashTable* hook_table, // LCOV_EXCL_STOP } func->handler = new_function; - ret = SUCCESS; + ret = true; } } diff --git a/src/sp_utils.h b/src/sp_utils.h index a883d6d..081f786 100644 --- a/src/sp_utils.h +++ b/src/sp_utils.h @@ -72,7 +72,7 @@ void sp_log_disable(const char *restrict, const char *restrict, const zend_string *restrict, const sp_disabled_function *); void sp_log_disable_ret(const char *restrict, const zend_string *restrict, const sp_disabled_function *); -int hook_function(const char *, HashTable *, zif_handler); +bool hook_function(const char *, HashTable *, zif_handler); int hook_regexp(const sp_pcre *, HashTable *, zif_handler); bool check_is_in_eval_whitelist(const zend_string *const function_name); int sp_log_request(const zend_string *restrict folder, -- cgit v1.3 From e7de504856c4b6140c40b5e766459c7ed1f9e992 Mon Sep 17 00:00:00 2001 From: jvoisin Date: Sat, 30 Jan 2021 21:24:39 +0100 Subject: Improve a bit the typing of the parser Use enum members instead of their numbers directly. --- src/sp_var_parser.c | 22 ++++++++++++++-------- 1 file changed, 14 insertions(+), 8 deletions(-) (limited to 'src') diff --git a/src/sp_var_parser.c b/src/sp_var_parser.c index 1544030..b066b84 100644 --- a/src/sp_var_parser.c +++ b/src/sp_var_parser.c @@ -124,7 +124,7 @@ static int is_token_valid(sp_list_node *tokens_list, elem_type quote, } break; case ARRAY_END: - if (!quote) { + if (UNDEFINED == quote) { if (array_count < 1) { return -1; } else if (token_next) { @@ -138,7 +138,8 @@ static int is_token_valid(sp_list_node *tokens_list, elem_type quote, } break; case OBJECT: - if (!quote && -1 == is_next_token_empty(token, token_next, str)) { + if (UNDEFINED == quote && + -1 == is_next_token_empty(token, token_next, str)) { return -1; } if (pos == 0 && *str != VARIABLE_TOKEN) { @@ -146,7 +147,8 @@ static int is_token_valid(sp_list_node *tokens_list, elem_type quote, } break; case CLASS: - if (!quote && -1 == is_next_token_empty(token, token_next, str)) { + if (UNDEFINED == quote && + -1 == is_next_token_empty(token, token_next, str)) { return -1; } break; @@ -160,7 +162,7 @@ static sp_tree *parse_tokens(const char *restrict str, sp_list_node *tokens_list) { size_t pos = 0; int array_count = 0, pos_idx_start = -1; - elem_type quote = 0; + elem_type quote = UNDEFINED; sp_tree *tree = sp_tree_new(); for (; tokens_list && tokens_list->data; tokens_list = tokens_list->next) { @@ -173,11 +175,15 @@ static sp_tree *parse_tokens(const char *restrict str, goto error; } if (token->type == INTERPRETED_STRING || token->type == LITERAL_STRING) { - pos = (!quote && !array_count) ? pos + strlen(token->text_repr) : pos; - quote = (!quote) ? token->type : (quote == token->type) ? 0 : quote; + pos = (UNDEFINED == quote && !array_count) + ? pos + strlen(token->text_repr) + : pos; + quote = (UNDEFINED == quote) ? token->type + : (quote == token->type) ? 0 + : quote; token->type = INTERPRETED_STRING; } - if (quote == 0) { + if (UNDEFINED == quote) { if (token->type == ARRAY) { pos_idx_start = (array_count) ? pos_idx_start @@ -210,7 +216,7 @@ static sp_tree *parse_tokens(const char *restrict str, sp_log_err("config", "You forgot to close a bracket."); goto error; } - if (quote != 0) { + if (quote != UNDEFINED) { sp_log_err("config", "Missing a closing quote."); error: sp_tree_free(tree); -- cgit v1.3