From aa5d6895d0ac8c6ea050a8ea55e2f8a39ddfe365 Mon Sep 17 00:00:00 2001 From: xXx-caillou-xXx Date: Tue, 28 Aug 2018 14:24:29 +0200 Subject: [PATCH] Use php's logging functions This commit replace our usage of `php_log_err` with `zend_error`. This should allow administrators to display errors in the webpage, should they want to; and to properly manipulate the verbosity's level. This should close #217 --- src/sp_config.c | 10 +-- src/sp_config_keywords.c | 62 ++++++------- src/sp_config_utils.c | 6 +- src/sp_crypt.c | 12 +-- src/sp_disabled_functions.c | 13 +-- src/sp_pcre_compat.c | 4 +- src/sp_upload_validation.c | 4 +- src/sp_utils.c | 86 ++++++++----------- src/sp_utils.h | 15 ++-- src/tests/broken_conf.phpt | 3 +- src/tests/broken_conf2.phpt | 4 +- src/tests/broken_conf_config_regexp.phpt | 8 +- ...n_conf_config_regexp_no_closing_paren.phpt | 8 +- .../broken_conf_cookie_name_and_regexp.phpt | 4 +- src/tests/broken_conf_enable_disable.phpt | 4 +- src/tests/broken_conf_eval.phpt | 4 +- src/tests/broken_conf_expecting_bool.phpt | 4 +- src/tests/broken_conf_invalid_cidr.phpt | 4 +- src/tests/broken_conf_invalid_cidr6.phpt | 4 +- .../broken_conf_invalid_cidr6_no_slash.phpt | 4 +- src/tests/broken_conf_invalid_cidr_value.phpt | 8 +- src/tests/broken_conf_invalid_filename.phpt | 4 +- src/tests/broken_conf_invalid_type.phpt | 4 +- src/tests/broken_conf_key_value.phpt | 4 +- src/tests/broken_conf_line_empty_string.phpt | 4 +- src/tests/broken_conf_line_no_closing.phpt | 4 +- src/tests/broken_conf_local_var_1.phpt | 8 +- src/tests/broken_conf_local_var_10.phpt | 8 +- src/tests/broken_conf_local_var_11.phpt | 8 +- src/tests/broken_conf_local_var_12.phpt | 4 +- src/tests/broken_conf_local_var_13.phpt | 8 +- src/tests/broken_conf_local_var_14.phpt | 8 +- src/tests/broken_conf_local_var_15.phpt | 8 +- src/tests/broken_conf_local_var_16.phpt | 8 +- src/tests/broken_conf_local_var_2.phpt | 8 +- src/tests/broken_conf_local_var_3.phpt | 8 +- src/tests/broken_conf_local_var_4.phpt | 8 +- src/tests/broken_conf_local_var_5.phpt | 8 +- src/tests/broken_conf_local_var_6.phpt | 8 +- src/tests/broken_conf_local_var_7.phpt | 8 +- src/tests/broken_conf_local_var_8.phpt | 8 +- src/tests/broken_conf_local_var_9.phpt | 8 +- src/tests/broken_conf_lots_of_quotes.phpt | 4 +- src/tests/broken_conf_missing_script.phpt | 6 +- src/tests/broken_conf_mutually_exclusive.phpt | 4 +- .../broken_conf_mutually_exclusive10.phpt | 4 +- .../broken_conf_mutually_exclusive2.phpt | 4 +- .../broken_conf_mutually_exclusive3.phpt | 4 +- .../broken_conf_mutually_exclusive4.phpt | 4 +- .../broken_conf_mutually_exclusive5.phpt | 4 +- .../broken_conf_mutually_exclusive6.phpt | 4 +- .../broken_conf_mutually_exclusive7.phpt | 4 +- .../broken_conf_mutually_exclusive8.phpt | 4 +- .../broken_conf_mutually_exclusive9.phpt | 4 +- src/tests/broken_conf_no_cookie_action.phpt | 4 +- src/tests/broken_conf_no_cookie_name.phpt | 4 +- src/tests/broken_conf_nonexisting_script.phpt | 6 +- src/tests/broken_conf_quotes.phpt | 8 +- src/tests/broken_conf_readonly_exec.phpt | 6 +- src/tests/broken_conf_samesite.phpt | 4 +- src/tests/broken_conf_shown_in_phpinfo.phpt | 8 +- src/tests/broken_conf_truncated.phpt | 4 +- src/tests/broken_conf_unserialize.phpt | 6 +- src/tests/broken_conf_upload_validation.phpt | 6 +- src/tests/broken_conf_weird_keyword.phpt | 4 +- src/tests/broken_conf_wrong_quotes.phpt | 4 +- src/tests/broken_conf_wrong_type.phpt | 4 +- src/tests/broken_invalid_client_ip4.phpt | 5 +- src/tests/broken_regexp.phpt | 8 +- src/tests/broken_unmatching_brackets.phpt | 8 +- src/tests/crypt_session_invalid.phpt | 2 +- src/tests/deny_writable_execution.phpt | 4 +- .../deny_writable_execution_disabled.phpt | 2 +- .../deny_writable_execution_simulation.phpt | 12 ++- src/tests/disabled_function_echo.phpt | 3 +- src/tests/disabled_function_echo_2.phpt | 3 +- .../disabled_function_echo_local_var.phpt | 3 +- src/tests/disabled_function_local_var.phpt | 3 +- src/tests/disabled_function_local_var_10.phpt | 3 +- src/tests/disabled_function_local_var_2.phpt | 3 +- src/tests/disabled_function_local_var_3.phpt | 3 +- src/tests/disabled_function_local_var_4.phpt | 3 +- src/tests/disabled_function_local_var_5.phpt | 3 +- src/tests/disabled_function_local_var_6.phpt | 3 +- src/tests/disabled_function_local_var_7.phpt | 3 +- src/tests/disabled_function_local_var_8.phpt | 3 +- src/tests/disabled_function_local_var_9.phpt | 3 +- .../disabled_function_local_var_const.phpt | 2 +- .../disabled_function_local_var_obj.phpt | 3 +- src/tests/disabled_function_param.phpt | 3 +- src/tests/disabled_function_print.phpt | 3 +- .../disabled_function_super_global_var.phpt | 3 +- src/tests/disabled_functions.phpt | 3 +- ...bled_functions_callback_called_file_r.phpt | 4 +- .../disabled_functions_called_file_r.phpt | 4 +- src/tests/disabled_functions_chain.phpt | 3 +- ...sabled_functions_chain_call_user_func.phpt | 3 +- ...ed_functions_chain_call_user_func_ret.phpt | 2 +- src/tests/disabled_functions_cidr.phpt | 2 +- src/tests/disabled_functions_cidr_6.phpt | 2 +- src/tests/disabled_functions_die.phpt | 4 +- src/tests/disabled_functions_eval.phpt | 2 +- .../disabled_functions_eval_filename.phpt | 2 +- .../disabled_functions_eval_simulation.phpt | 4 +- src/tests/disabled_functions_eval_user.phpt | 2 +- src/tests/disabled_functions_exit.phpt | 4 +- src/tests/disabled_functions_filename_r.phpt | 3 +- .../disabled_functions_include_once.phpt | 11 +-- ...disabled_functions_include_simulation.phpt | 11 +-- .../disabled_functions_local_var_array.phpt | 3 +- ...isabled_functions_local_var_array_key.phpt | 3 +- src/tests/disabled_functions_mb.phpt | 2 +- src/tests/disabled_functions_method.phpt | 2 +- src/tests/disabled_functions_name_r.phpt | 3 +- .../disabled_functions_name_regexp_type.phpt | 3 +- src/tests/disabled_functions_name_type.phpt | 3 +- src/tests/disabled_functions_namespace.phpt | 2 +- src/tests/disabled_functions_nul_byte.phpt | 2 +- src/tests/disabled_functions_param.phpt | 2 +- src/tests/disabled_functions_param_alias.phpt | 2 +- src/tests/disabled_functions_param_allow.phpt | 3 +- src/tests/disabled_functions_param_array.phpt | 3 +- .../disabled_functions_param_array_deref.phpt | 3 +- ...sabled_functions_param_array_no_value.phpt | 3 +- .../disabled_functions_param_array_r.phpt | 3 +- ...disabled_functions_param_array_r_keys.phpt | 3 +- ..._functions_param_array_several_levels.phpt | 3 +- ...ctions_param_array_several_levels_int.phpt | 3 +- ...tions_param_array_several_levels_keys.phpt | 3 +- ...s_param_array_several_levels_keys_int.phpt | 3 +- .../disabled_functions_param_broken_line.phpt | 6 +- src/tests/disabled_functions_param_int.phpt | 3 +- .../disabled_functions_param_invalid_pos.phpt | 5 +- src/tests/disabled_functions_param_line.phpt | 3 +- src/tests/disabled_functions_param_pos.phpt | 5 +- src/tests/disabled_functions_param_pos2.phpt | 2 +- src/tests/disabled_functions_param_r.phpt | 2 +- src/tests/disabled_functions_pos_type.phpt | 8 +- .../disabled_functions_regexp_multiple.phpt | 7 +- ..._functions_register_shutdown_function.phpt | 3 +- ...bled_functions_register_tick_function.phpt | 3 +- src/tests/disabled_functions_require.phpt | 5 +- .../disabled_functions_require_once.phpt | 5 +- ...disabled_functions_require_simulation.phpt | 11 +-- src/tests/disabled_functions_ret.phpt | 2 +- src/tests/disabled_functions_ret2.phpt | 2 +- src/tests/disabled_functions_ret3.phpt | 3 +- .../disabled_functions_ret_right_hash.phpt | 3 +- .../disabled_functions_ret_simulation.phpt | 8 +- src/tests/disabled_functions_ret_type.phpt | 3 +- .../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 | 3 +- src/tests/disabled_functions_ret_val.phpt | 3 +- .../disabled_functions_ret_val_dump.phpt | 3 +- src/tests/disabled_functions_ret_val_rx.phpt | 3 +- src/tests/disabled_functions_runtime.phpt | 7 +- src/tests/disabled_functions_upper.phpt | 2 +- src/tests/disabled_functions_variadic.phpt | 5 +- src/tests/disabled_functions_zero_cidr.phpt | 2 +- .../disabled_native_functions_indirect.phpt | 2 +- src/tests/disabled_user_functions.phpt | 2 +- .../disabled_user_functions_indirect.phpt | 2 +- src/tests/dump_eval_blacklist.phpt | 5 +- src/tests/dump_eval_whitelist.phpt | 3 +- src/tests/dump_request.phpt | 5 +- src/tests/dump_request_invalid_folder.phpt | 6 +- src/tests/dump_request_too_big.phpt | 3 +- src/tests/dump_segfault1.phpt | 3 +- src/tests/dump_unserialize.phpt | 4 +- src/tests/encrypt_cookies_empty_env.phpt | 4 +- .../encrypt_cookies_invalid_decryption.phpt | 6 +- .../encrypt_cookies_invalid_decryption2.phpt | 6 +- ...okies_invalid_decryption_short_cookie.phpt | 3 +- ...cookies_invalid_decryption_simulation.phpt | 3 +- src/tests/encrypt_cookies_no_env.phpt | 3 +- src/tests/encrypt_cookies_no_key.phpt | 3 +- .../encrypt_regexp_cookies_empty_env.phpt | 2 +- ...ypt_regexp_cookies_invalid_decryption.phpt | 6 +- ...pt_regexp_cookies_invalid_decryption2.phpt | 6 +- src/tests/encrypt_regexp_cookies_no_env.phpt | 3 +- src/tests/encrypt_regexp_cookies_no_key.phpt | 3 +- src/tests/eval_backlist.phpt | 3 +- src/tests/eval_backlist_list.phpt | 3 +- src/tests/eval_backlist_simulation.phpt | 5 +- src/tests/eval_backlist_whitelist.phpt | 3 +- .../eval_backlist_whitelist_builtin.phpt | 3 +- src/tests/eval_whitelist.phpt | 3 +- src/tests/eval_whitelist_builtin.phpt | 3 +- .../eval_whitelist_include_then_user.phpt | 3 +- src/tests/eval_whitelist_simulation.phpt | 3 +- .../eval_whitelist_user_then_builtin.phpt | 3 +- src/tests/glob_config.phpt | 6 +- src/tests/inexistent_conf_file.phpt | 4 +- src/tests/inexistent_conf_file_list.phpt | 4 +- src/tests/multi_config.phpt | 6 +- src/tests/nested_eval_blacklist.phpt | 3 +- src/tests/nested_eval_blacklist2.phpt | 3 +- src/tests/noncore_function_hooking.phpt | 2 +- src/tests/unserialize_fail.phpt | 10 +-- src/tests/unserialize_sim.phpt | 5 +- src/tests/upload_validation.phpt | 1 + src/tests/upload_validation_invalid.phpt | 8 +- src/tests/upload_validation_ko.phpt | 2 +- .../upload_validation_ko_simulation.phpt | 3 +- src/tests/upload_validation_no_exec.phpt | 3 +- src/tests/upload_validation_real.phpt | 3 +- 212 files changed, 638 insertions(+), 421 deletions(-) diff --git a/src/sp_config.c b/src/sp_config.c index e5cb3ced..24803620 100644 --- a/src/sp_config.c +++ b/src/sp_config.c @@ -40,7 +40,7 @@ static int parse_line(char *line) { } if (strncmp(ptr, SP_TOKEN_BASE, strlen(SP_TOKEN_BASE))) { - sp_log_err("config", "Invalid configuration prefix for '%s' on line %zu.", + sp_log_err("config", "Invalid configuration prefix for '%s' on line %zu", line, sp_line_no); return -1; } @@ -51,7 +51,7 @@ static int parse_line(char *line) { return sp_func[i].func(ptr + strlen(sp_func[i].token)); } } - sp_log_err("config", "Invalid configuration section '%s' on line %zu.", line, + sp_log_err("config", "Invalid configuration section '%s' on line %zu", line, sp_line_no); return -1; } @@ -114,7 +114,7 @@ int parse_php_type(char *restrict line, char *restrict keyword, void *retval) { "%s) is expecting a valid php type ('false', 'true'," " 'array'. 'object', 'long', 'double', 'null', 'resource', " "'reference'," - " 'undef') on line %zu.", + " 'undef') on line %zu", keyword, sp_line_no); return -1; } @@ -149,7 +149,7 @@ int parse_cidr(char *restrict line, char *restrict keyword, void *retval) { *(sp_cidr **)retval = cidr; return consumed; } else { - sp_log_err("config", "%s doesn't contain a valid cidr on line %zu.", line, + sp_log_err("config", "%s doesn't contain a valid cidr on line %zu", line, sp_line_no); return -1; } @@ -174,7 +174,7 @@ int parse_regexp(char *restrict line, char *restrict keyword, void *retval) { closing_paren[0] = '\0'; } sp_log_err("config", - "'%s)' is expecting a valid regexp, and not '%s' on line %zu.", + "'%s)' is expecting a valid regexp, and not '%s' on line %zu", keyword, line, sp_line_no); return -1; } diff --git a/src/sp_config_keywords.c b/src/sp_config_keywords.c index b86b9d9a..13a2f89f 100644 --- a/src/sp_config_keywords.c +++ b/src/sp_config_keywords.c @@ -19,7 +19,7 @@ static int parse_enable(char *line, bool *restrict retval, } if (!(enable ^ disable)) { - sp_log_err("config", "A rule can't be enabled and disabled on line %zu.", + sp_log_err("config", "A rule can't be enabled and disabled on line %zu", sp_line_no); return -1; } @@ -44,9 +44,9 @@ int parse_session(char *line) { if (0 == (SNUFFLEUPAGUS_G(config).config_snuffleupagus->cookies_env_var)) { sp_log_err( "config", - "You're trying to use the session cookie encryption feature" + "You're trying to use the session cookie encryption feature " "on line %zu without having set the `.cookie_env_var` option in" - "`sp.global`: please set it first.", + "`sp.global`: please set it first", sp_line_no); pefree(session, 0); return -1; @@ -54,9 +54,9 @@ int parse_session(char *line) { (SNUFFLEUPAGUS_G(config).config_snuffleupagus->encryption_key)) { sp_log_err( "config", - "You're trying to use the session cookie encryption feature" + "You're trying to use the session cookie encryption feature " "on line %zu without having set the `.encryption_key` option in" - "`sp.global`: please set it first.", + "`sp.global`: please set it first", sp_line_no); pefree(session, 0); return -1; @@ -114,7 +114,7 @@ int parse_unserialize(char *line) { } if (!(enable ^ disable)) { - sp_log_err("config", "A rule can't be enabled and disabled on line %zu.", + sp_log_err("config", "A rule can't be enabled and disabled on line %zu", sp_line_no); return -1; } @@ -145,7 +145,7 @@ int parse_readonly_exec(char *line) { } if (!(enable ^ disable)) { - sp_log_err("config", "A rule can't be enabled and disabled on line %zu.", + sp_log_err("config", "A rule can't be enabled and disabled on line %zu", sp_line_no); return -1; } @@ -236,7 +236,7 @@ int parse_cookie(char *line) { "config", "You're trying to use the cookie encryption feature" "on line %zu without having set the `.cookie_env_var` option in" - "`sp.global`: please set it first.", + "`sp.global`: please set it first", sp_line_no); return -1; } else if (0 == @@ -245,28 +245,28 @@ int parse_cookie(char *line) { "config", "You're trying to use the cookie encryption feature" "on line %zu without having set the `.encryption_key` option in" - "`sp.global`: please set it first.", + "`sp.global`: please set it first", sp_line_no); return -1; } } else if (!samesite) { sp_log_err("config", "You must specify a at least one action to a cookie on line " - "%zu.", + "%zu", sp_line_no); return -1; } if ((!cookie->name || 0 == ZSTR_LEN(cookie->name)) && !cookie->name_r) { sp_log_err("config", "You must specify a cookie name/regexp on line " - "%zu.", + "%zu", sp_line_no); return -1; } if (cookie->name && cookie->name_r) { sp_log_err("config", "name and name_r are mutually exclusive on line " - "%zu.", + "%zu", sp_line_no); return -1; } @@ -280,7 +280,7 @@ int parse_cookie(char *line) { sp_log_err( "config", "%s is an invalid value to samesite (expected %s or %s) on line " - "%zu.", + "%zu", ZSTR_VAL(samesite), SP_TOKEN_SAMESITE_LAX, SP_TOKEN_SAMESITE_STRICT, sp_line_no); return -1; @@ -350,7 +350,7 @@ int parse_disabled_functions(char *line) { if (X && Y) { \ sp_log_err("config", \ "Invalid configuration line: 'sp.disabled_functions%s': " \ - "'.%s' and '.%s' are mutually exclusive on line %zu.", \ + "'.%s' and '.%s' are mutually exclusive on line %zu", \ line, STR1, STR2, sp_line_no); \ return 1; \ } @@ -367,38 +367,38 @@ int parse_disabled_functions(char *line) { sp_log_err( "config", "Invalid configuration line: 'sp.disabled_functions%s':" - "'.r_param', '.param' and '.pos' are mutually exclusive on line %zu.", + "'.r_param', '.param' and '.pos' are mutually exclusive on line %zu", line, sp_line_no); return -1; } else if ((df->r_key || df->key) && (df->r_value || df->value)) { sp_log_err("config", "Invalid configuration line: 'sp.disabled_functions%s':" - "`key` and `value` are mutually exclusive on line %zu.", + "`key` and `value` are mutually exclusive on line %zu", line, sp_line_no); return -1; } else if ((df->r_ret || df->ret || df->ret_type) && (df->r_param || param)) { sp_log_err("config", "Invalid configuration line: 'sp.disabled_functions%s':" - "`ret` and `param` are mutually exclusive on line %zu.", + "`ret` and `param` are mutually exclusive on line %zu", line, sp_line_no); return -1; } else if ((df->r_ret || df->ret || df->ret_type) && (var)) { sp_log_err("config", "Invalid configuration line: 'sp.disabled_functions%s':" - "`ret` and `var` are mutually exclusive on line %zu.", + "`ret` and `var` are mutually exclusive on line %zu", line, sp_line_no); return -1; } else if ((df->r_ret || df->ret || df->ret_type) && (df->value || df->r_value)) { sp_log_err("config", "Invalid configuration line: 'sp.disabled_functions%s':" - "`ret` and `value` are mutually exclusive on line %zu.", + "`ret` and `value` are mutually exclusive on line %zu", line, sp_line_no); return -1; } else if (!(df->r_function || df->function)) { sp_log_err("config", "Invalid configuration line: 'sp.disabled_functions%s':" - " must take a function name on line %zu.", + " must take a function name on line %zu", line, sp_line_no); return -1; } else if (df->filename && (*ZSTR_VAL(df->filename) != '/') && @@ -407,13 +407,13 @@ int parse_disabled_functions(char *line) { sp_log_err( "config", "Invalid configuration line: 'sp.disabled_functions%s':" - "'.filename' must be an absolute path or a phar archive on line %zu.", + "'.filename' must be an absolute path or a phar archive on line %zu", line, sp_line_no); return -1; } else if (!(allow ^ drop)) { sp_log_err("config", "Invalid configuration line: 'sp.disabled_functions%s': The " - "rule must either be a `drop` or `allow` one on line %zu.", + "rule must either be a `drop` or `allow` one on line %zu", line, sp_line_no); return -1; } @@ -423,7 +423,7 @@ int parse_disabled_functions(char *line) { char *endptr; df->pos = (int)strtol(ZSTR_VAL(pos), &endptr, 10); if (errno != 0 || endptr == ZSTR_VAL(pos)) { - sp_log_err("config", "Failed to parse arg '%s' of `pos` on line %zu.", + sp_log_err("config", "Failed to parse arg '%s' of `pos` on line %zu", ZSTR_VAL(pos), sp_line_no); return -1; } @@ -434,7 +434,7 @@ int parse_disabled_functions(char *line) { char *endptr; df->line = (unsigned int)strtoul(ZSTR_VAL(line_number), &endptr, 10); if (errno != 0 || endptr == ZSTR_VAL(line_number)) { - sp_log_err("config", "Failed to parse arg '%s' of `line` on line %zu.", + sp_log_err("config", "Failed to parse arg '%s' of `line` on line %zu", ZSTR_VAL(line_number), sp_line_no); return -1; } @@ -460,7 +460,7 @@ int parse_disabled_functions(char *line) { df->param = sp_parse_var(ZSTR_VAL(param)); } if (!df->param) { - sp_log_err("config", "Invalid value '%s' for `param` on line %zu.", + sp_log_err("config", "Invalid value '%s' for `param` on line %zu", ZSTR_VAL(param), sp_line_no); return -1; } @@ -470,12 +470,12 @@ int parse_disabled_functions(char *line) { if (ZSTR_LEN(var)) { df->var = sp_parse_var(ZSTR_VAL(var)); if (!df->var) { - sp_log_err("config", "Invalid value '%s' for `var` on line %zu.", + sp_log_err("config", "Invalid value '%s' for `var` on line %zu", ZSTR_VAL(var), sp_line_no); return -1; } } else { - sp_log_err("config", "Empty value in `var` on line %zu.", sp_line_no); + sp_log_err("config", "Empty value in `var` on line %zu", sp_line_no); return -1; } } @@ -534,7 +534,7 @@ int parse_upload_validation(char *line) { } if (!(enable ^ disable)) { - sp_log_err("config", "A rule can't be enabled and disabled on line %zu.", + sp_log_err("config", "A rule can't be enabled and disabled on line %zu", sp_line_no); return -1; } @@ -545,15 +545,15 @@ int parse_upload_validation(char *line) { if (!script) { sp_log_err("config", - "The `script` directive is mandatory in '%s' on line %zu.", line, + "The `script` directive is mandatory in '%s' on line %zu", line, sp_line_no); return -1; } else if (-1 == access(ZSTR_VAL(script), F_OK)) { - sp_log_err("config", "The `script` (%s) doesn't exist on line %zu.", + sp_log_err("config", "The `script` (%s) doesn't exist on line %zu", ZSTR_VAL(script), sp_line_no); return -1; } else if (-1 == access(ZSTR_VAL(script), X_OK)) { - sp_log_err("config", "The `script` (%s) isn't executable on line %zu.", + sp_log_err("config", "The `script` (%s) isn't executable on line %zu", ZSTR_VAL(script), sp_line_no); return -1; } diff --git a/src/sp_config_utils.c b/src/sp_config_utils.c index d72561ba..71c90716 100644 --- a/src/sp_config_utils.c +++ b/src/sp_config_utils.c @@ -25,7 +25,7 @@ int parse_keywords(sp_config_functions *funcs, char *line) { } if (*line) { - sp_log_err("config", "Trailing chars '%s' at the end of '%s' on line %zu.", + sp_log_err("config", "Trailing chars '%s' at the end of '%s' on line %zu", line, original_line, sp_line_no); return -1; } @@ -91,12 +91,12 @@ zend_string *get_param(size_t *consumed, char *restrict line, sp_type type, } err: if (0 == j) { - sp_log_err("error", "A valid string as parameter is expected on line %zu.", + sp_log_err("error", "A valid string as parameter is expected on line %zu", sp_line_no); } else { sp_log_err("error", "There is an issue with the parsing of '%s': it doesn't look " - "like a valid string on line %zu.", + "like a valid string on line %zu", original_line ? original_line : "NULL", sp_line_no); } line = NULL; diff --git a/src/sp_crypt.c b/src/sp_crypt.c index d3588b44..f4d17997 100644 --- a/src/sp_crypt.c +++ b/src/sp_crypt.c @@ -27,10 +27,10 @@ void generate_key(unsigned char *key) { if (env_var) { PHP_SHA256Update(&ctx, (unsigned char *)env_var, strlen(env_var)); } else { - sp_log_err( + sp_log_warn( "cookie_encryption", - "The environment variable '%s'" - "is empty, cookies are weakly encrypted.", + "The environment variable '%s' " + "is empty, cookies are weakly encrypted", ZSTR_VAL( SNUFFLEUPAGUS_G(config).config_snuffleupagus->cookies_env_var)); } @@ -58,13 +58,13 @@ int decrypt_zval(zval *pDest, bool simulation, zend_hash_key *hash_key) { sp_log_msg( "cookie_encryption", SP_LOG_SIMULATION, "Buffer underflow tentative detected in cookie encryption handling " - "for %s. Using the cookie 'as it' instead of decrypting it.", + "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, - "Buffer underflow tentative detected in cookie encryption handling."); + "Buffer underflow tentative detected in cookie encryption handling"); return ZEND_HASH_APPLY_REMOVE; } } @@ -106,7 +106,7 @@ int decrypt_zval(zval *pDest, bool simulation, zend_hash_key *hash_key) { return ZEND_HASH_APPLY_KEEP; } else { sp_log_msg("cookie_encryption", SP_LOG_DROP, - "Something went wrong with the decryption of %s.", + "Something went wrong with the decryption of %s", hash_key ? ZSTR_VAL(hash_key->key) : "the session"); return ZEND_HASH_APPLY_REMOVE; } diff --git a/src/sp_disabled_functions.c b/src/sp_disabled_functions.c index b4987328..3a30d554 100644 --- a/src/sp_disabled_functions.c +++ b/src/sp_disabled_functions.c @@ -105,7 +105,7 @@ static bool is_param_matching(zend_execute_data* execute_data, if (config_node->pos != -1) { if (config_node->pos > nb_param - 1) { char* complete_function_path = get_complete_function_path(execute_data); - sp_log_err("config", + sp_log_warn("config", "It seems that you wrote a rule filtering on the " "%d%s argument of the function '%s', but it takes only %d " "arguments. " @@ -290,8 +290,6 @@ bool should_disable(zend_execute_data* execute_data, const char* builtin_param_name, const sp_list_node* config, const zend_string* current_filename) { char current_file_hash[SHA256_SIZE * 2 + 1] = {0}; - unsigned int line = 0; - char* filename = NULL; while (config) { sp_disabled_function const* const config_node = @@ -327,9 +325,6 @@ bool should_disable(zend_execute_data* execute_data, is_file_matching(execute_data, config_node, current_filename); if (!ex) { goto next; - } else if (ex != execute_data) { - line = ex->opline->lineno; - filename = ZSTR_VAL(ex->func->op_array.filename); } } @@ -360,7 +355,7 @@ bool should_disable(zend_execute_data* execute_data, (config_node->pos != -1)) { if (!builtin_param && execute_data->func->op_array.arg_info->is_variadic) { - sp_log_err( + sp_log_warn( "disable_function", "Snuffleupagus doesn't support variadic functions yet, sorry. " "Check https://github.com/nbs-system/snuffleupagus/issues/164 for " @@ -391,10 +386,10 @@ bool should_disable(zend_execute_data* execute_data, if (config_node->functions_list) { sp_log_disable(ZSTR_VAL(config_node->function), arg_name, arg_value_str, - config_node, line, filename); + config_node); } else { sp_log_disable(complete_function_path, arg_name, arg_value_str, - config_node, line, filename); + config_node); } if (true == config_node->simulation) { goto next; diff --git a/src/sp_pcre_compat.c b/src/sp_pcre_compat.c index 795903d7..3b3b7f51 100644 --- a/src/sp_pcre_compat.c +++ b/src/sp_pcre_compat.c @@ -4,13 +4,15 @@ sp_pcre* sp_pcre_compile(const char* const pattern) { sp_pcre* ret = NULL; - const char* pcre_error = NULL; #ifdef SP_HAS_PCRE2 + char pcre_error[128] = {0}; int errornumber; PCRE2_SIZE erroroffset; 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 diff --git a/src/sp_upload_validation.c b/src/sp_upload_validation.c index a8a13405..c079e41e 100644 --- a/src/sp_upload_validation.c +++ b/src/sp_upload_validation.c @@ -63,7 +63,7 @@ int sp_rfc1867_callback(unsigned int event, void *event_data, void **extra) { ZSTR_VAL( SNUFFLEUPAGUS_G(config).config_upload_validation->script), cmd, env) == -1) { - sp_log_err( + sp_log_warn( "upload_validation", "Could not call '%s' : %s", ZSTR_VAL( SNUFFLEUPAGUS_G(config).config_upload_validation->script), @@ -90,7 +90,7 @@ int sp_rfc1867_callback(unsigned int event, void *event_data, void **extra) { "The upload of %s on %s was rejected.", filename, uri ? uri : "?"); if (!SNUFFLEUPAGUS_G(config).config_upload_validation->simulation) { - zend_bailout(); + sp_terminate(); } } } diff --git a/src/sp_utils.c b/src/sp_utils.c index cdcf205e..cb6b4a7a 100644 --- a/src/sp_utils.c +++ b/src/sp_utils.c @@ -9,16 +9,6 @@ ZEND_DECLARE_MODULE_GLOBALS(snuffleupagus) -static inline void _sp_log_err(const char* fmt, ...) { - char* msg; - va_list args; - - va_start(args, fmt); - vspprintf(&msg, 0, fmt, args); - va_end(args); - php_log_err(msg); -} - static bool sp_zend_string_equals(const zend_string* s1, const zend_string* s2) { // We can't use `zend_string_equals` here because it doesn't work on @@ -27,7 +17,7 @@ static bool sp_zend_string_equals(const zend_string* s1, !memcmp(ZSTR_VAL(s1), ZSTR_VAL(s2), ZSTR_LEN(s1)); } -void sp_log_msg(char const* feature, char const* level, const char* fmt, ...) { +void sp_log_msg(char const* feature, int type, const char* fmt, ...) { char* msg; va_list args; @@ -35,9 +25,7 @@ void sp_log_msg(char const* feature, char const* level, const char* fmt, ...) { vspprintf(&msg, 0, fmt, args); va_end(args); - char const* const client_ip = getenv("REMOTE_ADDR"); - _sp_log_err("[snuffleupagus][%s][%s][%s] %s", - client_ip ? client_ip : "0.0.0.0", feature, level, msg); + zend_error(type, "[snuffleupagus][%s] %s", feature, msg); } int compute_hash(const char* const filename, char* file_hash) { @@ -50,7 +38,7 @@ int compute_hash(const char* const filename, char* file_hash) { php_stream_open_wrapper(filename, "rb", REPORT_ERRORS, NULL); if (!stream) { sp_log_err("hash_computation", - "Can not open the file %s to compute its hash.\n", filename); + "Can not open the file %s to compute its hash", filename); return FAILURE; } @@ -71,8 +59,8 @@ static int construct_filename(char* filename, const zend_string* folder, char strhash[65] = {0}; if (-1 == mkdir(ZSTR_VAL(folder), 0700) && errno != EEXIST) { - sp_log_err("request_logging", "Unable to create the folder '%s'.", - ZSTR_VAL(folder)); + sp_log_warn("request_logging", "Unable to create the folder '%s'", + ZSTR_VAL(folder)); return -1; } @@ -106,8 +94,8 @@ int sp_log_request(const zend_string* folder, const zend_string* text_repr, return -1; } if (NULL == (file = fopen(filename, "w+"))) { - sp_log_err("request_logging", "Unable to open %s: %s", filename, - strerror(errno)); + sp_log_warn("request_logging", "Unable to open %s: %s", filename, + strerror(errno)); return -1; } @@ -146,7 +134,7 @@ static char* zend_string_to_char(const zend_string* zs) { if (ZSTR_LEN(zs) + 1 < ZSTR_LEN(zs)) { sp_log_err("overflow_error", - "Overflow tentative detected in zend_string_to_char."); + "Overflow tentative detected in zend_string_to_char"); sp_terminate(); } char* copy = emalloc(ZSTR_LEN(zs) + 1); @@ -214,15 +202,15 @@ bool sp_match_value(const zend_string* value, const zend_string* to_match, void sp_log_disable(const char* restrict path, const char* restrict arg_name, const zend_string* restrict arg_value, - const sp_disabled_function* config_node, unsigned int line, - const char* restrict filename) { + const sp_disabled_function* config_node) { const zend_string* dump = config_node->dump; const zend_string* alias = config_node->alias; const int sim = config_node->simulation; - filename = filename ? filename : zend_get_executed_filename(TSRMLS_C); - line = line ? line : zend_get_executed_lineno(TSRMLS_C); - + if (dump) { + sp_log_request(config_node->dump, config_node->textual_representation, + SP_TOKEN_DISABLE_FUNC); + } if (arg_name) { char* char_repr = NULL; if (arg_value) { @@ -231,33 +219,29 @@ void sp_log_disable(const char* restrict path, const char* restrict arg_name, if (alias) { sp_log_msg( "disabled_function", sim ? SP_LOG_SIMULATION : SP_LOG_DROP, - "Aborted execution on call of the function '%s' in %s:%d, " - "because its argument '%s' content (%s) matched the rule '%s'.", - path, filename, line, arg_name, char_repr ? char_repr : "?", + "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, - "Aborted execution on call of the function '%s' in %s:%d, " - "because its argument '%s' content (%s) matched a rule.", - path, filename, line, 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_msg("disabled_function", sim ? SP_LOG_SIMULATION : SP_LOG_DROP, - "Aborted execution on call of the function '%s' in %s:%d, " - "because of the the rule '%s'.", - path, filename, line, ZSTR_VAL(alias)); + "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, - "Aborted execution on call of the function '%s' in %s:%d.", - path, filename, line); + "Aborted execution on call of the function '%s'", + path); } } - if (dump) { - sp_log_request(config_node->dump, config_node->textual_representation, - SP_TOKEN_DISABLE_FUNC); - } } void sp_log_disable_ret(const char* restrict path, @@ -268,29 +252,27 @@ void sp_log_disable_ret(const char* restrict path, const int sim = config_node->simulation; char* char_repr = NULL; + if (dump) { + sp_log_request(dump, config_node->textual_representation, + SP_TOKEN_DISABLE_FUNC); + } if (ret_value) { char_repr = zend_string_to_char(ret_value); } if (alias) { sp_log_msg( "disabled_function", sim ? SP_LOG_SIMULATION : SP_LOG_DROP, - "Aborted execution on return of the function '%s' in %s:%d, " - "because the function returned '%s', which matched the rule '%s'.", - path, zend_get_executed_filename(TSRMLS_C), - zend_get_executed_lineno(TSRMLS_C), char_repr ? char_repr : "?", + "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, - "Aborted execution on return of the function '%s' in %s:%d, " - "because the function returned '%s', which matched a rule.", - path, zend_get_executed_filename(TSRMLS_C), - zend_get_executed_lineno(TSRMLS_C), 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); - if (dump) { - sp_log_request(dump, config_node->textual_representation, - SP_TOKEN_DISABLE_FUNC); - } } bool sp_match_array_key(const zval* zv, const zend_string* to_match, diff --git a/src/sp_utils.h b/src/sp_utils.h index 7e1103c0..62040e7b 100644 --- a/src/sp_utils.h +++ b/src/sp_utils.h @@ -28,12 +28,14 @@ #define HOOK_FUNCTION_BY_REGEXP(regexp, hook_table, new_function) \ hook_regexp(regexp, SNUFFLEUPAGUS_G(hook_table), new_function) -#define SP_LOG_SIMULATION "simulation" -#define SP_LOG_DROP "drop" -#define SP_LOG_DEBUG "debug" -#define SP_LOG_ERROR "error" +#define SP_LOG_SIMULATION E_WARNING +#define SP_LOG_DROP E_ERROR +#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__) #ifdef SP_DEBUG #define sp_log_debug(...) sp_log_msg("DEBUG", SP_LOG_DEBUG, __VA_ARGS__) #else @@ -42,15 +44,14 @@ #define GET_SUFFIX(x) (x == 1) ? "st" : ((x == 2) ? "nd" : "th") -void sp_log_msg(char const *feature, char const *level, const char *fmt, ...); +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(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 *); bool sp_match_array_value(const zval *, const zend_string *, const sp_pcre *); void sp_log_disable(const char *restrict, const char *restrict, - const zend_string *restrict, const sp_disabled_function *, - unsigned int, 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 *, diff --git a/src/tests/broken_conf.phpt b/src/tests/broken_conf.phpt index 9b461bb7..981f982a 100644 --- a/src/tests/broken_conf.phpt +++ b/src/tests/broken_conf.phpt @@ -6,5 +6,6 @@ Broken configuration sp.configuration_file={PWD}/config/broken_conf.ini --FILE-- --EXPECT-- -[snuffleupagus][0.0.0.0][config][error] Invalid configuration prefix for 'this is a broken line' on line 1. +PHP Fatal error: [snuffleupagus][config] Invalid configuration prefix for 'this is a broken line' on line 1 in Unknown on line 0 +Fatal error: [snuffleupagus][config] Invalid configuration prefix for 'this is a broken line' on line 1 in Unknown on line 0 \ No newline at end of file diff --git a/src/tests/broken_conf2.phpt b/src/tests/broken_conf2.phpt index da9ac95a..240e3afa 100644 --- a/src/tests/broken_conf2.phpt +++ b/src/tests/broken_conf2.phpt @@ -6,4 +6,6 @@ Broken configuration sp.configuration_file={PWD}/config/broken_conf2.ini --FILE-- --EXPECT-- -[snuffleupagus][0.0.0.0][config][error] Invalid configuration section 'sp.wrong' on line 1. +PHP Fatal error: [snuffleupagus][config] Invalid configuration section 'sp.wrong' on line 1 in Unknown on line 0 + +Fatal error: [snuffleupagus][config] Invalid configuration section 'sp.wrong' on line 1 in Unknown on line 0 \ No newline at end of file diff --git a/src/tests/broken_conf_config_regexp.phpt b/src/tests/broken_conf_config_regexp.phpt index e49788c6..c4e788e1 100644 --- a/src/tests/broken_conf_config_regexp.phpt +++ b/src/tests/broken_conf_config_regexp.phpt @@ -6,5 +6,9 @@ Broken configuration sp.configuration_file={PWD}/config/broken_config_regexp.ini --FILE-- --EXPECTF-- -[snuffleupagus][0.0.0.0][config][error] Failed to compile '*.': %aon line 1. -[snuffleupagus][0.0.0.0][config][error] '.filename_r()' is expecting a valid regexp, and not '"*."' on line 1. +PHP Fatal error: [snuffleupagus][config] Failed to compile '*.': %s on line 1. in Unknown on line 0 +PHP Fatal error: [snuffleupagus][config] '.filename_r()' is expecting a valid regexp, and not '"*."' on line 1 in Unknown on line 0 + +Fatal error: [snuffleupagus][config] Failed to compile '*.': %s on line 1. in Unknown on line 0 + +Fatal error: [snuffleupagus][config] '.filename_r()' is expecting a valid regexp, and not '"*."' on line 1 in Unknown on line 0 diff --git a/src/tests/broken_conf_config_regexp_no_closing_paren.phpt b/src/tests/broken_conf_config_regexp_no_closing_paren.phpt index a57286da..16351a40 100644 --- a/src/tests/broken_conf_config_regexp_no_closing_paren.phpt +++ b/src/tests/broken_conf_config_regexp_no_closing_paren.phpt @@ -6,5 +6,9 @@ Broken configuration - regexp without a closing parenthesis sp.configuration_file={PWD}/config/broken_config_regexp_no_closing_paren.ini --FILE-- --EXPECT-- -[snuffleupagus][0.0.0.0][error][error] There is an issue with the parsing of '"*."': it doesn't look like a valid string on line 1. -[snuffleupagus][0.0.0.0][config][error] '.filename_r()' is expecting a valid regexp, and not '"*."' on line 1. +PHP Fatal error: [snuffleupagus][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][config] '.filename_r()' is expecting a valid regexp, and not '"*."' on line 1 in Unknown on line 0 + +Fatal error: [snuffleupagus][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][config] '.filename_r()' is expecting a valid regexp, and not '"*."' on line 1 in Unknown on line 0 \ No newline at end of file diff --git a/src/tests/broken_conf_cookie_name_and_regexp.phpt b/src/tests/broken_conf_cookie_name_and_regexp.phpt index 8b0dbfab..ae3fa62e 100644 --- a/src/tests/broken_conf_cookie_name_and_regexp.phpt +++ b/src/tests/broken_conf_cookie_name_and_regexp.phpt @@ -6,4 +6,6 @@ Borken configuration - encrypted cookie with name and regexp sp.configuration_file={PWD}/config/broken_conf_cookie_name_and_regexp.ini --FILE-- --EXPECT-- -[snuffleupagus][0.0.0.0][config][error] name and name_r are mutually exclusive on line 2. +PHP Fatal error: [snuffleupagus][config] name and name_r are mutually exclusive on line 2 in Unknown on line 0 + +Fatal error: [snuffleupagus][config] name and name_r are mutually exclusive on line 2 in Unknown on line 0 \ No newline at end of file diff --git a/src/tests/broken_conf_enable_disable.phpt b/src/tests/broken_conf_enable_disable.phpt index 5d860b9e..f96e7379 100644 --- a/src/tests/broken_conf_enable_disable.phpt +++ b/src/tests/broken_conf_enable_disable.phpt @@ -6,4 +6,6 @@ Global strict mode sp.configuration_file={PWD}/config/borken_conf_enable_disable.ini --FILE-- --EXPECTF-- -[snuffleupagus][0.0.0.0][config][error] A rule can't be enabled and disabled on line 1. +PHP Fatal error: [snuffleupagus][config] A rule can't be enabled and disabled on line 1 in Unknown on line 0 + +Fatal error: [snuffleupagus][config] A rule can't be enabled and disabled on line 1 in Unknown on line 0 \ No newline at end of file diff --git a/src/tests/broken_conf_eval.phpt b/src/tests/broken_conf_eval.phpt index 4dc5312d..6ba7f8fe 100644 --- a/src/tests/broken_conf_eval.phpt +++ b/src/tests/broken_conf_eval.phpt @@ -6,4 +6,6 @@ Broken configuration for eval sp.configuration_file={PWD}/config/broken_conf_eval.ini --FILE-- --EXPECT-- -[snuffleupagus][0.0.0.0][error][error] There is an issue with the parsing of '"cos,sin': it doesn't look like a valid string on line 1. +PHP Fatal error: [snuffleupagus][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][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 \ No newline at end of file diff --git a/src/tests/broken_conf_expecting_bool.phpt b/src/tests/broken_conf_expecting_bool.phpt index a6aceb2e..261ce6e2 100644 --- a/src/tests/broken_conf_expecting_bool.phpt +++ b/src/tests/broken_conf_expecting_bool.phpt @@ -6,4 +6,6 @@ Bad boolean value in configuration sp.configuration_file={PWD}/config/broken_conf_expecting_bool.ini --FILE-- --EXPECT-- -[snuffleupagus][0.0.0.0][config][error] Trailing chars '337);' at the end of '.enable(1337);' on line 5. +PHP Fatal error: [snuffleupagus][config] Trailing chars '337);' at the end of '.enable(1337);' on line 5 in Unknown on line 0 + +Fatal error: [snuffleupagus][config] Trailing chars '337);' at the end of '.enable(1337);' on line 5 in Unknown on line 0 \ No newline at end of file diff --git a/src/tests/broken_conf_invalid_cidr.phpt b/src/tests/broken_conf_invalid_cidr.phpt index 515091b0..ccf4026e 100644 --- a/src/tests/broken_conf_invalid_cidr.phpt +++ b/src/tests/broken_conf_invalid_cidr.phpt @@ -6,4 +6,6 @@ Broken configuration sp.configuration_file={PWD}/config/broken_conf_invalid_cidr.ini --FILE-- --EXPECT-- -[snuffleupagus][0.0.0.0][config][error] '42' isn't a valid ipv4 mask. +PHP Fatal error: [snuffleupagus][config] '42' isn't a valid ipv4 mask. in Unknown on line 0 + +Fatal error: [snuffleupagus][config] '42' isn't a valid ipv4 mask. in Unknown on line 0 \ No newline at end of file diff --git a/src/tests/broken_conf_invalid_cidr6.phpt b/src/tests/broken_conf_invalid_cidr6.phpt index d20cfcd0..802f9f29 100644 --- a/src/tests/broken_conf_invalid_cidr6.phpt +++ b/src/tests/broken_conf_invalid_cidr6.phpt @@ -6,4 +6,6 @@ Broken configuration sp.configuration_file={PWD}/config/broken_conf_invalid_cidr6.ini --FILE-- --EXPECT-- -[snuffleupagus][0.0.0.0][config][error] 'ZZZ' isn't a valid network mask. +PHP Fatal error: [snuffleupagus][config] 'ZZZ' isn't a valid network mask. in Unknown on line 0 + +Fatal error: [snuffleupagus][config] 'ZZZ' isn't a valid network mask. in Unknown on line 0 \ No newline at end of file diff --git a/src/tests/broken_conf_invalid_cidr6_no_slash.phpt b/src/tests/broken_conf_invalid_cidr6_no_slash.phpt index de70a05b..02e52011 100644 --- a/src/tests/broken_conf_invalid_cidr6_no_slash.phpt +++ b/src/tests/broken_conf_invalid_cidr6_no_slash.phpt @@ -6,4 +6,6 @@ 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-- -[snuffleupagus][0.0.0.0][config][error] '2001:0db8:0000:0000:0000:ff00:0042:8329' isn't a valid network mask, it seems that you forgot a '/'. +PHP Fatal error: [snuffleupagus][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][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 \ No newline at end of file diff --git a/src/tests/broken_conf_invalid_cidr_value.phpt b/src/tests/broken_conf_invalid_cidr_value.phpt index a63df281..c9666564 100644 --- a/src/tests/broken_conf_invalid_cidr_value.phpt +++ b/src/tests/broken_conf_invalid_cidr_value.phpt @@ -7,5 +7,9 @@ Broken configuration, invalid cidr value sp.configuration_file={PWD}/config/broken_conf_invalid_cidr_value.ini --FILE-- --EXPECT-- -[snuffleupagus][0.0.0.0][error][error] A valid string as parameter is expected on line 1. -[snuffleupagus][0.0.0.0][config][error] " doesn't contain a valid cidr on line 1. \ No newline at end of file +PHP Fatal error: [snuffleupagus][error] A valid string as parameter is expected on line 1 in Unknown on line 0 +PHP Fatal error: [snuffleupagus][config] " doesn't contain a valid cidr on line 1 in Unknown on line 0 + +Fatal error: [snuffleupagus][error] A valid string as parameter is expected on line 1 in Unknown on line 0 + +Fatal error: [snuffleupagus][config] " doesn't contain a valid cidr on line 1 in Unknown on line 0 \ No newline at end of file diff --git a/src/tests/broken_conf_invalid_filename.phpt b/src/tests/broken_conf_invalid_filename.phpt index a1515a78..f02db983 100644 --- a/src/tests/broken_conf_invalid_filename.phpt +++ b/src/tests/broken_conf_invalid_filename.phpt @@ -6,4 +6,6 @@ Broken configuration filename without absolute path sp.configuration_file={PWD}/config/broken_conf_invalid_filename.ini --FILE-- --EXPECTF-- -[snuffleupagus][0.0.0.0][config][error] 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. +PHP Fatal error: [snuffleupagus][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][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 \ No newline at end of file diff --git a/src/tests/broken_conf_invalid_type.phpt b/src/tests/broken_conf_invalid_type.phpt index 246492f8..6bb6f507 100644 --- a/src/tests/broken_conf_invalid_type.phpt +++ b/src/tests/broken_conf_invalid_type.phpt @@ -6,4 +6,6 @@ Broken conf with wrong type sp.configuration_file={PWD}/config/broken_conf_invalid_type.ini --FILE-- --EXPECTF-- -[snuffleupagus][0.0.0.0][error][error] There is an issue with the parsing of '"totally_wrong"_type")': it doesn't look like a valid string on line 1. +PHP Fatal error: [snuffleupagus][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][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 \ No newline at end of file diff --git a/src/tests/broken_conf_key_value.phpt b/src/tests/broken_conf_key_value.phpt index e9ee4a93..50dbb2bb 100644 --- a/src/tests/broken_conf_key_value.phpt +++ b/src/tests/broken_conf_key_value.phpt @@ -6,4 +6,6 @@ Broken configuration sp.configuration_file={PWD}/config/broken_conf_key_value.ini --FILE-- --EXPECT-- -[snuffleupagus][0.0.0.0][config][error] Invalid configuration line: 'sp.disabled_functions.function("system").var("").value("").key("").drop();':`key` and `value` are mutually exclusive on line 1. +PHP Fatal error: [snuffleupagus][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][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 \ No newline at end of file diff --git a/src/tests/broken_conf_line_empty_string.phpt b/src/tests/broken_conf_line_empty_string.phpt index 44f8d5ee..9bc20c71 100644 --- a/src/tests/broken_conf_line_empty_string.phpt +++ b/src/tests/broken_conf_line_empty_string.phpt @@ -6,4 +6,6 @@ Configuration line with an empty string sp.configuration_file={PWD}/config/broken_conf_line_empty_string.ini --FILE-- --EXPECT-- -[snuffleupagus][0.0.0.0][error][error] A valid string as parameter is expected on line 1. +PHP Fatal error: [snuffleupagus][error] A valid string as parameter is expected on line 1 in Unknown on line 0 + +Fatal error: [snuffleupagus][error] A valid string as parameter is expected on line 1 in Unknown on line 0 \ No newline at end of file diff --git a/src/tests/broken_conf_line_no_closing.phpt b/src/tests/broken_conf_line_no_closing.phpt index 13e3aa12..999c655c 100644 --- a/src/tests/broken_conf_line_no_closing.phpt +++ b/src/tests/broken_conf_line_no_closing.phpt @@ -6,4 +6,6 @@ Configuration line without closing parenthese sp.configuration_file={PWD}/config/broken_conf_line_no_closing.ini --FILE-- --EXPECT-- -[snuffleupagus][0.0.0.0][error][error] There is an issue with the parsing of '"123"': it doesn't look like a valid string on line 1. +PHP Fatal error: [snuffleupagus][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][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 \ No newline at end of file diff --git a/src/tests/broken_conf_local_var_1.phpt b/src/tests/broken_conf_local_var_1.phpt index a91d275c..9a22eb99 100644 --- a/src/tests/broken_conf_local_var_1.phpt +++ b/src/tests/broken_conf_local_var_1.phpt @@ -6,5 +6,9 @@ Broken configuration sp.configuration_file={PWD}/config/broken_conf_local_var_1.ini --FILE-- --EXPECT-- -[snuffleupagus][0.0.0.0][config][error] Invalid `]` position. -[snuffleupagus][0.0.0.0][config][error] Invalid value ']' for `var` on line 1. +PHP Fatal error: [snuffleupagus][config] Invalid `]` position. in Unknown on line 0 +PHP Fatal error: [snuffleupagus][config] Invalid value ']' for `var` on line 1 in Unknown on line 0 + +Fatal error: [snuffleupagus][config] Invalid `]` position. in Unknown on line 0 + +Fatal error: [snuffleupagus][config] Invalid value ']' for `var` on line 1 in Unknown on line 0 \ No newline at end of file diff --git a/src/tests/broken_conf_local_var_10.phpt b/src/tests/broken_conf_local_var_10.phpt index 8a7d9b98..9efea61a 100644 --- a/src/tests/broken_conf_local_var_10.phpt +++ b/src/tests/broken_conf_local_var_10.phpt @@ -6,5 +6,9 @@ Broken configuration sp.configuration_file={PWD}/config/broken_conf_local_var_10.ini --FILE-- --EXPECT-- -[snuffleupagus][0.0.0.0][config][error] Invalid `]` position. -[snuffleupagus][0.0.0.0][config][error] Invalid value 'asd[asd]asd' for `var` on line 1. +PHP Fatal error: [snuffleupagus][config] Invalid `]` position. in Unknown on line 0 +PHP Fatal error: [snuffleupagus][config] Invalid value 'asd[asd]asd' for `var` on line 1 in Unknown on line 0 + +Fatal error: [snuffleupagus][config] Invalid `]` position. in Unknown on line 0 + +Fatal error: [snuffleupagus][config] Invalid value 'asd[asd]asd' for `var` on line 1 in Unknown on line 0 \ No newline at end of file diff --git a/src/tests/broken_conf_local_var_11.phpt b/src/tests/broken_conf_local_var_11.phpt index 1817a3fc..4d8aa8be 100644 --- a/src/tests/broken_conf_local_var_11.phpt +++ b/src/tests/broken_conf_local_var_11.phpt @@ -6,5 +6,9 @@ Broken configuration sp.configuration_file={PWD}/config/broken_conf_local_var_11.ini --FILE-- --EXPECT-- -[snuffleupagus][0.0.0.0][config][error] Invalid `::` position. -[snuffleupagus][0.0.0.0][config][error] Invalid value 'asd::' for `param` on line 1. +PHP Fatal error: [snuffleupagus][config] Invalid `::` position. in Unknown on line 0 +PHP Fatal error: [snuffleupagus][config] Invalid value 'asd::' for `param` on line 1 in Unknown on line 0 + +Fatal error: [snuffleupagus][config] Invalid `::` position. in Unknown on line 0 + +Fatal error: [snuffleupagus][config] Invalid value 'asd::' for `param` on line 1 in Unknown on line 0 \ No newline at end of file diff --git a/src/tests/broken_conf_local_var_12.phpt b/src/tests/broken_conf_local_var_12.phpt index 0b52e2ab..b893740f 100644 --- a/src/tests/broken_conf_local_var_12.phpt +++ b/src/tests/broken_conf_local_var_12.phpt @@ -6,4 +6,6 @@ Broken configuration sp.configuration_file={PWD}/config/broken_conf_local_var_12.ini --FILE-- --EXPECT-- -[snuffleupagus][0.0.0.0][config][error] Empty value in `var` on line 1. +PHP Fatal error: [snuffleupagus][config] Empty value in `var` on line 1 in Unknown on line 0 + +Fatal error: [snuffleupagus][config] Empty value in `var` on line 1 in Unknown on line 0 \ No newline at end of file diff --git a/src/tests/broken_conf_local_var_13.phpt b/src/tests/broken_conf_local_var_13.phpt index ca6be6d9..5a1f4316 100644 --- a/src/tests/broken_conf_local_var_13.phpt +++ b/src/tests/broken_conf_local_var_13.phpt @@ -6,5 +6,9 @@ Broken configuration sp.configuration_file={PWD}/config/broken_conf_local_var_13.ini --FILE-- --EXPECT-- -[snuffleupagus][0.0.0.0][config][error] Invalid `->` position. -[snuffleupagus][0.0.0.0][config][error] Invalid value 'asd->asd' for `var` on line 1. +PHP Fatal error: [snuffleupagus][config] Invalid `->` position. in Unknown on line 0 +PHP Fatal error: [snuffleupagus][config] Invalid value 'asd->asd' for `var` on line 1 in Unknown on line 0 + +Fatal error: [snuffleupagus][config] Invalid `->` position. in Unknown on line 0 + +Fatal error: [snuffleupagus][config] Invalid value 'asd->asd' for `var` on line 1 in Unknown on line 0 \ No newline at end of file diff --git a/src/tests/broken_conf_local_var_14.phpt b/src/tests/broken_conf_local_var_14.phpt index cb7e4557..330c603c 100644 --- a/src/tests/broken_conf_local_var_14.phpt +++ b/src/tests/broken_conf_local_var_14.phpt @@ -6,5 +6,9 @@ Broken configuration sp.configuration_file={PWD}/config/broken_conf_local_var_14.ini --FILE-- --EXPECT-- -[snuffleupagus][0.0.0.0][config][error] Invalid var name: $i+valid var name . -[snuffleupagus][0.0.0.0][config][error] Invalid value '$i+valid var name ' for `var` on line 1. +PHP Fatal error: [snuffleupagus][config] Invalid var name: $i+valid var name . in Unknown on line 0 +PHP Fatal error: [snuffleupagus][config] Invalid value '$i+valid var name ' for `var` on line 1 in Unknown on line 0 + +Fatal error: [snuffleupagus][config] Invalid var name: $i+valid var name . in Unknown on line 0 + +Fatal error: [snuffleupagus][config] Invalid value '$i+valid var name ' for `var` on line 1 in Unknown on line 0 \ No newline at end of file diff --git a/src/tests/broken_conf_local_var_15.phpt b/src/tests/broken_conf_local_var_15.phpt index 456d6e8b..fd4319c3 100644 --- a/src/tests/broken_conf_local_var_15.phpt +++ b/src/tests/broken_conf_local_var_15.phpt @@ -6,5 +6,9 @@ Broken configuration sp.configuration_file={PWD}/config/broken_conf_local_var_15.ini --FILE-- --EXPECT-- -[snuffleupagus][0.0.0.0][config][error] Invalid var name: $i$$!@#. -[snuffleupagus][0.0.0.0][config][error] Invalid value '$i$$!@#->qwe' for `var` on line 1. +PHP Fatal error: [snuffleupagus][config] Invalid var name: $i$$!@#. in Unknown on line 0 +PHP Fatal error: [snuffleupagus][config] Invalid value '$i$$!@#->qwe' for `var` on line 1 in Unknown on line 0 + +Fatal error: [snuffleupagus][config] Invalid var name: $i$$!@#. in Unknown on line 0 + +Fatal error: [snuffleupagus][config] Invalid value '$i$$!@#->qwe' for `var` on line 1 in Unknown on line 0 \ No newline at end of file diff --git a/src/tests/broken_conf_local_var_16.phpt b/src/tests/broken_conf_local_var_16.phpt index 84b29bf4..e27caab8 100644 --- a/src/tests/broken_conf_local_var_16.phpt +++ b/src/tests/broken_conf_local_var_16.phpt @@ -6,5 +6,9 @@ Broken configuration sp.configuration_file={PWD}/config/broken_conf_local_var_16.ini --FILE-- --EXPECT-- -[snuffleupagus][0.0.0.0][config][error] Missing a closing quote. -[snuffleupagus][0.0.0.0][config][error] Invalid value '"' for `var` on line 1. +PHP Fatal error: [snuffleupagus][config] Missing a closing quote. in Unknown on line 0 +PHP Fatal error: [snuffleupagus][config] Invalid value '"' for `var` on line 1 in Unknown on line 0 + +Fatal error: [snuffleupagus][config] Missing a closing quote. in Unknown on line 0 + +Fatal error: [snuffleupagus][config] Invalid value '"' for `var` on line 1 in Unknown on line 0 \ No newline at end of file diff --git a/src/tests/broken_conf_local_var_2.phpt b/src/tests/broken_conf_local_var_2.phpt index b67a492f..aa458b38 100644 --- a/src/tests/broken_conf_local_var_2.phpt +++ b/src/tests/broken_conf_local_var_2.phpt @@ -6,5 +6,9 @@ Broken configuration sp.configuration_file={PWD}/config/broken_conf_local_var_2.ini --FILE-- --EXPECT-- -[snuffleupagus][0.0.0.0][config][error] Invalid `"` position. -[snuffleupagus][0.0.0.0][config][error] Invalid value '""asd' for `var` on line 1. +PHP Fatal error: [snuffleupagus][config] Invalid `"` position. in Unknown on line 0 +PHP Fatal error: [snuffleupagus][config] Invalid value '""asd' for `var` on line 1 in Unknown on line 0 + +Fatal error: [snuffleupagus][config] Invalid `"` position. in Unknown on line 0 + +Fatal error: [snuffleupagus][config] Invalid value '""asd' for `var` on line 1 in Unknown on line 0 \ No newline at end of file diff --git a/src/tests/broken_conf_local_var_3.phpt b/src/tests/broken_conf_local_var_3.phpt index 639d2ead..fb365c9f 100644 --- a/src/tests/broken_conf_local_var_3.phpt +++ b/src/tests/broken_conf_local_var_3.phpt @@ -6,5 +6,9 @@ Broken configuration sp.configuration_file={PWD}/config/broken_conf_local_var_3.ini --FILE-- --EXPECT-- -[snuffleupagus][0.0.0.0][config][error] Invalid `->` position. -[snuffleupagus][0.0.0.0][config][error] Invalid value '$qwe->::' for `var` on line 1. +PHP Fatal error: [snuffleupagus][config] Invalid `->` position. in Unknown on line 0 +PHP Fatal error: [snuffleupagus][config] Invalid value '$qwe->::' for `var` on line 1 in Unknown on line 0 + +Fatal error: [snuffleupagus][config] Invalid `->` position. in Unknown on line 0 + +Fatal error: [snuffleupagus][config] Invalid value '$qwe->::' for `var` on line 1 in Unknown on line 0 \ No newline at end of file diff --git a/src/tests/broken_conf_local_var_4.phpt b/src/tests/broken_conf_local_var_4.phpt index e50f9a6d..b8ec75e5 100644 --- a/src/tests/broken_conf_local_var_4.phpt +++ b/src/tests/broken_conf_local_var_4.phpt @@ -6,5 +6,9 @@ Broken configuration sp.configuration_file={PWD}/config/broken_conf_local_var_4.ini --FILE-- --EXPECT-- -[snuffleupagus][0.0.0.0][config][error] Invalid `"` position. -[snuffleupagus][0.0.0.0][config][error] Invalid value '"asd"asd[]' for `var` on line 1. +PHP Fatal error: [snuffleupagus][config] Invalid `"` position. in Unknown on line 0 +PHP Fatal error: [snuffleupagus][config] Invalid value '"asd"asd[]' for `var` on line 1 in Unknown on line 0 + +Fatal error: [snuffleupagus][config] Invalid `"` position. in Unknown on line 0 + +Fatal error: [snuffleupagus][config] Invalid value '"asd"asd[]' for `var` on line 1 in Unknown on line 0 \ No newline at end of file diff --git a/src/tests/broken_conf_local_var_5.phpt b/src/tests/broken_conf_local_var_5.phpt index 0c0d59a5..65daf259 100644 --- a/src/tests/broken_conf_local_var_5.phpt +++ b/src/tests/broken_conf_local_var_5.phpt @@ -6,5 +6,9 @@ Broken configuration sp.configuration_file={PWD}/config/broken_conf_local_var_5.ini --FILE-- --EXPECT-- -[snuffleupagus][0.0.0.0][config][error] Invalid `'` position. -[snuffleupagus][0.0.0.0][config][error] Invalid value ''asd'asd[]' for `var` on line 1. +PHP Fatal error: [snuffleupagus][config] Invalid `'` position. in Unknown on line 0 +PHP Fatal error: [snuffleupagus][config] Invalid value ''asd'asd[]' for `var` on line 1 in Unknown on line 0 + +Fatal error: [snuffleupagus][config] Invalid `'` position. in Unknown on line 0 + +Fatal error: [snuffleupagus][config] Invalid value ''asd'asd[]' for `var` on line 1 in Unknown on line 0 \ No newline at end of file diff --git a/src/tests/broken_conf_local_var_6.phpt b/src/tests/broken_conf_local_var_6.phpt index c51de24c..0e21d6bc 100644 --- a/src/tests/broken_conf_local_var_6.phpt +++ b/src/tests/broken_conf_local_var_6.phpt @@ -6,5 +6,9 @@ Broken configuration sp.configuration_file={PWD}/config/broken_conf_local_var_6.ini --FILE-- --EXPECT-- -[snuffleupagus][0.0.0.0][config][error] Invalid `'` position. -[snuffleupagus][0.0.0.0][config][error] Invalid value '''asd' for `var` on line 1. +PHP Fatal error: [snuffleupagus][config] Invalid `'` position. in Unknown on line 0 +PHP Fatal error: [snuffleupagus][config] Invalid value '''asd' for `var` on line 1 in Unknown on line 0 + +Fatal error: [snuffleupagus][config] Invalid `'` position. in Unknown on line 0 + +Fatal error: [snuffleupagus][config] Invalid value '''asd' for `var` on line 1 in Unknown on line 0 \ No newline at end of file diff --git a/src/tests/broken_conf_local_var_7.phpt b/src/tests/broken_conf_local_var_7.phpt index d3a0fa46..596764cd 100644 --- a/src/tests/broken_conf_local_var_7.phpt +++ b/src/tests/broken_conf_local_var_7.phpt @@ -6,5 +6,9 @@ Broken configuration sp.configuration_file={PWD}/config/broken_conf_local_var_7.ini --FILE-- --EXPECT-- -[snuffleupagus][0.0.0.0][config][error] Invalid `->` position. -[snuffleupagus][0.0.0.0][config][error] Invalid value 'asd-->' for `var` on line 1. +PHP Fatal error: [snuffleupagus][config] Invalid `->` position. in Unknown on line 0 +PHP Fatal error: [snuffleupagus][config] Invalid value 'asd-->' for `var` on line 1 in Unknown on line 0 + +Fatal error: [snuffleupagus][config] Invalid `->` position. in Unknown on line 0 + +Fatal error: [snuffleupagus][config] Invalid value 'asd-->' for `var` on line 1 in Unknown on line 0 \ No newline at end of file diff --git a/src/tests/broken_conf_local_var_8.phpt b/src/tests/broken_conf_local_var_8.phpt index 749a1aa8..00069ecb 100644 --- a/src/tests/broken_conf_local_var_8.phpt +++ b/src/tests/broken_conf_local_var_8.phpt @@ -6,5 +6,9 @@ Broken configuration sp.configuration_file={PWD}/config/broken_conf_local_var_8.ini --FILE-- --EXPECT-- -[snuffleupagus][0.0.0.0][config][error] Invalid `]` position. -[snuffleupagus][0.0.0.0][config][error] Invalid value 'asd[asd]"asd"' for `var` on line 1. +PHP Fatal error: [snuffleupagus][config] Invalid `]` position. in Unknown on line 0 +PHP Fatal error: [snuffleupagus][config] Invalid value 'asd[asd]"asd"' for `var` on line 1 in Unknown on line 0 + +Fatal error: [snuffleupagus][config] Invalid `]` position. in Unknown on line 0 + +Fatal error: [snuffleupagus][config] Invalid value 'asd[asd]"asd"' for `var` on line 1 in Unknown on line 0 \ No newline at end of file diff --git a/src/tests/broken_conf_local_var_9.phpt b/src/tests/broken_conf_local_var_9.phpt index 6f706db6..7536e306 100644 --- a/src/tests/broken_conf_local_var_9.phpt +++ b/src/tests/broken_conf_local_var_9.phpt @@ -6,5 +6,9 @@ Broken configuration sp.configuration_file={PWD}/config/broken_conf_local_var_9.ini --FILE-- --EXPECT-- -[snuffleupagus][0.0.0.0][config][error] Invalid `]` position. -[snuffleupagus][0.0.0.0][config][error] Invalid value 'asd[asd]'asd'' for `var` on line 1. +PHP Fatal error: [snuffleupagus][config] Invalid `]` position. in Unknown on line 0 +PHP Fatal error: [snuffleupagus][config] Invalid value 'asd[asd]'asd'' for `var` on line 1 in Unknown on line 0 + +Fatal error: [snuffleupagus][config] Invalid `]` position. in Unknown on line 0 + +Fatal error: [snuffleupagus][config] Invalid value 'asd[asd]'asd'' for `var` on line 1 in Unknown on line 0 \ No newline at end of file diff --git a/src/tests/broken_conf_lots_of_quotes.phpt b/src/tests/broken_conf_lots_of_quotes.phpt index bad4a350..e11d54b7 100644 --- a/src/tests/broken_conf_lots_of_quotes.phpt +++ b/src/tests/broken_conf_lots_of_quotes.phpt @@ -6,4 +6,6 @@ Configuration line with too many quotes sp.configuration_file={PWD}/config/broken_conf_lots_of_quotes.ini --FILE-- --EXPECT-- -[snuffleupagus][0.0.0.0][error][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. +PHP Fatal error: [snuffleupagus][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][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 \ No newline at end of file diff --git a/src/tests/broken_conf_missing_script.phpt b/src/tests/broken_conf_missing_script.phpt index 3922493c..2166d3bc 100644 --- a/src/tests/broken_conf_missing_script.phpt +++ b/src/tests/broken_conf_missing_script.phpt @@ -8,5 +8,7 @@ sp.configuration_file={PWD}/config/broken_conf_missing_script.ini echo 1; ?> --EXPECTF-- -[snuffleupagus][0.0.0.0][config][error] The `script` directive is mandatory in '.enable();' on line 1. -1 +PHP Fatal error: [snuffleupagus][config] The `script` directive is mandatory in '.enable();' on line 1 in Unknown on line 0 + +Fatal error: [snuffleupagus][config] The `script` directive is mandatory in '.enable();' on line 1 in Unknown on line 0 +1 \ No newline at end of file diff --git a/src/tests/broken_conf_mutually_exclusive.phpt b/src/tests/broken_conf_mutually_exclusive.phpt index 58977703..6cc9bd6e 100644 --- a/src/tests/broken_conf_mutually_exclusive.phpt +++ b/src/tests/broken_conf_mutually_exclusive.phpt @@ -6,4 +6,6 @@ Broken configuration sp.configuration_file={PWD}/config/broken_conf_mutually_exclusive.ini --FILE-- --EXPECT-- -[snuffleupagus][0.0.0.0][config][error] 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. +PHP Fatal error: [snuffleupagus][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 + +Fatal error: [snuffleupagus][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 diff --git a/src/tests/broken_conf_mutually_exclusive10.phpt b/src/tests/broken_conf_mutually_exclusive10.phpt index 0e7903ed..a9c15d71 100644 --- a/src/tests/broken_conf_mutually_exclusive10.phpt +++ b/src/tests/broken_conf_mutually_exclusive10.phpt @@ -6,4 +6,6 @@ Broken configuration - enabled/disabled readonly sp.configuration_file={PWD}/config/broken_conf_mutually_exclusive10.ini --FILE-- --EXPECT-- -[snuffleupagus][0.0.0.0][config][error] A rule can't be enabled and disabled on line 1. +PHP Fatal error: [snuffleupagus][config] A rule can't be enabled and disabled on line 1 in Unknown on line 0 + +Fatal error: [snuffleupagus][config] A rule can't be enabled and disabled on line 1 in Unknown on line 0 \ No newline at end of file diff --git a/src/tests/broken_conf_mutually_exclusive2.phpt b/src/tests/broken_conf_mutually_exclusive2.phpt index cfbf13a9..570b917b 100644 --- a/src/tests/broken_conf_mutually_exclusive2.phpt +++ b/src/tests/broken_conf_mutually_exclusive2.phpt @@ -6,4 +6,6 @@ Broken configuration sp.configuration_file={PWD}/config/broken_conf_mutually_exclusive2.ini --FILE-- --EXPECT-- -[snuffleupagus][0.0.0.0][config][error] 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. \ No newline at end of file +PHP Fatal error: [snuffleupagus][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 + +Fatal error: [snuffleupagus][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 diff --git a/src/tests/broken_conf_mutually_exclusive3.phpt b/src/tests/broken_conf_mutually_exclusive3.phpt index 7b94318d..e7387ebc 100644 --- a/src/tests/broken_conf_mutually_exclusive3.phpt +++ b/src/tests/broken_conf_mutually_exclusive3.phpt @@ -6,4 +6,6 @@ Broken configuration sp.configuration_file={PWD}/config/broken_conf_mutually_exclusive3.ini --FILE-- --EXPECT-- -[snuffleupagus][0.0.0.0][config][error] 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. +PHP Fatal error: [snuffleupagus][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 + +Fatal error: [snuffleupagus][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 diff --git a/src/tests/broken_conf_mutually_exclusive4.phpt b/src/tests/broken_conf_mutually_exclusive4.phpt index a60f3fa2..82b2dcc1 100644 --- a/src/tests/broken_conf_mutually_exclusive4.phpt +++ b/src/tests/broken_conf_mutually_exclusive4.phpt @@ -6,4 +6,6 @@ Broken configuration sp.configuration_file={PWD}/config/broken_conf_mutually_exclusive4.ini --FILE-- --EXPECT-- -[snuffleupagus][0.0.0.0][config][error] 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. +PHP Fatal error: [snuffleupagus][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][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 \ No newline at end of file diff --git a/src/tests/broken_conf_mutually_exclusive5.phpt b/src/tests/broken_conf_mutually_exclusive5.phpt index 0a9e0fd4..b23fba60 100644 --- a/src/tests/broken_conf_mutually_exclusive5.phpt +++ b/src/tests/broken_conf_mutually_exclusive5.phpt @@ -6,4 +6,6 @@ Broken configuration sp.configuration_file={PWD}/config/broken_conf_mutually_exclusive5.ini --FILE-- --EXPECT-- -[snuffleupagus][0.0.0.0][config][error] Invalid configuration line: 'sp.disabled_functions.function("system").ret("0").drop().ret_r("^0$");': '.r_ret' and '.ret' are mutually exclusive on line 1. +PHP Fatal error: [snuffleupagus][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 + +Fatal error: [snuffleupagus][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 diff --git a/src/tests/broken_conf_mutually_exclusive6.phpt b/src/tests/broken_conf_mutually_exclusive6.phpt index 4c8cf729..7f6466c4 100644 --- a/src/tests/broken_conf_mutually_exclusive6.phpt +++ b/src/tests/broken_conf_mutually_exclusive6.phpt @@ -6,4 +6,6 @@ Broken configuration sp.configuration_file={PWD}/config/broken_conf_mutually_exclusive6.ini --FILE-- --EXPECT-- -[snuffleupagus][0.0.0.0][config][error] 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. \ No newline at end of file +PHP Fatal error: [snuffleupagus][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][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 \ No newline at end of file diff --git a/src/tests/broken_conf_mutually_exclusive7.phpt b/src/tests/broken_conf_mutually_exclusive7.phpt index d9507f6f..1d659597 100644 --- a/src/tests/broken_conf_mutually_exclusive7.phpt +++ b/src/tests/broken_conf_mutually_exclusive7.phpt @@ -6,4 +6,6 @@ Broken configuration sp.configuration_file={PWD}/config/broken_conf_mutually_exclusive7.ini --FILE-- --EXPECT-- -[snuffleupagus][0.0.0.0][config][error] 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. +PHP Fatal error: [snuffleupagus][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][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 \ No newline at end of file diff --git a/src/tests/broken_conf_mutually_exclusive8.phpt b/src/tests/broken_conf_mutually_exclusive8.phpt index f7bf341e..67824608 100644 --- a/src/tests/broken_conf_mutually_exclusive8.phpt +++ b/src/tests/broken_conf_mutually_exclusive8.phpt @@ -6,4 +6,6 @@ Broken configuration sp.configuration_file={PWD}/config/broken_conf_mutually_exclusive8.ini --FILE-- --EXPECT-- -[snuffleupagus][0.0.0.0][config][error] Invalid configuration line: 'sp.disabled_functions.ret("0").drop();': must take a function name on line 1. \ No newline at end of file +PHP Fatal error: [snuffleupagus][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][config] Invalid configuration line: 'sp.disabled_functions.ret("0").drop();': must take a function name on line 1 in Unknown on line 0 \ No newline at end of file diff --git a/src/tests/broken_conf_mutually_exclusive9.phpt b/src/tests/broken_conf_mutually_exclusive9.phpt index adf90adf..400852d0 100644 --- a/src/tests/broken_conf_mutually_exclusive9.phpt +++ b/src/tests/broken_conf_mutually_exclusive9.phpt @@ -6,4 +6,6 @@ Broken configuration - enabled/disabled unserialize sp.configuration_file={PWD}/config/broken_conf_mutually_exclusive9.ini --FILE-- --EXPECT-- -[snuffleupagus][0.0.0.0][config][error] A rule can't be enabled and disabled on line 1. +PHP Fatal error: [snuffleupagus][config] A rule can't be enabled and disabled on line 1 in Unknown on line 0 + +Fatal error: [snuffleupagus][config] A rule can't be enabled and disabled on line 1 in Unknown on line 0 \ No newline at end of file diff --git a/src/tests/broken_conf_no_cookie_action.phpt b/src/tests/broken_conf_no_cookie_action.phpt index 49be31e5..3085d9e5 100644 --- a/src/tests/broken_conf_no_cookie_action.phpt +++ b/src/tests/broken_conf_no_cookie_action.phpt @@ -6,4 +6,6 @@ Bad config, invalid action. sp.configuration_file={PWD}/config/broken_conf_cookie_action.ini --FILE-- --EXPECT-- -[snuffleupagus][0.0.0.0][config][error] You must specify a at least one action to a cookie on line 1. +PHP Fatal error: [snuffleupagus][config] You must specify a at least one action to a cookie on line 1 in Unknown on line 0 + +Fatal error: [snuffleupagus][config] You must specify a at least one action to a cookie on line 1 in Unknown on line 0 \ No newline at end of file diff --git a/src/tests/broken_conf_no_cookie_name.phpt b/src/tests/broken_conf_no_cookie_name.phpt index 10fde3e9..91541249 100644 --- a/src/tests/broken_conf_no_cookie_name.phpt +++ b/src/tests/broken_conf_no_cookie_name.phpt @@ -6,4 +6,6 @@ Borken configuration - encrypted cookie with no name sp.configuration_file={PWD}/config/config_encrypted_cookies_noname.ini --FILE-- --EXPECT-- -[snuffleupagus][0.0.0.0][config][error] You must specify a cookie name/regexp on line 2. +PHP Fatal error: [snuffleupagus][config] You must specify a cookie name/regexp on line 2 in Unknown on line 0 + +Fatal error: [snuffleupagus][config] You must specify a cookie name/regexp on line 2 in Unknown on line 0 \ No newline at end of file diff --git a/src/tests/broken_conf_nonexisting_script.phpt b/src/tests/broken_conf_nonexisting_script.phpt index 2af2b75c..68ca0013 100644 --- a/src/tests/broken_conf_nonexisting_script.phpt +++ b/src/tests/broken_conf_nonexisting_script.phpt @@ -8,5 +8,7 @@ sp.configuration_file={PWD}/config/broken_conf_nonexisting_script.ini echo 1; ?> --EXPECTF-- -[snuffleupagus][0.0.0.0][config][error] The `script` (./non_existing_script.sh) doesn't exist on line 1. -1 +PHP Fatal error: [snuffleupagus][config] The `script` (./non_existing_script.sh) doesn't exist on line 1 in Unknown on line 0 + +Fatal error: [snuffleupagus][config] The `script` (./non_existing_script.sh) doesn't exist on line 1 in Unknown on line 0 +1 \ No newline at end of file diff --git a/src/tests/broken_conf_quotes.phpt b/src/tests/broken_conf_quotes.phpt index a9286504..ed2c87fa 100644 --- a/src/tests/broken_conf_quotes.phpt +++ b/src/tests/broken_conf_quotes.phpt @@ -6,5 +6,9 @@ Broken configuration - missing quote sp.configuration_file={PWD}/config/broken_conf_quotes.ini --FILE-- --EXPECT-- -[snuffleupagus][0.0.0.0][config][error] You forgot to close a bracket. -[snuffleupagus][0.0.0.0][config][error] Invalid value '_SERVER[PHP_SELF' for `var` on line 1. +PHP Fatal error: [snuffleupagus][config] You forgot to close a bracket. in Unknown on line 0 +PHP Fatal error: [snuffleupagus][config] Invalid value '_SERVER[PHP_SELF' for `var` on line 1 in Unknown on line 0 + +Fatal error: [snuffleupagus][config] You forgot to close a bracket. in Unknown on line 0 + +Fatal error: [snuffleupagus][config] Invalid value '_SERVER[PHP_SELF' for `var` on line 1 in Unknown on line 0 \ No newline at end of file diff --git a/src/tests/broken_conf_readonly_exec.phpt b/src/tests/broken_conf_readonly_exec.phpt index 0f1fd54c..56881da4 100644 --- a/src/tests/broken_conf_readonly_exec.phpt +++ b/src/tests/broken_conf_readonly_exec.phpt @@ -8,5 +8,7 @@ sp.configuration_file={PWD}/config/broken_conf_readonly_exec.ini echo 1; ?> --EXPECTF-- -[snuffleupagus][0.0.0.0][config][error] Trailing chars '234);' at the end of '.enable(1234);' on line 1. -1 +PHP Fatal error: [snuffleupagus][config] Trailing chars '234);' at the end of '.enable(1234);' on line 1 in Unknown on line 0 + +Fatal error: [snuffleupagus][config] Trailing chars '234);' at the end of '.enable(1234);' on line 1 in Unknown on line 0 +1 \ No newline at end of file diff --git a/src/tests/broken_conf_samesite.phpt b/src/tests/broken_conf_samesite.phpt index 26e525c2..a7c341fd 100644 --- a/src/tests/broken_conf_samesite.phpt +++ b/src/tests/broken_conf_samesite.phpt @@ -6,4 +6,6 @@ Bad config, invalid samesite type. sp.configuration_file={PWD}/config/broken_conf_cookie_samesite.ini --FILE-- --EXPECT-- -[snuffleupagus][0.0.0.0][config][error] nop is an invalid value to samesite (expected Lax or Strict) on line 1. +PHP Fatal error: [snuffleupagus][config] nop is an invalid value to samesite (expected Lax or Strict) on line 1 in Unknown on line 0 + +Fatal error: [snuffleupagus][config] nop is an invalid value to samesite (expected Lax or Strict) on line 1 in Unknown on line 0 \ No newline at end of file diff --git a/src/tests/broken_conf_shown_in_phpinfo.phpt b/src/tests/broken_conf_shown_in_phpinfo.phpt index 5053ee0c..0a0ceb86 100644 --- a/src/tests/broken_conf_shown_in_phpinfo.phpt +++ b/src/tests/broken_conf_shown_in_phpinfo.phpt @@ -17,6 +17,10 @@ if (strstr($info, 'Valid config => no') !== FALSE) { } ?> --EXPECTF-- -[snuffleupagus][0.0.0.0][config][error] Failed to compile '*.': %aon line 1. -[snuffleupagus][0.0.0.0][config][error] '.filename_r()' is expecting a valid regexp, and not '"*."' on line 1. +PHP Fatal error: [snuffleupagus][config] Failed to compile '*.': %s on line 1. in Unknown on line 0 +PHP Fatal error: [snuffleupagus][config] '.filename_r()' is expecting a valid regexp, and not '"*."' on line 1 in Unknown on line 0 + +Fatal error: [snuffleupagus][config] Failed to compile '*.': %s on line 1. in Unknown on line 0 + +Fatal error: [snuffleupagus][config] '.filename_r()' is expecting a valid regexp, and not '"*."' on line 1 in Unknown on line 0 win diff --git a/src/tests/broken_conf_truncated.phpt b/src/tests/broken_conf_truncated.phpt index 74f3524a..83d76339 100644 --- a/src/tests/broken_conf_truncated.phpt +++ b/src/tests/broken_conf_truncated.phpt @@ -6,4 +6,6 @@ Bad boolean value in configuration sp.configuration_file={PWD}/config/config_broken_conf_truncated.ini --FILE-- --EXPECT-- -[snuffleupagus][0.0.0.0][error][error] A valid string as parameter is expected on line 1. +PHP Fatal error: [snuffleupagus][error] A valid string as parameter is expected on line 1 in Unknown on line 0 + +Fatal error: [snuffleupagus][error] A valid string as parameter is expected on line 1 in Unknown on line 0 \ No newline at end of file diff --git a/src/tests/broken_conf_unserialize.phpt b/src/tests/broken_conf_unserialize.phpt index b772f658..e6781b14 100644 --- a/src/tests/broken_conf_unserialize.phpt +++ b/src/tests/broken_conf_unserialize.phpt @@ -8,5 +8,7 @@ sp.configuration_file={PWD}/config/broken_conf_unserialize.ini echo 1; ?> --EXPECTF-- -[snuffleupagus][0.0.0.0][config][error] Trailing chars '234);' at the end of '.enable(1234);' on line 1. -1 +PHP Fatal error: [snuffleupagus][config] Trailing chars '234);' at the end of '.enable(1234);' on line 1 in Unknown on line 0 + +Fatal error: [snuffleupagus][config] Trailing chars '234);' at the end of '.enable(1234);' on line 1 in Unknown on line 0 +1 \ No newline at end of file diff --git a/src/tests/broken_conf_upload_validation.phpt b/src/tests/broken_conf_upload_validation.phpt index 944e731d..ea74a5a2 100644 --- a/src/tests/broken_conf_upload_validation.phpt +++ b/src/tests/broken_conf_upload_validation.phpt @@ -8,5 +8,7 @@ sp.configuration_file={PWD}/config/borken_conf_upload_validation.ini echo 1; ?> --EXPECTF-- -[snuffleupagus][0.0.0.0][error][error] A valid string as parameter is expected on line 1. -1 +PHP Fatal error: [snuffleupagus][error] A valid string as parameter is expected on line 1 in Unknown on line 0 + +Fatal error: [snuffleupagus][error] A valid string as parameter is expected on line 1 in Unknown on line 0 +1 \ No newline at end of file diff --git a/src/tests/broken_conf_weird_keyword.phpt b/src/tests/broken_conf_weird_keyword.phpt index 464800a8..3a456f59 100644 --- a/src/tests/broken_conf_weird_keyword.phpt +++ b/src/tests/broken_conf_weird_keyword.phpt @@ -6,4 +6,6 @@ Bad config, unknown keyword sp.configuration_file={PWD}/config/broken_conf_weird_keyword.ini --FILE-- --EXPECT-- -[snuffleupagus][0.0.0.0][config][error] Trailing chars '.not_a_valid_keyword("test");' at the end of '.enable().not_a_valid_keyword("test");' on line 1. +PHP Fatal error: [snuffleupagus][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][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 \ No newline at end of file diff --git a/src/tests/broken_conf_wrong_quotes.phpt b/src/tests/broken_conf_wrong_quotes.phpt index 00aaefb6..35e38260 100644 --- a/src/tests/broken_conf_wrong_quotes.phpt +++ b/src/tests/broken_conf_wrong_quotes.phpt @@ -6,4 +6,6 @@ Configuration line with too many quotes sp.configuration_file={PWD}/config/broken_conf_wrong_quotes.ini --FILE-- --EXPECT-- -[snuffleupagus][0.0.0.0][error][error] There is an issue with the parsing of '"\)': it doesn't look like a valid string on line 1. +PHP Fatal error: [snuffleupagus][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][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 \ No newline at end of file diff --git a/src/tests/broken_conf_wrong_type.phpt b/src/tests/broken_conf_wrong_type.phpt index 765c5762..b7e0d28c 100644 --- a/src/tests/broken_conf_wrong_type.phpt +++ b/src/tests/broken_conf_wrong_type.phpt @@ -6,4 +6,6 @@ Broken conf with wrong type sp.configuration_file={PWD}/config/broken_conf_wrong_type.ini --FILE-- --EXPECTF-- -[snuffleupagus][0.0.0.0][error][error] .ret_type() is expecting a valid php type ('false', 'true', 'array'. 'object', 'long', 'double', 'null', 'resource', 'reference', 'undef') on line 5. +PHP Fatal error: [snuffleupagus][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][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 \ No newline at end of file diff --git a/src/tests/broken_invalid_client_ip4.phpt b/src/tests/broken_invalid_client_ip4.phpt index cd620082..e8a52606 100644 --- a/src/tests/broken_invalid_client_ip4.phpt +++ b/src/tests/broken_invalid_client_ip4.phpt @@ -13,7 +13,4 @@ sp.configuration_file={PWD}/config/disabled_functions_cidr.ini strpos("1337", "1"); ?> --EXPECTF-- -[snuffleupagus][xyz][cidr_match][error] Weird ip (xyz) family -[snuffleupagus][xyz][cidr_match][error] Weird ip (xyz) family -[snuffleupagus][xyz][cidr_match][error] Weird ip (xyz) family -[snuffleupagus][xyz][cidr_match][error] Weird ip (xyz) family +Fatal error: [snuffleupagus][cidr_match] 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_regexp.phpt b/src/tests/broken_regexp.phpt index 7c7ac9c9..85b9ef32 100644 --- a/src/tests/broken_regexp.phpt +++ b/src/tests/broken_regexp.phpt @@ -6,5 +6,9 @@ Broken regexp sp.configuration_file={PWD}/config/broken_regexp.ini --FILE-- --EXPECTF-- -[snuffleupagus][0.0.0.0][config][error] Failed to compile '^$[': %aon line 1. -[snuffleupagus][0.0.0.0][config][error] '.value_r()' is expecting a valid regexp, and not '"^$["' on line 1. +PHP Fatal error: [snuffleupagus][config] Failed to compile '^$[': missing terminating ] for character class on line 1. in Unknown on line 0 +PHP Fatal error: [snuffleupagus][config] '.value_r()' is expecting a valid regexp, and not '"^$["' on line 1 in Unknown on line 0 + +Fatal error: [snuffleupagus][config] Failed to compile '^$[': missing terminating ] for character class on line 1. in Unknown on line 0 + +Fatal error: [snuffleupagus][config] '.value_r()' is expecting a valid regexp, and not '"^$["' on line 1 in Unknown on line 0 \ No newline at end of file diff --git a/src/tests/broken_unmatching_brackets.phpt b/src/tests/broken_unmatching_brackets.phpt index ee2bc4d5..3825dcd6 100644 --- a/src/tests/broken_unmatching_brackets.phpt +++ b/src/tests/broken_unmatching_brackets.phpt @@ -6,5 +6,9 @@ Broken configuration - unmatching brackets sp.configuration_file={PWD}/config/config_unmatching_brackets.ini --FILE-- --EXPECTF-- -[snuffleupagus][0.0.0.0][config][error] Invalid `]` position. -[snuffleupagus][0.0.0.0][config][error] Invalid value 'arr[b]]]]]' for `param` on line 1. +PHP Fatal error: [snuffleupagus][config] Invalid `]` position. in Unknown on line 0 +PHP Fatal error: [snuffleupagus][config] Invalid value 'arr[b]]]]]' for `param` on line 1 in Unknown on line 0 + +Fatal error: [snuffleupagus][config] Invalid `]` position. in Unknown on line 0 + +Fatal error: [snuffleupagus][config] Invalid value 'arr[b]]]]]' for `param` on line 1 in Unknown on line 0 \ No newline at end of file diff --git a/src/tests/crypt_session_invalid.phpt b/src/tests/crypt_session_invalid.phpt index 687a4070..b7880db9 100644 --- a/src/tests/crypt_session_invalid.phpt +++ b/src/tests/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-- -[snuffleupagus][127.0.0.2][cookie_encryption][drop] Something went wrong with the decryption of the session. \ No newline at end of file +Fatal error: [snuffleupagus][cookie_encryption] Something went wrong with the decryption of the session in %a/src/tests/crypt_session_invalid.php on line 9 \ No newline at end of file diff --git a/src/tests/deny_writable_execution.phpt b/src/tests/deny_writable_execution.phpt index c399d355..916328e6 100644 --- a/src/tests/deny_writable_execution.phpt +++ b/src/tests/deny_writable_execution.phpt @@ -31,8 +31,6 @@ chmod("$dir/writable_file.txt", 0777); include "$dir/non_writable_file.txt"; include "$dir/writable_file.txt"; ?> ---EXPECTF-- -[snuffleupagus][0.0.0.0][readonly_exec][drop] Attempted execution of a writable file (%a/tests/deny_writable_execution.php). --CLEAN-- +--EXPECTF-- +Fatal error: [snuffleupagus][readonly_exec] 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_execution_disabled.phpt b/src/tests/deny_writable_execution_disabled.phpt index 6d1233bf..dd01f010 100644 --- a/src/tests/deny_writable_execution_disabled.phpt +++ b/src/tests/deny_writable_execution_disabled.phpt @@ -29,4 +29,4 @@ chmod("$dir/non_writable_file.txt", 0777); chmod("$dir/writable_file.txt", 0777); unlink("$dir/non_writable_file.txt"); unlink("$dir/writable_file.txt"); -?> \ No newline at end of file +?> diff --git a/src/tests/deny_writable_execution_simulation.phpt b/src/tests/deny_writable_execution_simulation.phpt index d1ccb7c4..7f3546a2 100644 --- a/src/tests/deny_writable_execution_simulation.phpt +++ b/src/tests/deny_writable_execution_simulation.phpt @@ -32,10 +32,6 @@ chmod("$dir/non_writable_file.txt", 0400); include "$dir/writable_file.txt"; include "$dir/non_writable_file.txt"; ?> ---EXPECTF-- -[snuffleupagus][0.0.0.0][readonly_exec][simulation] Attempted execution of a writable file (%a/writable_file.txt). -Code execution within a writable file. -Code execution within a non-writable file. --CLEAN-- +--EXPECTF-- +Warning: [snuffleupagus][readonly_exec] Attempted execution of a writable file (%a/src/tests/deny_writable_execution_simulation.php). in %a/src/tests/deny_writable_execution_simulation.php on line 2 + +Warning: [snuffleupagus][readonly_exec] Attempted execution of a writable file (%a/src/tests/writable_file.txt). in %a/src/tests/deny_writable_execution_simulation.php on line 12 + +Warning: [snuffleupagus][readonly_exec] Attempted execution of a writable file (%a/src/tests/writable_file.txt). in %a/src/tests/writable_file.txt on line 1 +Code execution within a writable file. +Code execution within a non-writable file. diff --git a/src/tests/disabled_function_echo.phpt b/src/tests/disabled_function_echo.phpt index a884e4a0..21e20025 100644 --- a/src/tests/disabled_function_echo.phpt +++ b/src/tests/disabled_function_echo.phpt @@ -15,4 +15,5 @@ test("oops"); ?> --CLEAN-- --EXPECTF-- -qwerty[snuffleupagus][0.0.0.0][disabled_function][drop] Aborted execution on call of the function 'echo' in %a/tests/disabled_function_echo.php:3. +qwerty +Fatal error: [snuffleupagus][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 diff --git a/src/tests/disabled_function_echo_2.phpt b/src/tests/disabled_function_echo_2.phpt index 20dbee48..66cace3e 100644 --- a/src/tests/disabled_function_echo_2.phpt +++ b/src/tests/disabled_function_echo_2.phpt @@ -11,4 +11,5 @@ echo "1", "oops"; ?> --CLEAN-- --EXPECTF-- -qwe1[snuffleupagus][0.0.0.0][disabled_function][drop] Aborted execution on call of the function 'echo' in %a/tests/disabled_function_echo_2.php:3. +qwe1 +Fatal error: [snuffleupagus][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 diff --git a/src/tests/disabled_function_echo_local_var.phpt b/src/tests/disabled_function_echo_local_var.phpt index bfa3c8c9..300f38e3 100644 --- a/src/tests/disabled_function_echo_local_var.phpt +++ b/src/tests/disabled_function_echo_local_var.phpt @@ -17,4 +17,5 @@ test(); --CLEAN-- --EXPECTF-- 3 -[snuffleupagus][0.0.0.0][disabled_function][drop] Aborted execution on call of the function 'echo' in %a/tests/disabled_function_echo_local_var.php:3. + +Fatal error: [snuffleupagus][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 diff --git a/src/tests/disabled_function_local_var.phpt b/src/tests/disabled_function_local_var.phpt index 2eb0c533..99b2b085 100644 --- a/src/tests/disabled_function_local_var.phpt +++ b/src/tests/disabled_function_local_var.phpt @@ -21,4 +21,5 @@ test(); Value of a: 1338 2 Value of a: 1337 -[snuffleupagus][0.0.0.0][disabled_function][drop] Aborted execution on call of the function 'strlen' in %a/tests/disabled_function_local_var.php:%d. \ No newline at end of file + +Fatal error: [snuffleupagus][disabled_function] Aborted execution on call of the function 'strlen' in %a/disabled_function_local_var.php on line 4 \ No newline at end of file diff --git a/src/tests/disabled_function_local_var_10.phpt b/src/tests/disabled_function_local_var_10.phpt index d55d590a..49029720 100644 --- a/src/tests/disabled_function_local_var_10.phpt +++ b/src/tests/disabled_function_local_var_10.phpt @@ -41,4 +41,5 @@ array(2) { } } } -[snuffleupagus][0.0.0.0][disabled_function][drop] Aborted execution on call of the function 'strlen' in %a/tests/disabled_function_local_var_10.php:%d. + +Fatal error: [snuffleupagus][disabled_function] Aborted execution on call of the function 'strlen' in %a/disabled_function_local_var_10.php on line 7 \ No newline at end of file diff --git a/src/tests/disabled_function_local_var_2.phpt b/src/tests/disabled_function_local_var_2.phpt index aff5ed55..5b21d070 100644 --- a/src/tests/disabled_function_local_var_2.phpt +++ b/src/tests/disabled_function_local_var_2.phpt @@ -43,4 +43,5 @@ array(2) { [123]=> string(5) "block" } -[snuffleupagus][0.0.0.0][disabled_function][drop] Aborted execution on call of the function 'strlen' in %a/tests/disabled_function_local_var_2.php:%d. + +Fatal error: [snuffleupagus][disabled_function] Aborted execution on call of the function 'strlen' in %a/disabled_function_local_var_2.php on line 4 \ No newline at end of file diff --git a/src/tests/disabled_function_local_var_3.phpt b/src/tests/disabled_function_local_var_3.phpt index 94b9f286..597be1d0 100644 --- a/src/tests/disabled_function_local_var_3.phpt +++ b/src/tests/disabled_function_local_var_3.phpt @@ -42,4 +42,5 @@ array(2) { string(5) "block" } } -[snuffleupagus][0.0.0.0][disabled_function][drop] Aborted execution on call of the function 'strlen' in %a/tests/disabled_function_local_var_3.php:%d. + +Fatal error: [snuffleupagus][disabled_function] Aborted execution on call of the function 'strlen' in %a/disabled_function_local_var_3.php on line 3 \ No newline at end of file diff --git a/src/tests/disabled_function_local_var_4.phpt b/src/tests/disabled_function_local_var_4.phpt index 55e46cba..b441576f 100644 --- a/src/tests/disabled_function_local_var_4.phpt +++ b/src/tests/disabled_function_local_var_4.phpt @@ -53,4 +53,5 @@ test(); --EXPECTF-- Valeur: valeur de a Valeur: valeur de apres -[snuffleupagus][0.0.0.0][disabled_function][drop] Aborted execution on call of the function 'strlen' in %a/tests/disabled_function_local_var_4.php:%d. + +Fatal error: [snuffleupagus][disabled_function] Aborted execution on call of the function 'strlen' in %a/disabled_function_local_var_4.php on line 36 \ No newline at end of file diff --git a/src/tests/disabled_function_local_var_5.phpt b/src/tests/disabled_function_local_var_5.phpt index 4b4a59c7..602e96e6 100644 --- a/src/tests/disabled_function_local_var_5.phpt +++ b/src/tests/disabled_function_local_var_5.phpt @@ -30,4 +30,5 @@ object(stdClass)#1 (1) { ["zxc"]=> string(16) "not a good value" } -[snuffleupagus][0.0.0.0][disabled_function][drop] Aborted execution on call of the function 'strlen' in %a/tests/disabled_function_local_var_5.php:%d. + +Fatal error: [snuffleupagus][disabled_function] Aborted execution on call of the function 'strlen' in %a/disabled_function_local_var_5.php on line 3 \ No newline at end of file diff --git a/src/tests/disabled_function_local_var_6.phpt b/src/tests/disabled_function_local_var_6.phpt index b87936b3..18663539 100644 --- a/src/tests/disabled_function_local_var_6.phpt +++ b/src/tests/disabled_function_local_var_6.phpt @@ -28,4 +28,5 @@ class test_object { ?> --EXPECTF-- Valeur: no good -[snuffleupagus][0.0.0.0][disabled_function][drop] Aborted execution on call of the function 'strlen' in %a/tests/disabled_function_local_var_6.php:%d. + +Fatal error: [snuffleupagus][disabled_function] Aborted execution on call of the function 'strlen' in %a/disabled_function_local_var_6.php on line 4 \ No newline at end of file diff --git a/src/tests/disabled_function_local_var_7.phpt b/src/tests/disabled_function_local_var_7.phpt index e35f4a17..e615a801 100644 --- a/src/tests/disabled_function_local_var_7.phpt +++ b/src/tests/disabled_function_local_var_7.phpt @@ -28,4 +28,5 @@ class test_object { ?> --EXPECTF-- Valeur: qwerty -[snuffleupagus][0.0.0.0][disabled_function][drop] Aborted execution on call of the function 'strlen' in %a/tests/disabled_function_local_var_7.php:%d. + +Fatal error: [snuffleupagus][disabled_function] Aborted execution on call of the function 'strlen' in %a/disabled_function_local_var_7.php on line 4 \ No newline at end of file diff --git a/src/tests/disabled_function_local_var_8.phpt b/src/tests/disabled_function_local_var_8.phpt index 57c4a50a..1f1a0dc7 100644 --- a/src/tests/disabled_function_local_var_8.phpt +++ b/src/tests/disabled_function_local_var_8.phpt @@ -17,4 +17,5 @@ namespace asd { ?> --EXPECTF-- Valeur: qwerty -[snuffleupagus][0.0.0.0][disabled_function][drop] Aborted execution on call of the function 'strlen' in %a/tests/disabled_function_local_var_8.php:%d. + +Fatal error: [snuffleupagus][disabled_function] Aborted execution on call of the function 'strlen' in %a/disabled_function_local_var_8.php on line 8 \ No newline at end of file diff --git a/src/tests/disabled_function_local_var_9.phpt b/src/tests/disabled_function_local_var_9.phpt index fd2fd658..458d8780 100644 --- a/src/tests/disabled_function_local_var_9.phpt +++ b/src/tests/disabled_function_local_var_9.phpt @@ -17,4 +17,5 @@ namespace asd { ?> --EXPECTF-- Valeur: asdfgh -[snuffleupagus][0.0.0.0][disabled_function][drop] Aborted execution on call of the function 'strlen' in %a/tests/disabled_function_local_var_9.php:%d. + +Fatal error: [snuffleupagus][disabled_function] Aborted execution on call of the function 'strlen' in %a/disabled_function_local_var_9.php on line 8 \ No newline at end of file diff --git a/src/tests/disabled_function_local_var_const.phpt b/src/tests/disabled_function_local_var_const.phpt index 3f509cdf..8d9d58a7 100644 --- a/src/tests/disabled_function_local_var_const.phpt +++ b/src/tests/disabled_function_local_var_const.phpt @@ -11,4 +11,4 @@ define("MY_CONST", $a); strlen("test"); ?> --EXPECTF-- -[snuffleupagus][0.0.0.0][disabled_function][drop] Aborted execution on call of the function 'strlen' in %a/tests/disabled_function_local_var_const.php:4. +Fatal error: [snuffleupagus][disabled_function] Aborted execution on call of the function 'strlen' in %a/disabled_function_local_var_const.php on line 4 \ No newline at end of file diff --git a/src/tests/disabled_function_local_var_obj.phpt b/src/tests/disabled_function_local_var_obj.phpt index 292f6f63..29d57cc3 100644 --- a/src/tests/disabled_function_local_var_obj.phpt +++ b/src/tests/disabled_function_local_var_obj.phpt @@ -22,4 +22,5 @@ echo strlen($test->$arg) . "\n"; ?> --EXPECTF-- 3 -[snuffleupagus][0.0.0.0][disabled_function][drop] Aborted execution on call of the function 'strlen' in %a/tests/disabled_function_local_var_obj.php:%d. + +Fatal error: [snuffleupagus][disabled_function] Aborted execution on call of the function 'strlen' in %a/disabled_function_local_var_obj.php on line 14 \ No newline at end of file diff --git a/src/tests/disabled_function_param.phpt b/src/tests/disabled_function_param.phpt index e006a4be..9b8b9429 100644 --- a/src/tests/disabled_function_param.phpt +++ b/src/tests/disabled_function_param.phpt @@ -16,4 +16,5 @@ qweqwe(Array(2)); ?> --EXPECTF-- OK -[snuffleupagus][0.0.0.0][disabled_function][drop] Aborted execution on call of the function 'qweqwe' in %a/tests/disabled_function_param.php:%d, because its argument '$asd' content (2) matched a rule. + +Fatal error: [snuffleupagus][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 diff --git a/src/tests/disabled_function_print.phpt b/src/tests/disabled_function_print.phpt index fc053608..a8b10b4a 100644 --- a/src/tests/disabled_function_print.phpt +++ b/src/tests/disabled_function_print.phpt @@ -15,4 +15,5 @@ test("oops"); ?> --CLEAN-- --EXPECTF-- -qwerty[snuffleupagus][0.0.0.0][disabled_function][drop] Aborted execution on call of the function 'echo' in %a/tests/disabled_function_print.php:3. +qwerty +Fatal error: [snuffleupagus][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 diff --git a/src/tests/disabled_function_super_global_var.phpt b/src/tests/disabled_function_super_global_var.phpt index e59c9441..771052a4 100644 --- a/src/tests/disabled_function_super_global_var.phpt +++ b/src/tests/disabled_function_super_global_var.phpt @@ -17,4 +17,5 @@ test(); ?> --EXPECTF-- 4 -[snuffleupagus][0.0.0.0][disabled_function][drop] Aborted execution on call of the function 'strlen' in %s/tests/disabled_function_super_global_var.php:%d. + +Fatal error: [snuffleupagus][disabled_function] Aborted execution on call of the function 'strlen' in %a/src/tests/disabled_function_super_global_var.php on line 3 \ No newline at end of file diff --git a/src/tests/disabled_functions.phpt b/src/tests/disabled_functions.phpt index a7603dbc..48d37246 100644 --- a/src/tests/disabled_functions.phpt +++ b/src/tests/disabled_functions.phpt @@ -13,5 +13,4 @@ var_dump("this is a super test"); echo strpos("pouet", "o"); ?> --EXPECTF-- -[snuffleupagus][0.0.0.0][disabled_function][drop] Aborted execution on call of the function 'system' in %a/tests/disabled_functions.php:2. - +Fatal error: [snuffleupagus][disabled_function] Aborted execution on call of the function 'system' in %a/disabled_functions.php on line 2 \ No newline at end of file diff --git a/src/tests/disabled_functions_callback_called_file_r.phpt b/src/tests/disabled_functions_callback_called_file_r.phpt index 7f3804b4..9c25f9d8 100644 --- a/src/tests/disabled_functions_callback_called_file_r.phpt +++ b/src/tests/disabled_functions_callback_called_file_r.phpt @@ -30,10 +30,10 @@ include "$dir/myfunc_callback.php"; echo test('test_callback'); ?> ---EXPECTF-- -[snuffleupagus][0.0.0.0][disabled_function][drop] Aborted execution on call of the function 'test_callback' in %a/myfunc_callback.php:%d. --CLEAN-- +--EXPECTF-- +Fatal error: [snuffleupagus][disabled_function] Aborted execution on call of the function 'test_callback' in %a/myfunc_callback.php on line 4 diff --git a/src/tests/disabled_functions_called_file_r.phpt b/src/tests/disabled_functions_called_file_r.phpt index 52a2158f..b361dc81 100644 --- a/src/tests/disabled_functions_called_file_r.phpt +++ b/src/tests/disabled_functions_called_file_r.phpt @@ -25,10 +25,10 @@ include "$dir/myfunc.php"; test(); ?> ---EXPECTF-- -[snuffleupagus][0.0.0.0][disabled_function][drop] Aborted execution on call of the function 'test' in %a/disabled_functions_called_file_r.php:18. --CLEAN-- +--EXPECTF-- +Fatal error: [snuffleupagus][disabled_function] Aborted execution on call of the function 'test' in %a/myfunc.php on line 3 diff --git a/src/tests/disabled_functions_chain.phpt b/src/tests/disabled_functions_chain.phpt index beb4c672..5aee0851 100644 --- a/src/tests/disabled_functions_chain.phpt +++ b/src/tests/disabled_functions_chain.phpt @@ -23,4 +23,5 @@ echo "I'm after the call to outer\n"; --EXPECTF-- I'm before the call to outer I'm in the outer function, before the call! -[snuffleupagus][0.0.0.0][disabled_function][drop] Aborted execution on call of the function 'outer>inner' in %a/disabled_functions_chain.php:%d. \ No newline at end of file + +Fatal error: [snuffleupagus][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 diff --git a/src/tests/disabled_functions_chain_call_user_func.phpt b/src/tests/disabled_functions_chain_call_user_func.phpt index f9b0dd93..90c1f320 100644 --- a/src/tests/disabled_functions_chain_call_user_func.phpt +++ b/src/tests/disabled_functions_chain_call_user_func.phpt @@ -23,4 +23,5 @@ echo "I'm after the call to outer\n"; --EXPECTF-- I'm before the call to outer I'm in the outer function, before the call! -[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:%d. \ No newline at end of file + +Fatal error: [snuffleupagus][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 diff --git a/src/tests/disabled_functions_chain_call_user_func_ret.phpt b/src/tests/disabled_functions_chain_call_user_func_ret.phpt index e11b9abf..44c9b240 100644 --- a/src/tests/disabled_functions_chain_call_user_func_ret.phpt +++ b/src/tests/disabled_functions_chain_call_user_func_ret.phpt @@ -21,6 +21,6 @@ echo one('matching') . "\n"; echo one('still not matching') . "\n"; ?> ---EXPECTF-- --XFAIL-- +--EXPECTF-- Match on ret is broken :/ diff --git a/src/tests/disabled_functions_cidr.phpt b/src/tests/disabled_functions_cidr.phpt index 2226d03c..dcd41898 100644 --- a/src/tests/disabled_functions_cidr.phpt +++ b/src/tests/disabled_functions_cidr.phpt @@ -13,4 +13,4 @@ sp.configuration_file={PWD}/config/disabled_functions_cidr.ini system("echo 42"); ?> --EXPECTF-- -[snuffleupagus][127.0.0.1][disabled_function][drop] Aborted execution on call of the function 'system' in %a/tests/disabled_functions_cidr.php:2. +Fatal error: [snuffleupagus][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 diff --git a/src/tests/disabled_functions_cidr_6.phpt b/src/tests/disabled_functions_cidr_6.phpt index a862e76f..92e542c6 100644 --- a/src/tests/disabled_functions_cidr_6.phpt +++ b/src/tests/disabled_functions_cidr_6.phpt @@ -14,4 +14,4 @@ strpos("a", "b"); printf(1337); ?> --EXPECTF-- -[snuffleupagus][2001:0db8:0000:0000:0000:ff00:0042:8328][disabled_function][drop] Aborted execution on call of the function 'strpos' in %a/tests/disabled_functions_cidr_6.php:2. +Fatal error: [snuffleupagus][disabled_function] Aborted execution on call of the function 'strpos' in %a/disabled_functions_cidr_6.php on line 2 \ No newline at end of file diff --git a/src/tests/disabled_functions_die.phpt b/src/tests/disabled_functions_die.phpt index 3fa8c4b8..bfabaee7 100644 --- a/src/tests/disabled_functions_die.phpt +++ b/src/tests/disabled_functions_die.phpt @@ -8,6 +8,6 @@ sp.configuration_file={PWD}/config/disabled_functions_die.ini ---EXPECTF-- -[snuffleupagus][0.0.0.0][disabled_function][drop] Aborted execution on call of the function 'die' in %a/tests/disabled_functions_die.php:%d. --XFAIL-- +--EXPECTF-- +Fatal error: [snuffleupagus][disabled_function] Aborted execution on call of the function 'die' in %a/disabled_function_echo.php on line 3 diff --git a/src/tests/disabled_functions_eval.phpt b/src/tests/disabled_functions_eval.phpt index 94d9be09..a5d14894 100644 --- a/src/tests/disabled_functions_eval.phpt +++ b/src/tests/disabled_functions_eval.phpt @@ -11,4 +11,4 @@ eval('$var = 1337 + 1337;'); print("Variable: $var\n"); ?> --EXPECTF-- -[snuffleupagus][0.0.0.0][disabled_function][drop] Aborted execution on call of the function 'eval' in %a/tests/disabled_functions_eval.php(%d) : eval()'d code:%d. +Fatal error: [snuffleupagus][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 diff --git a/src/tests/disabled_functions_eval_filename.phpt b/src/tests/disabled_functions_eval_filename.phpt index e01ecac6..4491e9e9 100644 --- a/src/tests/disabled_functions_eval_filename.phpt +++ b/src/tests/disabled_functions_eval_filename.phpt @@ -11,4 +11,4 @@ eval('$var = 1337 + 1337;'); print("Variable: $var\n"); ?> --EXPECTF-- -[snuffleupagus][0.0.0.0][disabled_function][drop] Aborted execution on call of the function 'eval' in %a/tests/disabled_functions_eval_filename.php(%d) : eval()'d code:%d. +Fatal error: [snuffleupagus][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 diff --git a/src/tests/disabled_functions_eval_simulation.phpt b/src/tests/disabled_functions_eval_simulation.phpt index c3d880f8..2df04a9d 100644 --- a/src/tests/disabled_functions_eval_simulation.phpt +++ b/src/tests/disabled_functions_eval_simulation.phpt @@ -11,5 +11,5 @@ eval('$var = 1337 + 1337;'); print("Variable: $var\n"); ?> --EXPECTF-- -[snuffleupagus][0.0.0.0][disabled_function][simulation] Aborted execution on call of the function 'eval' in %a/tests/disabled_functions_eval_simulation.php(%d) : eval()'d code:%d. -Variable: 2674 +Warning: [snuffleupagus][disabled_function] 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/disabled_functions_eval_user.phpt b/src/tests/disabled_functions_eval_user.phpt index 421a485f..30ba1d53 100644 --- a/src/tests/disabled_functions_eval_user.phpt +++ b/src/tests/disabled_functions_eval_user.phpt @@ -15,4 +15,4 @@ eval('$a = my_func();'); echo '$a = ' . $a . "\n"; ?> --EXPECTF-- -[snuffleupagus][0.0.0.0][disabled_function][drop] Aborted execution on call of the function 'my_func' in %a/tests/disabled_functions_eval_user.php:3. +Fatal error: [snuffleupagus][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 diff --git a/src/tests/disabled_functions_exit.phpt b/src/tests/disabled_functions_exit.phpt index 1c157905..b204fcd6 100644 --- a/src/tests/disabled_functions_exit.phpt +++ b/src/tests/disabled_functions_exit.phpt @@ -8,6 +8,6 @@ sp.configuration_file={PWD}/config/disabled_functions_exit.ini ---EXPECTF-- -[snuffleupagus][0.0.0.0][disabled_function][drop] Aborted execution on call of the function 'exit' in %a/tests/disabled_functions_exit.php:%d. --XFAIL-- +--EXPECTF-- +Fatal error: [snuffleupagus][disabled_function] Aborted execution on call of the function 'exit' in %a/disabled_function_echo.php on line 3 diff --git a/src/tests/disabled_functions_filename_r.phpt b/src/tests/disabled_functions_filename_r.phpt index f38468ae..0eb5f7d1 100644 --- a/src/tests/disabled_functions_filename_r.phpt +++ b/src/tests/disabled_functions_filename_r.phpt @@ -11,4 +11,5 @@ shell_exec("echo 43"); ?> --EXPECTF-- 42 -[snuffleupagus][0.0.0.0][disabled_function][drop] Aborted execution on call of the function 'shell_exec' in %a/tests/disabled_functions_filename_r.php:%d. \ No newline at end of file + +Fatal error: [snuffleupagus][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 diff --git a/src/tests/disabled_functions_include_once.phpt b/src/tests/disabled_functions_include_once.phpt index eaf07cee..26b7eccb 100644 --- a/src/tests/disabled_functions_include_once.phpt +++ b/src/tests/disabled_functions_include_once.phpt @@ -13,14 +13,15 @@ include_once $dir . '/test.bla'; include_once $dir . '/test.sim'; echo "1337\n"; ?> ---EXPECTF-- -BLA -[snuffleupagus][0.0.0.0][disabled_function][simulation] Aborted execution on call of the function 'include_once' in %a/disabled_functions_include_once.php:%d, because its argument 'inclusion path' content (%a/test.sim) matched a rule. -MEH -1337 --CLEAN-- +--EXPECTF-- +BLA + +Warning: [snuffleupagus][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 +MEH +1337 diff --git a/src/tests/disabled_functions_include_simulation.phpt b/src/tests/disabled_functions_include_simulation.phpt index 8348233c..199e91a4 100644 --- a/src/tests/disabled_functions_include_simulation.phpt +++ b/src/tests/disabled_functions_include_simulation.phpt @@ -13,14 +13,15 @@ include $dir . '/test.bla'; include $dir . '/test.sim'; echo "1337\n"; ?> ---EXPECTF-- -BLA -[snuffleupagus][0.0.0.0][disabled_function][simulation] Aborted execution on call of the function 'include' in %a/disabled_functions_include_simulation.php:%d, because its argument 'inclusion path' content (%a/test.sim) matched a rule. -MEH -1337 --CLEAN-- +--EXPECTF-- +BLA + +Warning: [snuffleupagus][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 +MEH +1337 diff --git a/src/tests/disabled_functions_local_var_array.phpt b/src/tests/disabled_functions_local_var_array.phpt index 91c74d55..2c55a6e1 100644 --- a/src/tests/disabled_functions_local_var_array.phpt +++ b/src/tests/disabled_functions_local_var_array.phpt @@ -17,4 +17,5 @@ foo($a); ?> --EXPECTF-- cccc -[snuffleupagus][0.0.0.0][disabled_function][drop] Aborted execution on call of the function 'foo' in %a/tests/disabled_functions_local_var_array.php:3. + +Fatal error: [snuffleupagus][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 diff --git a/src/tests/disabled_functions_local_var_array_key.phpt b/src/tests/disabled_functions_local_var_array_key.phpt index f87d56f1..777611b8 100644 --- a/src/tests/disabled_functions_local_var_array_key.phpt +++ b/src/tests/disabled_functions_local_var_array_key.phpt @@ -17,4 +17,5 @@ foo($a); ?> --EXPECTF-- cccc -[snuffleupagus][0.0.0.0][disabled_function][drop] Aborted execution on call of the function 'foo' in %a/tests/disabled_functions_local_var_array_key.php:3. + +Fatal error: [snuffleupagus][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 diff --git a/src/tests/disabled_functions_mb.phpt b/src/tests/disabled_functions_mb.phpt index 949fc5d6..a2fd99e8 100644 --- a/src/tests/disabled_functions_mb.phpt +++ b/src/tests/disabled_functions_mb.phpt @@ -9,4 +9,4 @@ sp.configuration_file={PWD}/config/disabled_functions_mb.ini echo strlen("id"); ?> --EXPECTF-- -[snuffleupagus][0.0.0.0][disabled_function][drop] Aborted execution on call of the function 'strlen' in %a/tests/disabled_functions_mb.php:2. +Fatal error: [snuffleupagus][disabled_function] Aborted execution on call of the function 'strlen' in %a/disabled_functions_mb.php on line 2 \ No newline at end of file diff --git a/src/tests/disabled_functions_method.phpt b/src/tests/disabled_functions_method.phpt index 67f56897..72e633e4 100644 --- a/src/tests/disabled_functions_method.phpt +++ b/src/tests/disabled_functions_method.phpt @@ -24,4 +24,4 @@ $c->method2("paf"); $c->method3("pouet"); ?> --EXPECTF-- -[snuffleupagus][0.0.0.0][disabled_function][drop] Aborted execution on call of the function 'AwesomeClass::method1' in %a/tests/disabled_functions_method.php:4. +Fatal error: [snuffleupagus][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 diff --git a/src/tests/disabled_functions_name_r.phpt b/src/tests/disabled_functions_name_r.phpt index 7c5a8b0b..1ecee149 100644 --- a/src/tests/disabled_functions_name_r.phpt +++ b/src/tests/disabled_functions_name_r.phpt @@ -12,4 +12,5 @@ system("echo 1337"); --EXPECTF-- 42 1337 -[snuffleupagus][0.0.0.0][disabled_function][drop] Aborted execution on return of the function 'system' in %a/disabled_functions_name_r.php:3, because the function returned '1337', which matched a rule. + +Fatal error: [snuffleupagus][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 diff --git a/src/tests/disabled_functions_name_regexp_type.phpt b/src/tests/disabled_functions_name_regexp_type.phpt index 249afc0d..2ceadbfb 100644 --- a/src/tests/disabled_functions_name_regexp_type.phpt +++ b/src/tests/disabled_functions_name_regexp_type.phpt @@ -13,4 +13,5 @@ echo strcmp([1], "pouet") . "\n"; --EXPECTF-- 0 -1 -[snuffleupagus][0.0.0.0][disabled_function][drop] Aborted execution on call of the function 'strcmp' in %a/disabled_functions_name_regexp_type.php:4, because its argument 'str1' content (?) matched a rule. + +Fatal error: [snuffleupagus][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 diff --git a/src/tests/disabled_functions_name_type.phpt b/src/tests/disabled_functions_name_type.phpt index a82f8049..2d14d127 100644 --- a/src/tests/disabled_functions_name_type.phpt +++ b/src/tests/disabled_functions_name_type.phpt @@ -11,4 +11,5 @@ echo strcmp([1,23], "pouet") . "\n"; ?> --EXPECTF-- 0 -[snuffleupagus][0.0.0.0][disabled_function][drop] Aborted execution on call of the function 'strcmp' in %a/disabled_functions_name_type.php:%d, because its argument '$str1' content (ARRAY) matched a rule. + +Fatal error: [snuffleupagus][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 diff --git a/src/tests/disabled_functions_namespace.phpt b/src/tests/disabled_functions_namespace.phpt index 16415998..1acfce21 100644 --- a/src/tests/disabled_functions_namespace.phpt +++ b/src/tests/disabled_functions_namespace.phpt @@ -27,4 +27,4 @@ my_function(); } ?> --EXPECTF-- -[snuffleupagus][0.0.0.0][disabled_function][drop] Aborted execution on call of the function 'strcmp' in %a/disabled_functions_namespace.php:%d. +Fatal error: [snuffleupagus][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 diff --git a/src/tests/disabled_functions_nul_byte.phpt b/src/tests/disabled_functions_nul_byte.phpt index aaeade15..984541dd 100644 --- a/src/tests/disabled_functions_nul_byte.phpt +++ b/src/tests/disabled_functions_nul_byte.phpt @@ -11,4 +11,4 @@ system("id"); ?> --EXPECTF-- -[snuffleupagus][0.0.0.0][disabled_function][drop] Aborted execution on call of the function 'system' in %a/tests/disabled_functions_nul_byte.php:2, because its argument '$command' content (0id) matched a rule. +Fatal error: [snuffleupagus][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 diff --git a/src/tests/disabled_functions_param.phpt b/src/tests/disabled_functions_param.phpt index 0ef7ff60..fb6dcbb4 100644 --- a/src/tests/disabled_functions_param.phpt +++ b/src/tests/disabled_functions_param.phpt @@ -15,4 +15,4 @@ strcmp("bla", "ble"); strncmp("bla", "ble", 2); ?> --EXPECTF-- -[snuffleupagus][0.0.0.0][disabled_function][drop] Aborted execution on call of the function 'system' in %a/disabled_functions_param.php:2, because its argument '$command' content (id) matched the rule '1'. +Fatal error: [snuffleupagus][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 diff --git a/src/tests/disabled_functions_param_alias.phpt b/src/tests/disabled_functions_param_alias.phpt index 5cab1f7d..9c249d91 100644 --- a/src/tests/disabled_functions_param_alias.phpt +++ b/src/tests/disabled_functions_param_alias.phpt @@ -10,4 +10,4 @@ system("id"); shell_exec("id"); ?> --EXPECTF-- -[snuffleupagus][0.0.0.0][disabled_function][drop] Aborted execution on call of the function 'system' in %a/tests/disabled_functions_param_alias.php:2, because of the the rule '1'. +Fatal error: [snuffleupagus][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 diff --git a/src/tests/disabled_functions_param_allow.phpt b/src/tests/disabled_functions_param_allow.phpt index 9d0d91bc..f570415a 100644 --- a/src/tests/disabled_functions_param_allow.phpt +++ b/src/tests/disabled_functions_param_allow.phpt @@ -11,4 +11,5 @@ system("id"); ?> --EXPECTF-- win -[snuffleupagus][0.0.0.0][disabled_function][drop] Aborted execution on call of the function 'system' in %a/tests/disabled_functions_param_allow.php:3. \ No newline at end of file + +Fatal error: [snuffleupagus][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 diff --git a/src/tests/disabled_functions_param_array.phpt b/src/tests/disabled_functions_param_array.phpt index 8bad4e0e..37a02e0b 100644 --- a/src/tests/disabled_functions_param_array.phpt +++ b/src/tests/disabled_functions_param_array.phpt @@ -21,4 +21,5 @@ foo($a); --EXPECTF-- test1 abcde -[snuffleupagus][0.0.0.0][disabled_function][drop] Aborted execution on call of the function 'foo' in %a/disabled_functions_param_array.php:3, because its argument '$arr' content (abcd) matched the rule '1'. + +Fatal error: [snuffleupagus][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 diff --git a/src/tests/disabled_functions_param_array_deref.phpt b/src/tests/disabled_functions_param_array_deref.phpt index e88ee2b5..33059656 100644 --- a/src/tests/disabled_functions_param_array_deref.phpt +++ b/src/tests/disabled_functions_param_array_deref.phpt @@ -22,4 +22,5 @@ foo($a); --EXPECTF-- eee abcdef -[snuffleupagus][0.0.0.0][disabled_function][drop] Aborted execution on call of the function 'foo' in %a/tests/disabled_functions_param_array_deref.php:3, because its argument '$arr' content (abcdef) matched the rule '2'. + +Fatal error: [snuffleupagus][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 diff --git a/src/tests/disabled_functions_param_array_no_value.phpt b/src/tests/disabled_functions_param_array_no_value.phpt index 01b1a8c5..dfb67a2b 100644 --- a/src/tests/disabled_functions_param_array_no_value.phpt +++ b/src/tests/disabled_functions_param_array_no_value.phpt @@ -19,4 +19,5 @@ foo($a); ?> --EXPECTF-- cccc -[snuffleupagus][0.0.0.0][disabled_function][drop] Aborted execution on call of the function 'foo' in %a/tests/disabled_functions_param_array_no_value.php:3, because its argument '$arr' content (aaa) matched the rule '3'. + +Fatal error: [snuffleupagus][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 diff --git a/src/tests/disabled_functions_param_array_r.phpt b/src/tests/disabled_functions_param_array_r.phpt index db4f3ba7..1773bbea 100644 --- a/src/tests/disabled_functions_param_array_r.phpt +++ b/src/tests/disabled_functions_param_array_r.phpt @@ -17,4 +17,5 @@ foo($a); ?> --EXPECTF-- cccc -[snuffleupagus][0.0.0.0][disabled_function][drop] Aborted execution on call of the function 'foo' in %a/tests/disabled_functions_param_array_r.php:3, because its argument 'arr' content (ARRAY) matched the rule '1'. + +Fatal error: [snuffleupagus][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 diff --git a/src/tests/disabled_functions_param_array_r_keys.phpt b/src/tests/disabled_functions_param_array_r_keys.phpt index 0957b64f..0748e92f 100644 --- a/src/tests/disabled_functions_param_array_r_keys.phpt +++ b/src/tests/disabled_functions_param_array_r_keys.phpt @@ -17,4 +17,5 @@ foo($a); ?> --EXPECTF-- cccc -[snuffleupagus][0.0.0.0][disabled_function][drop] Aborted execution on call of the function 'foo' in %a/tests/disabled_functions_param_array_r_keys.php:3, because its argument 'arr' content (ARRAY) matched the rule '2'. + +Fatal error: [snuffleupagus][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 diff --git a/src/tests/disabled_functions_param_array_several_levels.phpt b/src/tests/disabled_functions_param_array_several_levels.phpt index b98c5a0c..cbe845b2 100644 --- a/src/tests/disabled_functions_param_array_several_levels.phpt +++ b/src/tests/disabled_functions_param_array_several_levels.phpt @@ -17,4 +17,5 @@ foo($a); ?> --EXPECTF-- cccc -[snuffleupagus][0.0.0.0][disabled_function][drop] Aborted execution on call of the function 'foo' in %a/tests/disabled_functions_param_array_several_levels.php:3, because its argument '$arr' content (ARRAY) matched the rule '4'. + +Fatal error: [snuffleupagus][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 diff --git a/src/tests/disabled_functions_param_array_several_levels_int.phpt b/src/tests/disabled_functions_param_array_several_levels_int.phpt index b643ef80..d957acf2 100644 --- a/src/tests/disabled_functions_param_array_several_levels_int.phpt +++ b/src/tests/disabled_functions_param_array_several_levels_int.phpt @@ -17,4 +17,5 @@ foo($a); ?> --EXPECTF-- cccc -[snuffleupagus][0.0.0.0][disabled_function][drop] Aborted execution on call of the function 'foo' in %a/tests/disabled_functions_param_array_several_levels_int.php:3, because its argument '$arr' content (ARRAY) matched the rule '4'. + +Fatal error: [snuffleupagus][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 diff --git a/src/tests/disabled_functions_param_array_several_levels_keys.phpt b/src/tests/disabled_functions_param_array_several_levels_keys.phpt index de3d333c..59d27c02 100644 --- a/src/tests/disabled_functions_param_array_several_levels_keys.phpt +++ b/src/tests/disabled_functions_param_array_several_levels_keys.phpt @@ -17,4 +17,5 @@ foo($a); ?> --EXPECTF-- cccc -[snuffleupagus][0.0.0.0][disabled_function][drop] Aborted execution on call of the function 'foo' in %a/tests/disabled_functions_param_array_several_levels_keys.php:3, because its argument '$arr' content (ARRAY) matched the rule '5'. + +Fatal error: [snuffleupagus][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 diff --git a/src/tests/disabled_functions_param_array_several_levels_keys_int.phpt b/src/tests/disabled_functions_param_array_several_levels_keys_int.phpt index d5b998ab..647c3947 100644 --- a/src/tests/disabled_functions_param_array_several_levels_keys_int.phpt +++ b/src/tests/disabled_functions_param_array_several_levels_keys_int.phpt @@ -17,4 +17,5 @@ foo($a); ?> --EXPECTF-- cccc -[snuffleupagus][0.0.0.0][disabled_function][drop] Aborted execution on call of the function 'foo' in %a/tests/disabled_functions_param_array_several_levels_keys_int.php:3, because its argument '$arr' content (ARRAY) matched the rule '6'. + +Fatal error: [snuffleupagus][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 diff --git a/src/tests/disabled_functions_param_broken_line.phpt b/src/tests/disabled_functions_param_broken_line.phpt index cca001f4..d709d158 100644 --- a/src/tests/disabled_functions_param_broken_line.phpt +++ b/src/tests/disabled_functions_param_broken_line.phpt @@ -10,6 +10,8 @@ system("echo 1337"); system("echo 1338"); ?> --EXPECTF-- -[snuffleupagus][0.0.0.0][config][error] Failed to parse arg 'qwe' of `line` on line 1. +PHP Fatal error: [snuffleupagus][config] Failed to parse arg 'qwe' of `line` on line 1 in Unknown on line 0 + +Fatal error: [snuffleupagus][config] Failed to parse arg 'qwe' of `line` on line 1 in Unknown on line 0 1337 -1338 +1338 \ No newline at end of file diff --git a/src/tests/disabled_functions_param_int.phpt b/src/tests/disabled_functions_param_int.phpt index fbbf2f0a..e8b0a428 100644 --- a/src/tests/disabled_functions_param_int.phpt +++ b/src/tests/disabled_functions_param_int.phpt @@ -18,4 +18,5 @@ foobar("10"); ?> --EXPECTF-- 1 -[snuffleupagus][0.0.0.0][disabled_function][drop] Aborted execution on call of the function 'foobar' in %a/tests/disabled_functions_param_int.php:3, because its argument '$id' content (42) matched a rule. + +Fatal error: [snuffleupagus][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 diff --git a/src/tests/disabled_functions_param_invalid_pos.phpt b/src/tests/disabled_functions_param_invalid_pos.phpt index 91ddd93a..14db1fc8 100644 --- a/src/tests/disabled_functions_param_invalid_pos.phpt +++ b/src/tests/disabled_functions_param_invalid_pos.phpt @@ -9,6 +9,7 @@ sp.configuration_file={PWD}/config/disabled_functions_invalid_pos.ini system("echo 1"); ?> --EXPECTF-- -[snuffleupagus][0.0.0.0][config][error] Failed to parse arg 'qwe' of `pos` on line 1. -1 +PHP Fatal error: [snuffleupagus][config] Failed to parse arg 'qwe' of `pos` on line 1 in Unknown on line 0 +Fatal error: [snuffleupagus][config] Failed to parse arg 'qwe' of `pos` on line 1 in Unknown on line 0 +1 \ No newline at end of file diff --git a/src/tests/disabled_functions_param_line.phpt b/src/tests/disabled_functions_param_line.phpt index 12ea749f..75bfedd4 100644 --- a/src/tests/disabled_functions_param_line.phpt +++ b/src/tests/disabled_functions_param_line.phpt @@ -11,4 +11,5 @@ system("id"); ?> --EXPECTF-- 1337 -[snuffleupagus][0.0.0.0][disabled_function][drop] Aborted execution on call of the function 'system' in %a/disabled_functions_param_line.php:3. + +Fatal error: [snuffleupagus][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 diff --git a/src/tests/disabled_functions_param_pos.phpt b/src/tests/disabled_functions_param_pos.phpt index 3e4fdc51..91279298 100644 --- a/src/tests/disabled_functions_param_pos.phpt +++ b/src/tests/disabled_functions_param_pos.phpt @@ -9,5 +9,6 @@ sp.configuration_file={PWD}/config/disabled_functions_pos.ini system("id"); ?> --EXPECTF-- -[snuffleupagus][0.0.0.0][config][error] 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. -[snuffleupagus][0.0.0.0][disabled_function][drop] Aborted execution on call of the function 'system' in %a/disabled_functions_param_pos.php:2, because its argument 'command' content (id) matched a rule. +Warning: [snuffleupagus][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 + +Fatal error: [snuffleupagus][disabled_function] Aborted execution on call of the function 'system', because its argument 'command' content (id) matched a rule in %a/tests/disabled_functions_param_pos.php on line %d diff --git a/src/tests/disabled_functions_param_pos2.phpt b/src/tests/disabled_functions_param_pos2.phpt index 53487f86..87e18c0d 100644 --- a/src/tests/disabled_functions_param_pos2.phpt +++ b/src/tests/disabled_functions_param_pos2.phpt @@ -10,4 +10,4 @@ strlen("od"); strlen("id"); ?> --EXPECTF-- -[snuffleupagus][0.0.0.0][disabled_function][drop] Aborted execution on call of the function 'strlen' in %a/disabled_functions_param_pos2.php:3, because its argument 'str' content (id) matched the rule 'strlen array'. +Fatal error: [snuffleupagus][disabled_function] Aborted execution on call of the function 'strlen', 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/disabled_functions_param_r.phpt b/src/tests/disabled_functions_param_r.phpt index e44b1d54..722f1260 100644 --- a/src/tests/disabled_functions_param_r.phpt +++ b/src/tests/disabled_functions_param_r.phpt @@ -10,4 +10,4 @@ system("id"); system("echo win"); ?> --EXPECTF-- -[snuffleupagus][0.0.0.0][disabled_function][drop] Aborted execution on call of the function 'system' in %a/tests/disabled_functions_param_r.php:2, because its argument 'command' content (id) matched a rule. +Fatal error: [snuffleupagus][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 diff --git a/src/tests/disabled_functions_pos_type.phpt b/src/tests/disabled_functions_pos_type.phpt index 0b93fd18..7739dfb6 100644 --- a/src/tests/disabled_functions_pos_type.phpt +++ b/src/tests/disabled_functions_pos_type.phpt @@ -9,6 +9,8 @@ sp.configuration_file={PWD}/config/disabled_functions_pos.ini system([123, 456]); ?> --EXPECTF-- -[snuffleupagus][0.0.0.0][config][error] 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. -[snuffleupagus][0.0.0.0][config][error] 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. -[snuffleupagus][0.0.0.0][disabled_function][drop] Aborted execution on call of the function 'system' in %a/tests/disabled_functions_pos_type.php:2, because its argument 'command' content (?) matched the rule '1'. +Warning: [snuffleupagus][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/tests/disabled_functions_pos_type.php on line %d + +Warning: [snuffleupagus][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/tests/disabled_functions_pos_type.php on line %d + +Fatal error: [snuffleupagus][disabled_function] Aborted execution on call of the function 'system', because its argument 'command' content (?) matched the rule '1' in %a/tests/disabled_functions_pos_type.php on line %d diff --git a/src/tests/disabled_functions_regexp_multiple.phpt b/src/tests/disabled_functions_regexp_multiple.phpt index 02110629..79f1fc74 100644 --- a/src/tests/disabled_functions_regexp_multiple.phpt +++ b/src/tests/disabled_functions_regexp_multiple.phpt @@ -11,8 +11,9 @@ echo strcmp("1", "2") . "\n"; print("After") . "\n"; ?> --EXPECTF-- -[snuffleupagus][0.0.0.0][disabled_function][simulation] Aborted execution on call of the function 'strlen' in %a/disabled_functions_regexp_multiple.php:2. +Warning: [snuffleupagus][disabled_function] Aborted execution on call of the function 'strlen' in %a/disabled_functions_regexp_multiple.php on line 2 2 -[snuffleupagus][0.0.0.0][disabled_function][simulation] Aborted execution on call of the function 'strcmp' in %a/disabled_functions_regexp_multiple.php:3. + +Warning: [snuffleupagus][disabled_function] Aborted execution on call of the function 'strcmp' in %a/disabled_functions_regexp_multiple.php on line 3 -1 -After +After \ No newline at end of file diff --git a/src/tests/disabled_functions_register_shutdown_function.phpt b/src/tests/disabled_functions_register_shutdown_function.phpt index 45c52a4e..b6f1a10c 100644 --- a/src/tests/disabled_functions_register_shutdown_function.phpt +++ b/src/tests/disabled_functions_register_shutdown_function.phpt @@ -14,4 +14,5 @@ register_shutdown_function('my_super_function'); ?> --EXPECTF-- 1337 -[snuffleupagus][0.0.0.0][disabled_function][drop] Aborted execution on call of the function 'my_super_function' in %a/tests/disabled_functions_register_shutdown_function.php:3. + +Fatal error: [snuffleupagus][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 diff --git a/src/tests/disabled_functions_register_tick_function.phpt b/src/tests/disabled_functions_register_tick_function.phpt index 57cabc48..6e3fb6f4 100644 --- a/src/tests/disabled_functions_register_tick_function.phpt +++ b/src/tests/disabled_functions_register_tick_function.phpt @@ -15,4 +15,5 @@ register_tick_function('my_super_function'); ?> --EXPECTF-- 1337 -[snuffleupagus][0.0.0.0][disabled_function][drop] Aborted execution on call of the function 'my_super_function' in %a/tests/disabled_functions_register_tick_function.php:4. + +Fatal error: [snuffleupagus][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 diff --git a/src/tests/disabled_functions_require.phpt b/src/tests/disabled_functions_require.phpt index 4f22a45c..77dfbf52 100644 --- a/src/tests/disabled_functions_require.phpt +++ b/src/tests/disabled_functions_require.phpt @@ -13,11 +13,12 @@ require $dir . '/test.bla'; require $dir . '/test.meh'; echo "1337"; ?> ---EXPECTF-- -BLA[snuffleupagus][0.0.0.0][disabled_function][drop] Aborted execution on call of the function 'require' in %a/disabled_functions_require.php:%d, because its argument 'inclusion path' content (%a/test.meh) matched a rule. --CLEAN-- +--EXPECTF-- +BLA +Fatal error: [snuffleupagus][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 diff --git a/src/tests/disabled_functions_require_once.phpt b/src/tests/disabled_functions_require_once.phpt index 60b78412..84e93cd4 100644 --- a/src/tests/disabled_functions_require_once.phpt +++ b/src/tests/disabled_functions_require_once.phpt @@ -13,11 +13,12 @@ require_once $dir . '/test.bla'; require_once $dir . '/test.meh'; echo "1337"; ?> ---EXPECTF-- -BLA[snuffleupagus][0.0.0.0][disabled_function][drop] Aborted execution on call of the function 'require_once' in %a/disabled_functions_require_once.php:%d, because its argument 'inclusion path' content (%a/test.meh) matched a rule. --CLEAN-- +--EXPECTF-- +BLA +Fatal error: [snuffleupagus][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 diff --git a/src/tests/disabled_functions_require_simulation.phpt b/src/tests/disabled_functions_require_simulation.phpt index e092def7..6c974802 100644 --- a/src/tests/disabled_functions_require_simulation.phpt +++ b/src/tests/disabled_functions_require_simulation.phpt @@ -13,14 +13,15 @@ require $dir . '/test.bla'; require $dir . '/test.sim'; echo "1337\n"; ?> ---EXPECTF-- -BLA -[snuffleupagus][0.0.0.0][disabled_function][simulation] Aborted execution on call of the function 'require' in %a/disabled_functions_require_simulation.php:%d, because its argument 'inclusion path' content (%a/test.sim) matched a rule. -MEH -1337 --CLEAN-- +--EXPECTF-- +BLA + +Warning: [snuffleupagus][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 +MEH +1337 diff --git a/src/tests/disabled_functions_ret.phpt b/src/tests/disabled_functions_ret.phpt index 7a165993..7c5d5963 100644 --- a/src/tests/disabled_functions_ret.phpt +++ b/src/tests/disabled_functions_ret.phpt @@ -10,4 +10,4 @@ echo strpos("pouet", "p"); echo stripos("pouet", "p"); ?> --EXPECTF-- -[snuffleupagus][0.0.0.0][disabled_function][drop] Aborted execution on return of the function 'strpos' in %a/disabled_functions_ret.php:2, because the function returned '0', which matched a rule. +Fatal error: [snuffleupagus][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 diff --git a/src/tests/disabled_functions_ret2.phpt b/src/tests/disabled_functions_ret2.phpt index 863b7e0f..e32c585d 100644 --- a/src/tests/disabled_functions_ret2.phpt +++ b/src/tests/disabled_functions_ret2.phpt @@ -9,4 +9,4 @@ sp.configuration_file={PWD}/config/disabled_functions_ret.ini echo stripos("pouet", "p"); ?> --EXPECTF-- -[snuffleupagus][0.0.0.0][disabled_function][drop] Aborted execution on return of the function 'stripos' in %a/disabled_functions_ret2.php:2, because the function returned '0', which matched a rule. +Fatal error: [snuffleupagus][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 diff --git a/src/tests/disabled_functions_ret3.phpt b/src/tests/disabled_functions_ret3.phpt index 87a44efc..dc60c43f 100644 --- a/src/tests/disabled_functions_ret3.phpt +++ b/src/tests/disabled_functions_ret3.phpt @@ -19,4 +19,5 @@ echo("We're at the end of the execution.\n"); ?> --EXPECTF-- We're in function `a`. -[snuffleupagus][0.0.0.0][disabled_function][drop] Aborted execution on return of the function 'Bob::a' in %a/disabled_functions_ret3.php:9, because the function returned '2', which matched a rule. + +Fatal error: [snuffleupagus][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 diff --git a/src/tests/disabled_functions_ret_right_hash.phpt b/src/tests/disabled_functions_ret_right_hash.phpt index 04f7d057..13071725 100644 --- a/src/tests/disabled_functions_ret_right_hash.phpt +++ b/src/tests/disabled_functions_ret_right_hash.phpt @@ -10,4 +10,5 @@ system("echo $((1 + 1336))"); ?> --EXPECTF-- 1337 -[snuffleupagus][0.0.0.0][disabled_function][drop] Aborted execution on return of the function 'system' in %a/tests/disabled_functions_ret_right_hash.php:2, because the function returned '1337', which matched a rule. + +Fatal error: [snuffleupagus][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 diff --git a/src/tests/disabled_functions_ret_simulation.phpt b/src/tests/disabled_functions_ret_simulation.phpt index 4368b12f..bd4cea04 100644 --- a/src/tests/disabled_functions_ret_simulation.phpt +++ b/src/tests/disabled_functions_ret_simulation.phpt @@ -11,8 +11,10 @@ echo stripos("pouet", "p") . "\n"; strcmp("p", "p") . "\n"; ?> --EXPECTF-- -[snuffleupagus][0.0.0.0][disabled_function][simulation] Aborted execution on return of the function 'strpos' in %a/disabled_functions_ret_simulation.php:2, because the function returned '0', which matched a rule. +Warning: [snuffleupagus][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 0 -[snuffleupagus][0.0.0.0][disabled_function][simulation] Aborted execution on return of the function 'stripos' in %a/disabled_functions_ret_simulation.php:3, because the function returned '0', which matched the rule '1'. + +Warning: [snuffleupagus][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 0 -[snuffleupagus][0.0.0.0][disabled_function][drop] Aborted execution on return of the function 'strcmp' in %a/disabled_functions_ret_simulation.php:4, because the function returned '0', which matched a rule. + +Fatal error: [snuffleupagus][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 diff --git a/src/tests/disabled_functions_ret_type.phpt b/src/tests/disabled_functions_ret_type.phpt index 44361576..88401cad 100644 --- a/src/tests/disabled_functions_ret_type.phpt +++ b/src/tests/disabled_functions_ret_type.phpt @@ -13,4 +13,5 @@ echo strpos("pouet", "123"); --EXPECTF-- int(0) 1337 -[snuffleupagus][0.0.0.0][disabled_function][drop] Aborted execution on return of the function 'strpos' in %a/disabled_functions_ret_type.php:%d, because the function returned 'FALSE', which matched the rule 'Return value is FALSE'. + +Fatal error: [snuffleupagus][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 diff --git a/src/tests/disabled_functions_ret_type_array.phpt b/src/tests/disabled_functions_ret_type_array.phpt index 79b3d070..3ceac9e8 100644 --- a/src/tests/disabled_functions_ret_type_array.phpt +++ b/src/tests/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-- -[snuffleupagus][0.0.0.0][disabled_function][drop] Aborted execution on return of the function 'get_loaded_extensions' in %a/tests/disabled_functions_ret_type_array.php:2, because the function returned 'ARRAY', which matched the rule 'Return value is an array'. +Fatal error: [snuffleupagus][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 diff --git a/src/tests/disabled_functions_ret_type_double.phpt b/src/tests/disabled_functions_ret_type_double.phpt index 7f6dccee..b0e895c8 100644 --- a/src/tests/disabled_functions_ret_type_double.phpt +++ b/src/tests/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-- -[snuffleupagus][0.0.0.0][disabled_function][drop] Aborted execution on return of the function 'cos' %a/disabled_functions_ret_type_double.php:%d, because the function returned '0.877583', which matched the rule 'Return value is a double'. +Fatal error: [snuffleupagus][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 diff --git a/src/tests/disabled_functions_ret_type_long.phpt b/src/tests/disabled_functions_ret_type_long.phpt index 1f130796..c389533e 100644 --- a/src/tests/disabled_functions_ret_type_long.phpt +++ b/src/tests/disabled_functions_ret_type_long.phpt @@ -9,4 +9,4 @@ sp.configuration_file={PWD}/config/disabled_functions_ret_type_long.ini echo strlen("pouet") . "\n"; ?> --EXPECTF-- -[snuffleupagus][0.0.0.0][disabled_function][drop] Aborted execution on return of the function 'strlen' in %a/disabled_functions_ret_type_long.php:%d, because the function returned '5', which matched the rule 'Return value is a long'. +Fatal error: [snuffleupagus][disabled_function] Aborted execution on return of the function 'strlen', because the function returned '5', which matched the rule 'Return value is a long' in %a/disabled_functions_ret_type_long.php on line 2 \ No newline at end of file diff --git a/src/tests/disabled_functions_ret_type_null.phpt b/src/tests/disabled_functions_ret_type_null.phpt index d000f079..894b3f5e 100644 --- a/src/tests/disabled_functions_ret_type_null.phpt +++ b/src/tests/disabled_functions_ret_type_null.phpt @@ -13,4 +13,4 @@ function my_function() { var_dump(my_function()); ?> --EXPECTF-- -[snuffleupagus][0.0.0.0][disabled_function][drop] Aborted execution on return of the function 'my_function' in %atests/disabled_functions_ret_type_null.php:6, because the function returned 'NULL', which matched the rule 'Return value is null'. +Fatal error: [snuffleupagus][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 diff --git a/src/tests/disabled_functions_ret_type_object.phpt b/src/tests/disabled_functions_ret_type_object.phpt index 688245d0..171cd4b8 100644 --- a/src/tests/disabled_functions_ret_type_object.phpt +++ b/src/tests/disabled_functions_ret_type_object.phpt @@ -13,4 +13,4 @@ $var = a(); echo "fail"; ?> --EXPECTF-- -[snuffleupagus][0.0.0.0][disabled_function][drop] Aborted execution on return of the function 'a' in %a/tests/disabled_functions_ret_type_object.php:5, because the function returned 'OBJECT', which matched a rule. +Fatal error: [snuffleupagus][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 diff --git a/src/tests/disabled_functions_ret_type_resource.phpt b/src/tests/disabled_functions_ret_type_resource.phpt index d7eeba38..4ae38b67 100644 --- a/src/tests/disabled_functions_ret_type_resource.phpt +++ b/src/tests/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-- -[snuffleupagus][0.0.0.0][disabled_function][drop] Aborted execution on return of the function 'fopen' in %a/disabled_functions_ret_type_resource.php:2, because the function returned 'RESOURCE', which matched the rule 'Return value is a resource'. +Fatal error: [snuffleupagus][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 diff --git a/src/tests/disabled_functions_ret_type_str.phpt b/src/tests/disabled_functions_ret_type_str.phpt index 2d81e3d4..356ff430 100644 --- a/src/tests/disabled_functions_ret_type_str.phpt +++ b/src/tests/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-- -[snuffleupagus][0.0.0.0][disabled_function][drop] Aborted execution on return of the function 'substr' in %a/disabled_functions_ret_type_str.php:%d, because the function returned 'et', which matched the rule 'Return value is a string'. +Fatal error: [snuffleupagus][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 diff --git a/src/tests/disabled_functions_ret_type_true.phpt b/src/tests/disabled_functions_ret_type_true.phpt index bec72f90..8ddb1f71 100644 --- a/src/tests/disabled_functions_ret_type_true.phpt +++ b/src/tests/disabled_functions_ret_type_true.phpt @@ -13,4 +13,5 @@ echo is_numeric("1234") . "\n"; --EXPECTF-- bool(false) 1337 -[snuffleupagus][0.0.0.0][disabled_function][drop] Aborted execution on return of the function 'is_numeric' in %a/disabled_functions_ret_type_true.php:%d, because the function returned 'TRUE', which matched the rule 'Return value is a true'. + +Fatal error: [snuffleupagus][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 diff --git a/src/tests/disabled_functions_ret_val.phpt b/src/tests/disabled_functions_ret_val.phpt index 0a53236f..40a3be9a 100644 --- a/src/tests/disabled_functions_ret_val.phpt +++ b/src/tests/disabled_functions_ret_val.phpt @@ -11,4 +11,5 @@ echo str_repeat("fufufu",1); ?> --EXPECTF-- fufu -[snuffleupagus][0.0.0.0][disabled_function][drop] Aborted execution on return of the function 'str_repeat' in %a/disabled_functions_ret_val.php:3, because the function returned 'fufufu', which matched a rule. + +Fatal error: [snuffleupagus][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 diff --git a/src/tests/disabled_functions_ret_val_dump.phpt b/src/tests/disabled_functions_ret_val_dump.phpt index b29cafd3..9fff77b0 100644 --- a/src/tests/disabled_functions_ret_val_dump.phpt +++ b/src/tests/disabled_functions_ret_val_dump.phpt @@ -19,4 +19,5 @@ echo str_repeat("fufufu",1); ?> --EXPECTF-- fufu -[snuffleupagus][0.0.0.0][disabled_function][drop] Aborted execution on return of the function 'str_repeat' in %a/disabled_functions_ret_val_dump.php:%d, because the function returned 'fufufu', which matched a rule. + +Fatal error: [snuffleupagus][disabled_function] Aborted execution on return of the function 'str_repeat', because the function returned 'fufufu', which matched a rule in %a/src/tests/disabled_functions_ret_val_dump.php on line 3 \ No newline at end of file diff --git a/src/tests/disabled_functions_ret_val_rx.phpt b/src/tests/disabled_functions_ret_val_rx.phpt index cb383c4a..ba06649d 100644 --- a/src/tests/disabled_functions_ret_val_rx.phpt +++ b/src/tests/disabled_functions_ret_val_rx.phpt @@ -11,4 +11,5 @@ echo str_repeat("fufufu",1); ?> --EXPECTF-- fufu -[snuffleupagus][0.0.0.0][disabled_function][drop] Aborted execution on return of the function 'str_repeat' in %a/disabled_functions_ret_val_rx.php:3, because the function returned 'fufufu', which matched a rule. + +Fatal error: [snuffleupagus][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 diff --git a/src/tests/disabled_functions_runtime.phpt b/src/tests/disabled_functions_runtime.phpt index 2bbe8b2a..4ba1a53e 100644 --- a/src/tests/disabled_functions_runtime.phpt +++ b/src/tests/disabled_functions_runtime.phpt @@ -21,11 +21,12 @@ if (rand() % 2) { test('1338');test('1337'); ?> ---EXPECTF-- -1338 -[snuffleupagus][0.0.0.0][disabled_function][drop] Aborted execution on call of the function 'test' in %a, because its argument '$param' content (1337) matched a rule. --CLEAN-- +--EXPECTF-- +1338 + +Fatal error: [snuffleupagus][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 diff --git a/src/tests/disabled_functions_upper.phpt b/src/tests/disabled_functions_upper.phpt index 92192c54..8fa8ea3a 100644 --- a/src/tests/disabled_functions_upper.phpt +++ b/src/tests/disabled_functions_upper.phpt @@ -13,4 +13,4 @@ vaR_DUmp("this is a super test"); echo sTRPOs("pouet", "o"); ?> --EXPECTF-- -[snuffleupagus][0.0.0.0][disabled_function][drop] Aborted execution on call of the function 'system' in %a/tests/disabled_functions_upper.php:%d. +Fatal error: [snuffleupagus][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 diff --git a/src/tests/disabled_functions_variadic.phpt b/src/tests/disabled_functions_variadic.phpt index e2abe67c..1e2a0dda 100644 --- a/src/tests/disabled_functions_variadic.phpt +++ b/src/tests/disabled_functions_variadic.phpt @@ -13,5 +13,6 @@ function foo(...$b) { echo foo(5, 4, 3, 2, 1); ?> --EXPECTF-- -[snuffleupagus][0.0.0.0][disable_function][error] Snuffleupagus doesn't support variadic functions yet, sorry. Check https://github.com/nbs-system/snuffleupagus/issues/164 for details. -[snuffleupagus][0.0.0.0][disabled_function][drop] Aborted execution on call of the function 'foo' in %a/disabled_functions_variadic.php:2. +Warning: [snuffleupagus][disable_function] Snuffleupagus doesn't support variadic functions yet, sorry. Check https://github.com/nbs-system/snuffleupagus/issues/164 for details. in %a/tests/disabled_functions_variadic.php on line %d + +Fatal error: [snuffleupagus][disabled_function] Aborted execution on call of the function 'foo' in %a/tests/disabled_functions_variadic.php on line %d diff --git a/src/tests/disabled_functions_zero_cidr.phpt b/src/tests/disabled_functions_zero_cidr.phpt index 2980f3f7..4e5f9306 100644 --- a/src/tests/disabled_functions_zero_cidr.phpt +++ b/src/tests/disabled_functions_zero_cidr.phpt @@ -14,4 +14,4 @@ system("echo 42"); printf("1337"); ?> --EXPECTF-- -[snuffleupagus][127.0.0.1][disabled_function][drop] Aborted execution on call of the function 'system' in %a/tests/disabled_functions_zero_cidr.php:2. +Fatal error: [snuffleupagus][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 diff --git a/src/tests/disabled_native_functions_indirect.phpt b/src/tests/disabled_native_functions_indirect.phpt index 61ea48b8..ba355d68 100644 --- a/src/tests/disabled_native_functions_indirect.phpt +++ b/src/tests/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-- -[snuffleupagus][0.0.0.0][disabled_function][drop] Aborted execution on call of the function 'system' in%a/tests/disabled_native_functions_indirect.php:2. +Fatal error: [snuffleupagus][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 diff --git a/src/tests/disabled_user_functions.phpt b/src/tests/disabled_user_functions.phpt index baa0a9a5..9c17b796 100644 --- a/src/tests/disabled_user_functions.phpt +++ b/src/tests/disabled_user_functions.phpt @@ -12,4 +12,4 @@ function my_super_function() { my_super_function(); ?> --EXPECTF-- -[snuffleupagus][0.0.0.0][disabled_function][drop] Aborted execution on call of the function 'my_super_function' in %a/tests/disabled_user_functions.php:3. +Fatal error: [snuffleupagus][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 diff --git a/src/tests/disabled_user_functions_indirect.phpt b/src/tests/disabled_user_functions_indirect.phpt index 82390027..f663ded5 100644 --- a/src/tests/disabled_user_functions_indirect.phpt +++ b/src/tests/disabled_user_functions_indirect.phpt @@ -12,4 +12,4 @@ function my_super_function() { array_map('my_super_function', [1,2,3,4]); ?> --EXPECTF-- -[snuffleupagus][0.0.0.0][disabled_function][drop] Aborted execution on call of the function 'my_super_function' in %a/tests/disabled_user_functions_indirect.php:3. +Fatal error: [snuffleupagus][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 diff --git a/src/tests/dump_eval_blacklist.phpt b/src/tests/dump_eval_blacklist.phpt index 19da8cd9..3ae402cb 100644 --- a/src/tests/dump_eval_blacklist.phpt +++ b/src/tests/dump_eval_blacklist.phpt @@ -35,5 +35,6 @@ if ($res[2] != "GET:get_a='data_get_a' get_b='data_get_b' \n") { ?> --EXPECTF-- Outside of eval: 14 -[snuffleupagus][0.0.0.0][eval][simulation] A call to strlen was tried in eval, in %a/dump_eval_blacklist.php:1, logging it. -After eval: 4 + +Warning: [snuffleupagus][eval] A call to strlen was tried in eval, in %a/src/tests/dump_eval_blacklist.php:1, logging it. in %a/src/tests/dump_eval_blacklist.php(9) : eval()'d code on line 1 +After eval: 4 \ No newline at end of file diff --git a/src/tests/dump_eval_whitelist.phpt b/src/tests/dump_eval_whitelist.phpt index 24ca1d1d..cf24dbac 100644 --- a/src/tests/dump_eval_whitelist.phpt +++ b/src/tests/dump_eval_whitelist.phpt @@ -47,5 +47,6 @@ if ($res[2] != "GET:get_a='data_get_a' get_b='data_get_b' \n") { --EXPECTF-- Outside of eval: my_fun: 1337 1337 1337 After allowed eval: my_fun: 1234 -[snuffleupagus][0.0.0.0][Eval_whitelist][simulation] The function 'my_other_fun' isn't in the eval whitelist, logging its call. + +Warning: [snuffleupagus][Eval_whitelist] The function 'my_other_fun' isn't in the eval whitelist, logging its call. in %a/tests/dump_eval_whitelist.php on line 12 After eval: my_other_fun: 1234 diff --git a/src/tests/dump_request.phpt b/src/tests/dump_request.phpt index ceb03d53..a946c927 100644 --- a/src/tests/dump_request.phpt +++ b/src/tests/dump_request.phpt @@ -39,5 +39,6 @@ if ($res[2] != "GET:get_a='data_get_a' get_b='data_get_b' \n") { ?> --EXPECTF-- 1 -[snuffleupagus][0.0.0.0][disabled_function][simulation] Aborted execution on call of the function 'system' in %a/dump_request.php:%d. -1337 + +Warning: [snuffleupagus][disabled_function] Aborted execution on call of the function 'system' in %a/src/tests/dump_request.php on line 7 +1337 \ No newline at end of file diff --git a/src/tests/dump_request_invalid_folder.phpt b/src/tests/dump_request_invalid_folder.phpt index d58f2803..0f45b414 100644 --- a/src/tests/dump_request_invalid_folder.phpt +++ b/src/tests/dump_request_invalid_folder.phpt @@ -20,5 +20,7 @@ echo "2\n"; ?> --EXPECTF-- 1 -[snuffleupagus][0.0.0.0][disabled_function][drop] Aborted execution on call of the function 'system' in %atests/dump_request_invalid_folder.php:3. -[snuffleupagus][0.0.0.0][request_logging][error] Unable to create the folder '/root/NON_EXISTENT/FOLDER/PLEASE/'. + +Warning: [snuffleupagus][request_logging] Unable to create the folder '/root/NON_EXISTENT/FOLDER/PLEASE/' in %a/tests/dump_request_invalid_folder.php on line %d + +Fatal error: [snuffleupagus][disabled_function] Aborted execution on call of the function 'system' in %a/tests/dump_request_invalid_folder.php on line %d diff --git a/src/tests/dump_request_too_big.phpt b/src/tests/dump_request_too_big.phpt index af146c56..f2368829 100644 --- a/src/tests/dump_request_too_big.phpt +++ b/src/tests/dump_request_too_big.phpt @@ -39,5 +39,6 @@ if ($res[2] != "GET:get_a='data_get_a' get_b='data_get_b' get_c='aaaaaaaaaaaaaaa ?> --EXPECTF-- 1 -[snuffleupagus][127.0.0.1][disabled_function][simulation] Aborted execution on call of the function 'system' in %a/dump_request_too_big.php:%d. + +Warning: [snuffleupagus][disabled_function] Aborted execution on call of the function 'system' in %a/src/tests/dump_request_too_big.php on line 8 1337 \ No newline at end of file diff --git a/src/tests/dump_segfault1.phpt b/src/tests/dump_segfault1.phpt index 24265d10..bb35aa6c 100644 --- a/src/tests/dump_segfault1.phpt +++ b/src/tests/dump_segfault1.phpt @@ -9,5 +9,4 @@ sp.configuration_file={PWD}/config/config_dump_segfault1.ini echo strpos("pouet", "p") . "\n"; ?> --EXPECTF-- -[snuffleupagus][0.0.0.0][disabled_function][drop] Aborted execution on return of the function 'strpos' in %a/tests/dump_segfault1.php:2, because the function returned '0', which matched the rule 'test'. - +Fatal error: [snuffleupagus][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 diff --git a/src/tests/dump_unserialize.phpt b/src/tests/dump_unserialize.phpt index dfa85017..592e9b0d 100644 --- a/src/tests/dump_unserialize.phpt +++ b/src/tests/dump_unserialize.phpt @@ -35,5 +35,5 @@ if ($res[2] != "GET:get_a='data_get_a' get_b='data_get_b' \n") { ?> --EXPECTF-- 1 -[snuffleupagus][0.0.0.0][unserialize][drop] Invalid HMAC for s:1:"a";alyualskdufyhalkdjsfh -NULL + +Fatal error: [snuffleupagus][unserialize] Invalid HMAC for s:1:"a";alyualskdufyhalkdjsfh in %a/src/tests/dump_unserialize.php on line 8 \ No newline at end of file diff --git a/src/tests/encrypt_cookies_empty_env.phpt b/src/tests/encrypt_cookies_empty_env.phpt index beb42151..252f8315 100644 --- a/src/tests/encrypt_cookies_empty_env.phpt +++ b/src/tests/encrypt_cookies_empty_env.phpt @@ -12,4 +12,6 @@ super_cookie=cGFkZGluZ3BhZGRpbmdwYWRkaW5ncGFkZGluZ3BhZGRpbmdwYWRkaW5ncGFkZGluZ3B --FILE-- --EXPECT-- -1 +Warning: [snuffleupagus][cookie_encryption] The environment variable 'SUPER_ENV_VAR' is empty, cookies are weakly encrypted in Unknown on line 0 + +Fatal error: [snuffleupagus][cookie_encryption] Something went wrong with the decryption of super_cookie in Unknown on line 0 diff --git a/src/tests/encrypt_cookies_invalid_decryption.phpt b/src/tests/encrypt_cookies_invalid_decryption.phpt index a5187c1c..c64675d6 100644 --- a/src/tests/encrypt_cookies_invalid_decryption.phpt +++ b/src/tests/encrypt_cookies_invalid_decryption.phpt @@ -16,8 +16,4 @@ EOF; --FILE-- --EXPECT-- - -array(1) { - ["awful_cookie"]=> - string(18) "awful_cookie_value" -} +Fatal error: [snuffleupagus][cookie_encryption] Something went wrong with the decryption of super_cookie in Unknown on line 0 \ No newline at end of file diff --git a/src/tests/encrypt_cookies_invalid_decryption2.phpt b/src/tests/encrypt_cookies_invalid_decryption2.phpt index f18cf6df..b3a55dd9 100644 --- a/src/tests/encrypt_cookies_invalid_decryption2.phpt +++ b/src/tests/encrypt_cookies_invalid_decryption2.phpt @@ -16,8 +16,4 @@ EOF; --FILE-- --EXPECT-- - -array(1) { - ["awful_cookie"]=> - string(18) "awful_cookie_value" -} +Fatal error: [snuffleupagus][cookie_encryption] Buffer underflow tentative detected in cookie encryption handling in Unknown on line 0 \ No newline at end of file diff --git a/src/tests/encrypt_cookies_invalid_decryption_short_cookie.phpt b/src/tests/encrypt_cookies_invalid_decryption_short_cookie.phpt index e5b6bfcb..39f189c1 100644 --- a/src/tests/encrypt_cookies_invalid_decryption_short_cookie.phpt +++ b/src/tests/encrypt_cookies_invalid_decryption_short_cookie.phpt @@ -16,9 +16,10 @@ EOF; --FILE-- --EXPECT-- +Warning: [snuffleupagus][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 array(2) { ["super_cookie"]=> string(3) "AAA" ["awful_cookie"]=> string(18) "awful_cookie_value" -} +} \ No newline at end of file diff --git a/src/tests/encrypt_cookies_invalid_decryption_simulation.phpt b/src/tests/encrypt_cookies_invalid_decryption_simulation.phpt index 0bd1dc82..d2004b99 100644 --- a/src/tests/encrypt_cookies_invalid_decryption_simulation.phpt +++ b/src/tests/encrypt_cookies_invalid_decryption_simulation.phpt @@ -18,10 +18,11 @@ EOF; echo "1337\n"; var_dump($_COOKIE); ?> --EXPECT-- +Warning: [snuffleupagus][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 1337 array(2) { ["super_cookie"]=> string(124) "Wk9NR1RISVNJU05PVEVOQ1JZUFRFREFUQUxMV0hBVFRIRUhFTExJU0hIRUxMQVJFWU9VRE9JTkdaT01Hb2htYXliZXRoaXNpc2Fub2xkc2Vzc2lvbmNvb2tpZQo=" ["awfulcookie"]=> string(16) "awfulcookievalue" -} +} \ No newline at end of file diff --git a/src/tests/encrypt_cookies_no_env.phpt b/src/tests/encrypt_cookies_no_env.phpt index 47de27fe..c3aeaef0 100644 --- a/src/tests/encrypt_cookies_no_env.phpt +++ b/src/tests/encrypt_cookies_no_env.phpt @@ -14,6 +14,7 @@ return << + --EXPECT-- 1 +Fatal error: [snuffleupagus][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 diff --git a/src/tests/encrypt_cookies_no_key.phpt b/src/tests/encrypt_cookies_no_key.phpt index b54690fa..ca815937 100644 --- a/src/tests/encrypt_cookies_no_key.phpt +++ b/src/tests/encrypt_cookies_no_key.phpt @@ -14,6 +14,7 @@ return << + --EXPECT-- 1 +Fatal error: [snuffleupagus][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 diff --git a/src/tests/encrypt_regexp_cookies_empty_env.phpt b/src/tests/encrypt_regexp_cookies_empty_env.phpt index 1ee61601..852c32ed 100644 --- a/src/tests/encrypt_regexp_cookies_empty_env.phpt +++ b/src/tests/encrypt_regexp_cookies_empty_env.phpt @@ -16,4 +16,4 @@ EOF; --FILE-- --EXPECT-- -1 +Fatal error: [snuffleupagus][cookie_encryption] Buffer underflow tentative detected in cookie encryption handling in Unknown on line 0 \ No newline at end of file diff --git a/src/tests/encrypt_regexp_cookies_invalid_decryption.phpt b/src/tests/encrypt_regexp_cookies_invalid_decryption.phpt index 22bed26a..0c02806b 100644 --- a/src/tests/encrypt_regexp_cookies_invalid_decryption.phpt +++ b/src/tests/encrypt_regexp_cookies_invalid_decryption.phpt @@ -16,8 +16,4 @@ EOF; --FILE-- --EXPECT-- - -array(1) { - ["awful_cookie"]=> - string(18) "awful_cookie_value" -} +Fatal error: [snuffleupagus][cookie_encryption] Something went wrong with the decryption of super_cookie in Unknown on line 0 \ No newline at end of file diff --git a/src/tests/encrypt_regexp_cookies_invalid_decryption2.phpt b/src/tests/encrypt_regexp_cookies_invalid_decryption2.phpt index 1a740c0a..e75e0369 100644 --- a/src/tests/encrypt_regexp_cookies_invalid_decryption2.phpt +++ b/src/tests/encrypt_regexp_cookies_invalid_decryption2.phpt @@ -16,8 +16,4 @@ EOF; --FILE-- --EXPECT-- - -array(1) { - ["awful_cookie"]=> - string(18) "awful_cookie_value" -} +Fatal error: [snuffleupagus][cookie_encryption] Buffer underflow tentative detected in cookie encryption handling in Unknown on line 0 \ No newline at end of file diff --git a/src/tests/encrypt_regexp_cookies_no_env.phpt b/src/tests/encrypt_regexp_cookies_no_env.phpt index 37b95c13..1238075a 100644 --- a/src/tests/encrypt_regexp_cookies_no_env.phpt +++ b/src/tests/encrypt_regexp_cookies_no_env.phpt @@ -14,6 +14,7 @@ return << + --EXPECT-- 1 +Fatal error: [snuffleupagus][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 diff --git a/src/tests/encrypt_regexp_cookies_no_key.phpt b/src/tests/encrypt_regexp_cookies_no_key.phpt index 12512ce6..5e6db7e0 100644 --- a/src/tests/encrypt_regexp_cookies_no_key.phpt +++ b/src/tests/encrypt_regexp_cookies_no_key.phpt @@ -14,6 +14,7 @@ return << + --EXPECT-- 1 +Fatal error: [snuffleupagus][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 diff --git a/src/tests/eval_backlist.phpt b/src/tests/eval_backlist.phpt index 20b2c927..f24af966 100644 --- a/src/tests/eval_backlist.phpt +++ b/src/tests/eval_backlist.phpt @@ -13,4 +13,5 @@ echo "After eval: $a\n"; ?> --EXPECTF-- Outside of eval: 14 -[snuffleupagus][0.0.0.0][eval][drop] A call to strlen was tried in eval, in%atests/eval_backlist.php:1, dropping it. + +Fatal error: [snuffleupagus][eval] A call to strlen was tried in eval, in %a/eval_backlist.php:1, dropping it. in %a/eval_backlist.php(4) : eval()'d code on line 1 \ No newline at end of file diff --git a/src/tests/eval_backlist_list.phpt b/src/tests/eval_backlist_list.phpt index b1c7bfde..5bf0ea8c 100644 --- a/src/tests/eval_backlist_list.phpt +++ b/src/tests/eval_backlist_list.phpt @@ -13,4 +13,5 @@ echo "After eval: $a\n"; ?> --EXPECTF-- Outside of eval: 14 -[snuffleupagus][0.0.0.0][eval][drop] A call to strlen was tried in eval, in %a/tests/eval_backlist_list.php:1, dropping it. + +Fatal error: [snuffleupagus][eval] A call to strlen 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 \ No newline at end of file diff --git a/src/tests/eval_backlist_simulation.phpt b/src/tests/eval_backlist_simulation.phpt index bea51154..3089c2d0 100644 --- a/src/tests/eval_backlist_simulation.phpt +++ b/src/tests/eval_backlist_simulation.phpt @@ -13,5 +13,6 @@ echo "After eval: $a\n"; ?> --EXPECTF-- Outside of eval: 14 -[snuffleupagus][0.0.0.0][eval][simulation] A call to strlen was tried in eval, in %a/tests/eval_backlist_simulation.php:1, logging it. -After eval: 4 + +Warning: [snuffleupagus][eval] A call to strlen 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: 4 \ No newline at end of file diff --git a/src/tests/eval_backlist_whitelist.phpt b/src/tests/eval_backlist_whitelist.phpt index 9b0bb55d..e5650b22 100644 --- a/src/tests/eval_backlist_whitelist.phpt +++ b/src/tests/eval_backlist_whitelist.phpt @@ -20,4 +20,5 @@ echo "After eval: $a\n"; --EXPECTF-- Outside of eval: my_fun: 1337 1337 1337 After allowed eval: my_fun: 1234 -[snuffleupagus][0.0.0.0][Eval_whitelist][drop] The function 'cos' isn't in the eval whitelist, dropping its call. + +Fatal error: [snuffleupagus][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 diff --git a/src/tests/eval_backlist_whitelist_builtin.phpt b/src/tests/eval_backlist_whitelist_builtin.phpt index 47d223a9..2f8bc19c 100644 --- a/src/tests/eval_backlist_whitelist_builtin.phpt +++ b/src/tests/eval_backlist_whitelist_builtin.phpt @@ -20,4 +20,5 @@ echo "After eval: $a\n"; --EXPECTF-- Outside of eval: 1.5574077246549 After allowed eval: 1.5574077246549 -[snuffleupagus][0.0.0.0][Eval_whitelist][drop] The function 'cos' isn't in the eval whitelist, dropping its call. + +Fatal error: [snuffleupagus][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 diff --git a/src/tests/eval_whitelist.phpt b/src/tests/eval_whitelist.phpt index 16112886..a602d0dc 100644 --- a/src/tests/eval_whitelist.phpt +++ b/src/tests/eval_whitelist.phpt @@ -24,4 +24,5 @@ echo "After eval: $a\n"; --EXPECTF-- Outside of eval: my_fun: 1337 1337 1337 After allowed eval: my_fun: 1234 -[snuffleupagus][0.0.0.0][Eval_whitelist][drop] The function 'my_other_fun' isn't in the eval whitelist, dropping its call. + +Fatal error: [snuffleupagus][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 diff --git a/src/tests/eval_whitelist_builtin.phpt b/src/tests/eval_whitelist_builtin.phpt index bd7c2ace..5ed383d5 100644 --- a/src/tests/eval_whitelist_builtin.phpt +++ b/src/tests/eval_whitelist_builtin.phpt @@ -16,4 +16,5 @@ echo "After eval: $a\n"; --EXPECTF-- Outside of eval: 0.54030230586814 After allowed eval: 0.28366218546323 -[snuffleupagus][0.0.0.0][Eval_whitelist][drop] The function 'sin' isn't in the eval whitelist, dropping its call. + +Fatal error: [snuffleupagus][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 diff --git a/src/tests/eval_whitelist_include_then_user.phpt b/src/tests/eval_whitelist_include_then_user.phpt index 6d4e36a9..5ff3bff2 100644 --- a/src/tests/eval_whitelist_include_then_user.phpt +++ b/src/tests/eval_whitelist_include_then_user.phpt @@ -26,4 +26,5 @@ unlink($dir . '/test.bla'); --EXPECTF-- Outside of eval: 0.54030230586814 After allowed eval: 0.28366218546323 -[snuffleupagus][0.0.0.0][Eval_whitelist][drop] The function 'sin' isn't in the eval whitelist, dropping its call. + +Fatal error: [snuffleupagus][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 diff --git a/src/tests/eval_whitelist_simulation.phpt b/src/tests/eval_whitelist_simulation.phpt index ff2f9700..c4a3efae 100644 --- a/src/tests/eval_whitelist_simulation.phpt +++ b/src/tests/eval_whitelist_simulation.phpt @@ -24,5 +24,6 @@ echo "After eval: $a\n"; --EXPECTF-- Outside of eval: my_fun: 1337 1337 1337 After allowed eval: my_fun: 1234 -[snuffleupagus][0.0.0.0][Eval_whitelist][simulation] The function 'my_other_fun' isn't in the eval whitelist, logging its call. + +Warning: [snuffleupagus][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 After eval: my_other_fun: 1234 \ No newline at end of file diff --git a/src/tests/eval_whitelist_user_then_builtin.phpt b/src/tests/eval_whitelist_user_then_builtin.phpt index 8db36fcc..dbc7d935 100644 --- a/src/tests/eval_whitelist_user_then_builtin.phpt +++ b/src/tests/eval_whitelist_user_then_builtin.phpt @@ -20,4 +20,5 @@ echo "After eval: $a\n"; ?> --EXPECTF-- Outside of eval: -0.54402111088937 -[snuffleupagus][0.0.0.0][Eval_whitelist][drop] The function 'sin' isn't in the eval whitelist, dropping its call. + +Fatal error: [snuffleupagus][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 diff --git a/src/tests/glob_config.phpt b/src/tests/glob_config.phpt index 6a3d3d55..b557c8b2 100644 --- a/src/tests/glob_config.phpt +++ b/src/tests/glob_config.phpt @@ -16,8 +16,8 @@ foo(); bla(); ?> --EXPECTF-- -[snuffleupagus][0.0.0.0][disabled_function][simulation] Aborted execution on call of the function 'foo' in %s/tests/glob_config.php:%d. +Warning: [snuffleupagus][disabled_function] Aborted execution on call of the function 'foo' in %a/glob_config.php on line 3 1 -[snuffleupagus][0.0.0.0][disabled_function][simulation] Aborted execution on call of the function 'bla' in %s/tests/glob_config.php:%d. -2 +Warning: [snuffleupagus][disabled_function] 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 c7c3fcdc..ebe2aaa0 100644 --- a/src/tests/inexistent_conf_file.phpt +++ b/src/tests/inexistent_conf_file.phpt @@ -7,4 +7,6 @@ sp.configuration_file={PWD}/config/unexistent_configuration_file.ini --FILE-- --EXPECTF-- -[snuffleupagus][0.0.0.0][config][error] Could not open configuration file %a/tests/config/unexistent_configuration_file.ini : No such file or directory +PHP Fatal error: [snuffleupagus][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][config] Could not open configuration file %a/config/unexistent_configuration_file.ini : No such file or directory in Unknown on line 0 \ 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 2f6e2046..6b3026e8 100644 --- a/src/tests/inexistent_conf_file_list.phpt +++ b/src/tests/inexistent_conf_file_list.phpt @@ -7,4 +7,6 @@ sp.configuration_file={PWD}/../../config/default.rules,{PWD}/non_existent_config --FILE-- --EXPECTF-- -[snuffleupagus][0.0.0.0][config][error] Could not open configuration file%a/non_existent_configuration_file : No such file or directory +PHP Fatal error: [snuffleupagus][config] Could not open configuration file %a/non_existent_configuration_file : No such file or directory in Unknown on line 0 + +Fatal error: [snuffleupagus][config] Could not open configuration file %a/non_existent_configuration_file : No such file or directory in Unknown on line 0 \ No newline at end of file diff --git a/src/tests/multi_config.phpt b/src/tests/multi_config.phpt index c5509a45..2bdc3720 100644 --- a/src/tests/multi_config.phpt +++ b/src/tests/multi_config.phpt @@ -16,8 +16,8 @@ foo(); bla(); ?> --EXPECTF-- -[snuffleupagus][0.0.0.0][disabled_function][simulation] Aborted execution on call of the function 'foo' in %s/tests/multi_config.php:%d. +Warning: [snuffleupagus][disabled_function] Aborted execution on call of the function 'foo' in %a/multi_config.php on line 3 1 -[snuffleupagus][0.0.0.0][disabled_function][simulation] Aborted execution on call of the function 'bla' in %s/tests/multi_config.php:%d. -2 +Warning: [snuffleupagus][disabled_function] 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/nested_eval_blacklist.phpt b/src/tests/nested_eval_blacklist.phpt index b12bf93e..9671a65c 100644 --- a/src/tests/nested_eval_blacklist.phpt +++ b/src/tests/nested_eval_blacklist.phpt @@ -25,4 +25,5 @@ Outside of eval: 14 Inception lvl 1... Inception lvl 2... Inception lvl 3... -[snuffleupagus][0.0.0.0][eval][drop] A call to strlen was tried in eval, in %a/tests/nested_eval_blacklist.php(5) : eval()'d code(4) : eval()'d code:3, dropping it. + +Fatal error: [snuffleupagus][eval] A call to strlen 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 \ No newline at end of file diff --git a/src/tests/nested_eval_blacklist2.phpt b/src/tests/nested_eval_blacklist2.phpt index 3b13e301..aee41db6 100644 --- a/src/tests/nested_eval_blacklist2.phpt +++ b/src/tests/nested_eval_blacklist2.phpt @@ -25,4 +25,5 @@ Outside of eval: 14 Inception lvl 1... Inception lvl 2... Inception lvl 3... -[snuffleupagus][0.0.0.0][eval][drop] A call to strlen was tried in eval, in %a/tests/nested_eval_blacklist2.php(5) : eval()'d code:7, dropping it. + +Fatal error: [snuffleupagus][eval] A call to strlen 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 \ No newline at end of file diff --git a/src/tests/noncore_function_hooking.phpt b/src/tests/noncore_function_hooking.phpt index 2cb46869..52bb114b 100644 --- a/src/tests/noncore_function_hooking.phpt +++ b/src/tests/noncore_function_hooking.phpt @@ -12,4 +12,4 @@ function custom_fun($a) { custom_fun("hello"); ?> --EXPECTF-- -[snuffleupagus][0.0.0.0][disabled_function][drop] Aborted execution on call of the function 'custom_fun' in %a/tests/noncore_function_hooking.php:3. +Fatal error: [snuffleupagus][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 diff --git a/src/tests/unserialize_fail.phpt b/src/tests/unserialize_fail.phpt index 5c0bb807..c6411a50 100644 --- a/src/tests/unserialize_fail.phpt +++ b/src/tests/unserialize_fail.phpt @@ -12,12 +12,4 @@ var_dump(unserialize('s:1:"a";dslfjklfjfkjfdjffjfjads')); var_dump(unserialize(1,2,3,4)); ?> --EXPECTF-- -[snuffleupagus][0.0.0.0][unserialize][drop] The serialized object is too small. -bool(false) -[snuffleupagus][0.0.0.0][unserialize][drop] Invalid HMAC for s:1:"a";alyualskdufyhalkdjsfh -NULL -[snuffleupagus][0.0.0.0][unserialize][drop] The serialized object is too small. -bool(false) - -Warning: unserialize() expects at most 2 parameters, 4 given in %a/tests/unserialize_fail.php on line %d -bool(false) \ No newline at end of file +Fatal error: [snuffleupagus][unserialize] 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_sim.phpt b/src/tests/unserialize_sim.phpt index 0d8280c2..68f81721 100644 --- a/src/tests/unserialize_sim.phpt +++ b/src/tests/unserialize_sim.phpt @@ -11,7 +11,8 @@ echo $a; var_dump(unserialize($a)); var_dump(unserialize('s:1:"a";alyualskdufyhalkdjsfhalkjdhflaksjdfhlkasdhflkahdawkuerylksjdfhlkssjgdflaksjdh1337sjdf')); ?> ---EXPECT-- +--EXPECTF-- s:1:"a";650609b417904d0d9bbf1fc44a975d13ecdf6b02b715c1a06271fb3b673f25b1string(1) "a" -[snuffleupagus][0.0.0.0][unserialize][simulation] Invalid HMAC for s:1:"a";alyualskdufyhalkdjsfh + +Warning: [snuffleupagus][unserialize] Invalid HMAC for s:1:"a";alyualskdufyhalkdjsfh in %a/src/tests/unserialize_sim.php on line 5 string(1) "a" diff --git a/src/tests/upload_validation.phpt b/src/tests/upload_validation.phpt index c802c162..bdcbc60f 100644 --- a/src/tests/upload_validation.phpt +++ b/src/tests/upload_validation.phpt @@ -14,3 +14,4 @@ echo 1; ?> --EXPECTF-- 1 +Fatal error: [snuffleupagus][config] A rule can't be enabled and disabled on line 1 in Unknown on line 0 \ No newline at end of file diff --git a/src/tests/upload_validation_invalid.phpt b/src/tests/upload_validation_invalid.phpt index 25a67502..0dbdbbbe 100644 --- a/src/tests/upload_validation_invalid.phpt +++ b/src/tests/upload_validation_invalid.phpt @@ -13,5 +13,9 @@ Content-Disposition: form-data; name="test"; filename="test.php" echo 1; ?> --EXPECTF-- -[snuffleupagus][0.0.0.0][upload_validation][error] Could not call './tests/data/upload_invalid.sh' : Exec format error -[snuffleupagus][0.0.0.0][upload_validation][drop] The upload of test.php on ? was rejected. +Warning: [snuffleupagus][upload_validation] 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][upload_validation] The upload of test.php on ? was rejected. in Unknown on line 0 diff --git a/src/tests/upload_validation_ko.phpt b/src/tests/upload_validation_ko.phpt index 8579a17e..d632e60b 100644 --- a/src/tests/upload_validation_ko.phpt +++ b/src/tests/upload_validation_ko.phpt @@ -11,4 +11,4 @@ Content-Disposition: form-data; name="test"; filename="test.php" --blabla-- --FILE-- --EXPECTF-- -[snuffleupagus][0.0.0.0][upload_validation][drop] The upload of test.php on ? was rejected. +Fatal error: [snuffleupagus][upload_validation] 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_ko_simulation.phpt b/src/tests/upload_validation_ko_simulation.phpt index d2814118..b47c405c 100644 --- a/src/tests/upload_validation_ko_simulation.phpt +++ b/src/tests/upload_validation_ko_simulation.phpt @@ -12,4 +12,5 @@ Content-Disposition: form-data; name="test"; filename="test.php" --FILE-- --EXPECTF-- -1337 +Warning: [snuffleupagus][upload_validation] 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_no_exec.phpt b/src/tests/upload_validation_no_exec.phpt index 90a58da5..ca520172 100644 --- a/src/tests/upload_validation_no_exec.phpt +++ b/src/tests/upload_validation_no_exec.phpt @@ -12,7 +12,6 @@ Content-Disposition: form-data; name="test"; filename="test.php" --FILE-- --EXPECTF-- array(1) { @@ -30,3 +29,5 @@ array(1) { int(0) } } + +Fatal error: [snuffleupagus][config] 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_real.phpt b/src/tests/upload_validation_real.phpt index f1d29d46..d419590b 100644 --- a/src/tests/upload_validation_real.phpt +++ b/src/tests/upload_validation_real.phpt @@ -41,5 +41,4 @@ Some random text again echo 1; ?> --EXPECTF-- -Upload_validation: Found an opcode: INIT_FCALL -[snuffleupagus][0.0.0.0][upload_validation][drop] The upload of test.php on ? was rejected. +Fatal error: [snuffleupagus][upload_validation] The upload of test.php on ? was rejected. in Unknown on line 0 \ No newline at end of file