diff options
| author | Ben Fuhrmannek | 2021-02-16 11:16:59 +0100 |
|---|---|---|
| committer | Ben Fuhrmannek | 2021-02-16 11:16:59 +0100 |
| commit | 5484bcb5eb2714e7438927e2566c86a74d7c51af (patch) | |
| tree | b78326d2999397be4c08e06b23209981f82a4ea9 /src | |
| parent | 7ac1e3866ef4f146c6c93a5ca13b9aebb14e936a (diff) | |
| parent | cecfdd808da67be908dbe7144cc8c74dfb3f855e (diff) | |
Merge remote-tracking branch 'upstream/master'
Diffstat (limited to 'src')
480 files changed, 2762 insertions, 989 deletions
diff --git a/src/config.m4 b/src/config.m4 index 52b6d04..e4cc1f5 100644 --- a/src/config.m4 +++ b/src/config.m4 | |||
| @@ -24,7 +24,7 @@ CFLAGS="$CFLAGS -Wall -Wextra -Wno-unused-parameter" | |||
| 24 | CFLAGS="$CFLAGS -Wformat=2 -Wformat-security -D_FORTIFY_SOURCE=2" | 24 | CFLAGS="$CFLAGS -Wformat=2 -Wformat-security -D_FORTIFY_SOURCE=2" |
| 25 | CFLAGS="$CFLAGS -fstack-protector" | 25 | CFLAGS="$CFLAGS -fstack-protector" |
| 26 | 26 | ||
| 27 | LDFLAGS="$LDFLAGS -lpcre" | 27 | LDFLAGS="$LDFLAGS `pcre2-config --libs8`" |
| 28 | 28 | ||
| 29 | if test "$PHP_DEBUG" = "yes"; then | 29 | if test "$PHP_DEBUG" = "yes"; then |
| 30 | AC_DEFINE(SP_DEBUG, 1, [Wether you want to enable debug messages]) | 30 | AC_DEFINE(SP_DEBUG, 1, [Wether you want to enable debug messages]) |
diff --git a/src/php_snuffleupagus.h b/src/php_snuffleupagus.h index 5919126..248045c 100644 --- a/src/php_snuffleupagus.h +++ b/src/php_snuffleupagus.h | |||
| @@ -1,9 +1,9 @@ | |||
| 1 | #ifndef PHP_SNUFFLEUPAGUS_H | 1 | #ifndef PHP_SNUFFLEUPAGUS_H |
| 2 | #define PHP_SNUFFLEUPAGUS_H | 2 | #define PHP_SNUFFLEUPAGUS_H |
| 3 | 3 | ||
| 4 | #define PHP_SNUFFLEUPAGUS_VERSION "0.5.0" | 4 | #define PHP_SNUFFLEUPAGUS_VERSION "0.7.0" |
| 5 | #define PHP_SNUFFLEUPAGUS_EXTNAME "snuffleupagus" | 5 | #define PHP_SNUFFLEUPAGUS_EXTNAME "snuffleupagus" |
| 6 | #define PHP_SNUFFLEUPAGUS_AUTHOR "NBS System" | 6 | #define PHP_SNUFFLEUPAGUS_AUTHOR "NBS System & Julien (jvoisin) Voisin" |
| 7 | #define PHP_SNUFFLEUPAGUS_URL "https://github.com/jvoisin/snuffleupagus" | 7 | #define PHP_SNUFFLEUPAGUS_URL "https://github.com/jvoisin/snuffleupagus" |
| 8 | #define PHP_SNUFFLEUPAGUS_COPYRIGHT "LGPLv2" | 8 | #define PHP_SNUFFLEUPAGUS_COPYRIGHT "LGPLv2" |
| 9 | 9 | ||
| @@ -14,7 +14,6 @@ | |||
| 14 | #include <errno.h> | 14 | #include <errno.h> |
| 15 | #include <fcntl.h> | 15 | #include <fcntl.h> |
| 16 | #include <inttypes.h> | 16 | #include <inttypes.h> |
| 17 | #include <pcre.h> | ||
| 18 | #include <stdbool.h> | 17 | #include <stdbool.h> |
| 19 | #include <stdio.h> | 18 | #include <stdio.h> |
| 20 | #include <stdlib.h> | 19 | #include <stdlib.h> |
| @@ -29,12 +28,11 @@ | |||
| 29 | #include <sys/syslog.h> | 28 | #include <sys/syslog.h> |
| 30 | 29 | ||
| 31 | #include "SAPI.h" | 30 | #include "SAPI.h" |
| 32 | #include "ext/session/php_session.h" | 31 | #include "ext/pcre/php_pcre.h" |
| 33 | #include "ext/standard/head.h" | 32 | #include "ext/standard/head.h" |
| 34 | #include "ext/standard/info.h" | 33 | #include "ext/standard/info.h" |
| 35 | #include "ext/standard/url.h" | 34 | #include "ext/standard/url.h" |
| 36 | #include "ext/standard/php_var.h" | 35 | #include "ext/standard/php_var.h" |
| 37 | #include "ext/pcre/php_pcre.h" | ||
| 38 | #include "ext/session/php_session.h" | 36 | #include "ext/session/php_session.h" |
| 39 | #include "php.h" | 37 | #include "php.h" |
| 40 | #include "php_ini.h" | 38 | #include "php_ini.h" |
| @@ -47,9 +45,6 @@ | |||
| 47 | #include "zend_vm.h" | 45 | #include "zend_vm.h" |
| 48 | 46 | ||
| 49 | /* Compatibility */ | 47 | /* Compatibility */ |
| 50 | #if ( !HAVE_PCRE && !HAVE_BUNDLED_PCRE ) | ||
| 51 | #error Snuffleupagus requires PHP7+ with PCRE support | ||
| 52 | #endif | ||
| 53 | #if PHP_VERSION_ID < 70000 | 48 | #if PHP_VERSION_ID < 70000 |
| 54 | #error Snuffleupagus only works with PHP7+. You shouldn't use PHP5 anyway, \ | 49 | #error Snuffleupagus only works with PHP7+. You shouldn't use PHP5 anyway, \ |
| 55 | since it's not supported anymore: https://secure.php.net/supported-versions.php | 50 | since it's not supported anymore: https://secure.php.net/supported-versions.php |
| @@ -60,7 +55,15 @@ typedef void (*zif_handler)(INTERNAL_FUNCTION_PARAMETERS); | |||
| 60 | #if PHP_VERSION_ID >= 80000 | 55 | #if PHP_VERSION_ID >= 80000 |
| 61 | #define TSRMLS_FETCH() | 56 | #define TSRMLS_FETCH() |
| 62 | #define TSRMLS_C | 57 | #define TSRMLS_C |
| 58 | #else | ||
| 59 | #if ( !HAVE_PCRE && !HAVE_BUNDLED_PCRE ) | ||
| 60 | #error Snuffleupagus requires PHP7+ with PCRE support | ||
| 63 | #endif | 61 | #endif |
| 62 | #endif | ||
| 63 | |||
| 64 | #define SP_CONFIG_VALID 1 | ||
| 65 | #define SP_CONFIG_INVALID 0 | ||
| 66 | #define SP_CONFIG_NONE -1 | ||
| 64 | 67 | ||
| 65 | #include "sp_pcre_compat.h" | 68 | #include "sp_pcre_compat.h" |
| 66 | #include "sp_list.h" | 69 | #include "sp_list.h" |
| @@ -101,7 +104,7 @@ extern zend_module_entry snuffleupagus_module_entry; | |||
| 101 | ZEND_BEGIN_MODULE_GLOBALS(snuffleupagus) | 104 | ZEND_BEGIN_MODULE_GLOBALS(snuffleupagus) |
| 102 | size_t in_eval; | 105 | size_t in_eval; |
| 103 | sp_config config; | 106 | sp_config config; |
| 104 | bool is_config_valid; | 107 | int is_config_valid; // 1 = valid, 0 = invalid, -1 = none |
| 105 | bool allow_broken_configuration; | 108 | bool allow_broken_configuration; |
| 106 | HashTable *disabled_functions_hook; | 109 | HashTable *disabled_functions_hook; |
| 107 | HashTable *sp_internal_functions_hook; | 110 | HashTable *sp_internal_functions_hook; |
diff --git a/src/snuffleupagus.c b/src/snuffleupagus.c index d62069c..9a5ac90 100644 --- a/src/snuffleupagus.c +++ b/src/snuffleupagus.c | |||
| @@ -22,10 +22,13 @@ ZEND_DLEXPORT int sp_zend_startup(zend_extension *extension) { | |||
| 22 | // LCOV_EXCL_END | 22 | // LCOV_EXCL_END |
| 23 | 23 | ||
| 24 | static inline void sp_op_array_handler(zend_op_array *op) { | 24 | static inline void sp_op_array_handler(zend_op_array *op) { |
| 25 | if (NULL == op->filename) { | 25 | // We need a filename, and strict mode not already enabled on this op |
| 26 | if (NULL == op->filename || op->fn_flags & ZEND_ACC_STRICT_TYPES) { | ||
| 26 | return; | 27 | return; |
| 27 | } else { | 28 | } else { |
| 28 | op->fn_flags |= ZEND_ACC_STRICT_TYPES; | 29 | if (true == SNUFFLEUPAGUS_G(config).config_global_strict->enable) { |
| 30 | op->fn_flags |= ZEND_ACC_STRICT_TYPES; | ||
| 31 | } | ||
| 29 | } | 32 | } |
| 30 | } | 33 | } |
| 31 | 34 | ||
| @@ -59,7 +62,7 @@ ZEND_DLEXPORT zend_extension zend_extension_entry = { | |||
| 59 | NULL, /* activate_func_t */ | 62 | NULL, /* activate_func_t */ |
| 60 | NULL, /* deactivate_func_t */ | 63 | NULL, /* deactivate_func_t */ |
| 61 | NULL, /* message_handler_func_t */ | 64 | NULL, /* message_handler_func_t */ |
| 62 | sp_op_array_handler, // zend_global_strict, /* op_array_handler_func_t */ | 65 | sp_op_array_handler, /* op_array_handler_func_t */ |
| 63 | NULL, /* statement_handler_func_t */ | 66 | NULL, /* statement_handler_func_t */ |
| 64 | NULL, /* fcall_begin_handler_func_t */ | 67 | NULL, /* fcall_begin_handler_func_t */ |
| 65 | NULL, /* fcall_end_handler_func_t */ | 68 | NULL, /* fcall_end_handler_func_t */ |
| @@ -68,6 +71,7 @@ ZEND_DLEXPORT zend_extension zend_extension_entry = { | |||
| 68 | STANDARD_ZEND_EXTENSION_PROPERTIES}; | 71 | STANDARD_ZEND_EXTENSION_PROPERTIES}; |
| 69 | 72 | ||
| 70 | PHP_GINIT_FUNCTION(snuffleupagus) { | 73 | PHP_GINIT_FUNCTION(snuffleupagus) { |
| 74 | snuffleupagus_globals->is_config_valid = SP_CONFIG_NONE; | ||
| 71 | snuffleupagus_globals->in_eval = 0; | 75 | snuffleupagus_globals->in_eval = 0; |
| 72 | 76 | ||
| 73 | #define SP_INIT_HT(F) snuffleupagus_globals->F = \ | 77 | #define SP_INIT_HT(F) snuffleupagus_globals->F = \ |
| @@ -186,8 +190,12 @@ PHP_RINIT_FUNCTION(snuffleupagus) { | |||
| 186 | ZEND_TSRMLS_CACHE_UPDATE(); | 190 | ZEND_TSRMLS_CACHE_UPDATE(); |
| 187 | #endif | 191 | #endif |
| 188 | 192 | ||
| 189 | if (!SNUFFLEUPAGUS_G(allow_broken_configuration) && !SNUFFLEUPAGUS_G(is_config_valid)) { | 193 | if (!SNUFFLEUPAGUS_G(allow_broken_configuration)) { |
| 190 | sp_log_err("config", "Invalid configuration file"); | 194 | if (SNUFFLEUPAGUS_G(is_config_valid) == SP_CONFIG_INVALID ) { |
| 195 | sp_log_err("config", "Invalid configuration file"); | ||
| 196 | } else if (SNUFFLEUPAGUS_G(is_config_valid) == SP_CONFIG_NONE) { | ||
| 197 | sp_log_warn("config", "No configuration specificed via sp.configuration_file"); | ||
| 198 | } | ||
| 191 | } | 199 | } |
| 192 | 200 | ||
| 193 | // We need to disable wrappers loaded by extensions loaded after SNUFFLEUPAGUS. | 201 | // We need to disable wrappers loaded by extensions loaded after SNUFFLEUPAGUS. |
| @@ -209,12 +217,23 @@ PHP_RINIT_FUNCTION(snuffleupagus) { | |||
| 209 | PHP_RSHUTDOWN_FUNCTION(snuffleupagus) { return SUCCESS; } | 217 | PHP_RSHUTDOWN_FUNCTION(snuffleupagus) { return SUCCESS; } |
| 210 | 218 | ||
| 211 | PHP_MINFO_FUNCTION(snuffleupagus) { | 219 | PHP_MINFO_FUNCTION(snuffleupagus) { |
| 220 | const char *valid_config; | ||
| 221 | switch(SNUFFLEUPAGUS_G(is_config_valid)) { | ||
| 222 | case SP_CONFIG_VALID: | ||
| 223 | valid_config = "yes"; | ||
| 224 | break; | ||
| 225 | case SP_CONFIG_INVALID: | ||
| 226 | valid_config = "invalid"; | ||
| 227 | break; | ||
| 228 | case SP_CONFIG_NONE: | ||
| 229 | default: | ||
| 230 | valid_config = "no"; | ||
| 231 | } | ||
| 212 | php_info_print_table_start(); | 232 | php_info_print_table_start(); |
| 213 | php_info_print_table_row(2, "snuffleupagus support", "enabled"); | 233 | php_info_print_table_row(2, "snuffleupagus support", |
| 234 | SNUFFLEUPAGUS_G(is_config_valid)?"enabled":"disabled"); | ||
| 214 | php_info_print_table_row(2, "Version", PHP_SNUFFLEUPAGUS_VERSION); | 235 | php_info_print_table_row(2, "Version", PHP_SNUFFLEUPAGUS_VERSION); |
| 215 | php_info_print_table_row( | 236 | php_info_print_table_row( 2, "Valid config", valid_config); |
| 216 | 2, "Valid config", | ||
| 217 | (SNUFFLEUPAGUS_G(is_config_valid) == true) ? "yes" : "no"); | ||
| 218 | php_info_print_table_end(); | 237 | php_info_print_table_end(); |
| 219 | DISPLAY_INI_ENTRIES(); | 238 | DISPLAY_INI_ENTRIES(); |
| 220 | } | 239 | } |
| @@ -234,14 +253,14 @@ static PHP_INI_MH(OnUpdateConfiguration) { | |||
| 234 | int ret = glob(config_file, GLOB_NOCHECK, NULL, &globbuf); | 253 | int ret = glob(config_file, GLOB_NOCHECK, NULL, &globbuf); |
| 235 | 254 | ||
| 236 | if (ret != 0) { | 255 | if (ret != 0) { |
| 237 | SNUFFLEUPAGUS_G(is_config_valid) = false; | 256 | SNUFFLEUPAGUS_G(is_config_valid) = SP_CONFIG_INVALID; |
| 238 | globfree(&globbuf); | 257 | globfree(&globbuf); |
| 239 | return FAILURE; | 258 | return FAILURE; |
| 240 | } | 259 | } |
| 241 | 260 | ||
| 242 | for (size_t i = 0; globbuf.gl_pathv[i]; i++) { | 261 | for (size_t i = 0; globbuf.gl_pathv[i]; i++) { |
| 243 | if (sp_parse_config(globbuf.gl_pathv[i]) != SUCCESS) { | 262 | if (sp_parse_config(globbuf.gl_pathv[i]) != SUCCESS) { |
| 244 | SNUFFLEUPAGUS_G(is_config_valid) = false; | 263 | SNUFFLEUPAGUS_G(is_config_valid) = SP_CONFIG_INVALID; |
| 245 | globfree(&globbuf); | 264 | globfree(&globbuf); |
| 246 | return FAILURE; | 265 | return FAILURE; |
| 247 | } | 266 | } |
| @@ -249,7 +268,7 @@ static PHP_INI_MH(OnUpdateConfiguration) { | |||
| 249 | globfree(&globbuf); | 268 | globfree(&globbuf); |
| 250 | } | 269 | } |
| 251 | 270 | ||
| 252 | SNUFFLEUPAGUS_G(is_config_valid) = true; | 271 | SNUFFLEUPAGUS_G(is_config_valid) = SP_CONFIG_VALID; |
| 253 | 272 | ||
| 254 | if ((SNUFFLEUPAGUS_G(config).config_sloppy->enable)) { | 273 | if ((SNUFFLEUPAGUS_G(config).config_sloppy->enable)) { |
| 255 | hook_sloppy(); | 274 | hook_sloppy(); |
diff --git a/src/sp_cookie_encryption.h b/src/sp_cookie_encryption.h index 6d204bb..aede479 100644 --- a/src/sp_cookie_encryption.h +++ b/src/sp_cookie_encryption.h | |||
| @@ -13,7 +13,7 @@ | |||
| 13 | 13 | ||
| 14 | #define SAMESITE_COOKIE_FORMAT "; samesite=" | 14 | #define SAMESITE_COOKIE_FORMAT "; samesite=" |
| 15 | 15 | ||
| 16 | int hook_cookies(); | 16 | int hook_cookies(void); |
| 17 | int decrypt_cookie(zval *pDest, int num_args, va_list args, | 17 | int decrypt_cookie(zval *pDest, int num_args, va_list args, |
| 18 | zend_hash_key *hash_key); | 18 | zend_hash_key *hash_key); |
| 19 | 19 | ||
diff --git a/src/sp_crypt.c b/src/sp_crypt.c index 42c1510..c57ac0b 100644 --- a/src/sp_crypt.c +++ b/src/sp_crypt.c | |||
| @@ -49,16 +49,16 @@ int decrypt_zval(zval *pDest, bool simulation, zend_hash_key *hash_key) { | |||
| 49 | 49 | ||
| 50 | if (ZSTR_LEN(debase64) < crypto_secretbox_NONCEBYTES) { | 50 | if (ZSTR_LEN(debase64) < crypto_secretbox_NONCEBYTES) { |
| 51 | if (true == simulation) { | 51 | if (true == simulation) { |
| 52 | sp_log_msg( | 52 | sp_log_simulation( |
| 53 | "cookie_encryption", SP_LOG_SIMULATION, | 53 | "cookie_encryption", |
| 54 | "Buffer underflow tentative detected in cookie encryption handling " | 54 | "Buffer underflow tentative detected in cookie encryption handling " |
| 55 | "for %s. Using the cookie 'as it' instead of decrypting it", | 55 | "for %s. Using the cookie 'as it' instead of decrypting it", |
| 56 | hash_key ? ZSTR_VAL(hash_key->key) : "the session"); | 56 | hash_key ? ZSTR_VAL(hash_key->key) : "the session"); |
| 57 | return ZEND_HASH_APPLY_KEEP; | 57 | return ZEND_HASH_APPLY_KEEP; |
| 58 | } else { | 58 | } else { |
| 59 | // LCOV_EXCL_START | 59 | // LCOV_EXCL_START |
| 60 | sp_log_msg( | 60 | sp_log_drop( |
| 61 | "cookie_encryption", SP_LOG_DROP, | 61 | "cookie_encryption", |
| 62 | "Buffer underflow tentative detected in cookie encryption handling"); | 62 | "Buffer underflow tentative detected in cookie encryption handling"); |
| 63 | return ZEND_HASH_APPLY_REMOVE; | 63 | return ZEND_HASH_APPLY_REMOVE; |
| 64 | // LCOV_EXCL_STOP | 64 | // LCOV_EXCL_STOP |
| @@ -69,15 +69,15 @@ int decrypt_zval(zval *pDest, bool simulation, zend_hash_key *hash_key) { | |||
| 69 | if (ZSTR_LEN(debase64) + (size_t)crypto_secretbox_ZEROBYTES < | 69 | if (ZSTR_LEN(debase64) + (size_t)crypto_secretbox_ZEROBYTES < |
| 70 | ZSTR_LEN(debase64)) { | 70 | ZSTR_LEN(debase64)) { |
| 71 | if (true == simulation) { | 71 | if (true == simulation) { |
| 72 | sp_log_msg( | 72 | sp_log_simulation( |
| 73 | "cookie_encryption", SP_LOG_SIMULATION, | 73 | "cookie_encryption", |
| 74 | "Integer overflow tentative detected in cookie encryption handling " | 74 | "Integer overflow tentative detected in cookie encryption handling " |
| 75 | "for %s. Using the cookie 'as it' instead of decrypting it.", | 75 | "for %s. Using the cookie 'as it' instead of decrypting it.", |
| 76 | hash_key ? ZSTR_VAL(hash_key->key) : "the session"); | 76 | hash_key ? ZSTR_VAL(hash_key->key) : "the session"); |
| 77 | return ZEND_HASH_APPLY_KEEP; | 77 | return ZEND_HASH_APPLY_KEEP; |
| 78 | } else { | 78 | } else { |
| 79 | sp_log_msg( | 79 | sp_log_drop( |
| 80 | "cookie_encryption", SP_LOG_DROP, | 80 | "cookie_encryption", |
| 81 | "Integer overflow tentative detected in cookie encryption handling."); | 81 | "Integer overflow tentative detected in cookie encryption handling."); |
| 82 | return ZEND_HASH_APPLY_REMOVE; | 82 | return ZEND_HASH_APPLY_REMOVE; |
| 83 | } | 83 | } |
| @@ -98,8 +98,8 @@ int decrypt_zval(zval *pDest, bool simulation, zend_hash_key *hash_key) { | |||
| 98 | 98 | ||
| 99 | if (-1 == ret) { | 99 | if (-1 == ret) { |
| 100 | if (true == simulation) { | 100 | if (true == simulation) { |
| 101 | sp_log_msg( | 101 | sp_log_simulation( |
| 102 | "cookie_encryption", SP_LOG_SIMULATION, | 102 | "cookie_encryption", |
| 103 | "Something went wrong with the decryption of %s. Using the cookie " | 103 | "Something went wrong with the decryption of %s. Using the cookie " |
| 104 | "'as it' instead of decrypting it", | 104 | "'as it' instead of decrypting it", |
| 105 | hash_key ? ZSTR_VAL(hash_key->key) : "the session"); | 105 | hash_key ? ZSTR_VAL(hash_key->key) : "the session"); |
| @@ -107,9 +107,9 @@ int decrypt_zval(zval *pDest, bool simulation, zend_hash_key *hash_key) { | |||
| 107 | efree(backup); | 107 | efree(backup); |
| 108 | return ZEND_HASH_APPLY_KEEP; | 108 | return ZEND_HASH_APPLY_KEEP; |
| 109 | } else { | 109 | } else { |
| 110 | sp_log_msg("cookie_encryption", SP_LOG_WARN, | 110 | sp_log_warn("cookie_encryption", |
| 111 | "Something went wrong with the decryption of %s", | 111 | "Something went wrong with the decryption of %s", |
| 112 | hash_key ? ZSTR_VAL(hash_key->key) : "the session"); | 112 | hash_key ? ZSTR_VAL(hash_key->key) : "the session"); |
| 113 | efree(backup); | 113 | efree(backup); |
| 114 | return ZEND_HASH_APPLY_REMOVE; | 114 | return ZEND_HASH_APPLY_REMOVE; |
| 115 | } | 115 | } |
diff --git a/src/sp_disable_xxe.c b/src/sp_disable_xxe.c index 53148c8..113d84b 100644 --- a/src/sp_disable_xxe.c +++ b/src/sp_disable_xxe.c | |||
| @@ -3,18 +3,21 @@ | |||
| 3 | PHP_FUNCTION(sp_libxml_disable_entity_loader) { RETURN_TRUE; } | 3 | PHP_FUNCTION(sp_libxml_disable_entity_loader) { RETURN_TRUE; } |
| 4 | 4 | ||
| 5 | int hook_libxml_disable_entity_loader() { | 5 | int hook_libxml_disable_entity_loader() { |
| 6 | zval func_name; | ||
| 7 | zval hmac; | ||
| 8 | zval params[1]; | ||
| 9 | |||
| 10 | TSRMLS_FETCH(); | 6 | TSRMLS_FETCH(); |
| 11 | 7 | ||
| 8 | // External entities are disabled by default in PHP8+ | ||
| 9 | #if PHP_VERSION_ID < 80000 | ||
| 12 | /* Call the php function here instead of re-implementing it is a bit | 10 | /* Call the php function here instead of re-implementing it is a bit |
| 13 | * ugly, but we do not want to introduce compile-time dependencies against | 11 | * ugly, but we do not want to introduce compile-time dependencies against |
| 14 | * libxml. */ | 12 | * libxml. */ |
| 13 | zval func_name; | ||
| 14 | zval hmac; | ||
| 15 | zval params[1]; | ||
| 16 | |||
| 15 | ZVAL_STRING(&func_name, "libxml_disable_entity_loader"); | 17 | ZVAL_STRING(&func_name, "libxml_disable_entity_loader"); |
| 16 | ZVAL_STRING(¶ms[0], "true"); | 18 | ZVAL_STRING(¶ms[0], "true"); |
| 17 | call_user_function(CG(function_table), NULL, &func_name, &hmac, 1, params); | 19 | call_user_function(CG(function_table), NULL, &func_name, &hmac, 1, params); |
| 20 | #endif | ||
| 18 | 21 | ||
| 19 | HOOK_FUNCTION("libxml_disable_entity_loader", sp_internal_functions_hook, | 22 | HOOK_FUNCTION("libxml_disable_entity_loader", sp_internal_functions_hook, |
| 20 | PHP_FN(sp_libxml_disable_entity_loader)); | 23 | PHP_FN(sp_libxml_disable_entity_loader)); |
diff --git a/src/sp_disable_xxe.h b/src/sp_disable_xxe.h index 274c169..bd7b28c 100644 --- a/src/sp_disable_xxe.h +++ b/src/sp_disable_xxe.h | |||
| @@ -1,6 +1,6 @@ | |||
| 1 | #ifndef __SP_DISABLE_XXE_H | 1 | #ifndef __SP_DISABLE_XXE_H |
| 2 | #define __SP_DISABLE_XXE_H | 2 | #define __SP_DISABLE_XXE_H |
| 3 | 3 | ||
| 4 | int hook_libxml_disable_entity_loader(); | 4 | int hook_libxml_disable_entity_loader(void); |
| 5 | 5 | ||
| 6 | #endif /* __SP_DISABLE_XXE_H */ | 6 | #endif /* __SP_DISABLE_XXE_H */ |
diff --git a/src/sp_disabled_functions.c b/src/sp_disabled_functions.c index 6cb5446..c47b5cb 100644 --- a/src/sp_disabled_functions.c +++ b/src/sp_disabled_functions.c | |||
| @@ -40,7 +40,7 @@ static bool is_functions_list_matching(zend_execute_data* execute_data, | |||
| 40 | sp_list_node* functions_list) { | 40 | sp_list_node* functions_list) { |
| 41 | zend_execute_data *orig_execute_data, *current; | 41 | zend_execute_data *orig_execute_data, *current; |
| 42 | orig_execute_data = current = execute_data; | 42 | orig_execute_data = current = execute_data; |
| 43 | sp_list_node* it = functions_list; | 43 | sp_list_node const* it = functions_list; |
| 44 | 44 | ||
| 45 | while (current) { | 45 | while (current) { |
| 46 | if (it == NULL) { // every function in the list matched, we've got a match! | 46 | if (it == NULL) { // every function in the list matched, we've got a match! |
| @@ -50,7 +50,7 @@ static bool is_functions_list_matching(zend_execute_data* execute_data, | |||
| 50 | 50 | ||
| 51 | EG(current_execute_data) = current; | 51 | EG(current_execute_data) = current; |
| 52 | 52 | ||
| 53 | char* complete_path_function = get_complete_function_path(current); | 53 | char* const complete_path_function = get_complete_function_path(current); |
| 54 | if (!complete_path_function) { | 54 | if (!complete_path_function) { |
| 55 | break; | 55 | break; |
| 56 | } | 56 | } |
| @@ -59,10 +59,8 @@ static bool is_functions_list_matching(zend_execute_data* execute_data, | |||
| 59 | 59 | ||
| 60 | if (0 == match) { | 60 | if (0 == match) { |
| 61 | it = it->next; | 61 | it = it->next; |
| 62 | current = current->prev_execute_data; | ||
| 63 | } else { | ||
| 64 | break; | ||
| 65 | } | 62 | } |
| 63 | current = current->prev_execute_data; | ||
| 66 | } | 64 | } |
| 67 | 65 | ||
| 68 | EG(current_execute_data) = orig_execute_data; | 66 | EG(current_execute_data) = orig_execute_data; |
| @@ -87,7 +85,8 @@ static bool is_local_var_matching( | |||
| 87 | return true; | 85 | return true; |
| 88 | } | 86 | } |
| 89 | } else { | 87 | } else { |
| 90 | const zend_string* var_value_str = sp_zval_to_zend_string(var_value); | 88 | zend_string const* const var_value_str = |
| 89 | sp_zval_to_zend_string(var_value); | ||
| 91 | bool match = sp_match_value(var_value_str, config_node->value, | 90 | bool match = sp_match_value(var_value_str, config_node->value, |
| 92 | config_node->r_value); | 91 | config_node->r_value); |
| 93 | 92 | ||
| @@ -329,7 +328,7 @@ static void should_disable(zend_execute_data* execute_data, | |||
| 329 | } | 328 | } |
| 330 | 329 | ||
| 331 | if (config_node->cidr) { | 330 | if (config_node->cidr) { |
| 332 | char* client_ip = getenv("REMOTE_ADDR"); | 331 | const char* client_ip = get_ipaddr(); |
| 333 | if (client_ip && false == cidr_match(client_ip, config_node->cidr)) { | 332 | if (client_ip && false == cidr_match(client_ip, config_node->cidr)) { |
| 334 | goto next; | 333 | goto next; |
| 335 | } | 334 | } |
| @@ -361,7 +360,7 @@ static void should_disable(zend_execute_data* execute_data, | |||
| 361 | #else | 360 | #else |
| 362 | execute_data->func->op_array.arg_info->is_variadic | 361 | execute_data->func->op_array.arg_info->is_variadic |
| 363 | #endif | 362 | #endif |
| 364 | ){ | 363 | ) { |
| 365 | sp_log_warn( | 364 | sp_log_warn( |
| 366 | "disable_function", | 365 | "disable_function", |
| 367 | "Snuffleupagus doesn't support variadic functions yet, sorry. " | 366 | "Snuffleupagus doesn't support variadic functions yet, sorry. " |
| @@ -525,13 +524,13 @@ static int hook_functions_regexp(const sp_list_node* config) { | |||
| 525 | return SUCCESS; | 524 | return SUCCESS; |
| 526 | } | 525 | } |
| 527 | 526 | ||
| 528 | static int hook_functions(HashTable* to_hook_ht, HashTable* hooked_ht) { | 527 | static void hook_functions(HashTable* to_hook_ht, HashTable* hooked_ht) { |
| 529 | zend_string* key; | 528 | zend_string* key; |
| 530 | zval* value; | 529 | zval* value; |
| 531 | 530 | ||
| 532 | ZEND_HASH_FOREACH_STR_KEY_VAL(to_hook_ht, key, value) { | 531 | ZEND_HASH_FOREACH_STR_KEY_VAL(to_hook_ht, key, value) { |
| 533 | bool hooked = !HOOK_FUNCTION(ZSTR_VAL(key), disabled_functions_hook, | 532 | bool hooked = HOOK_FUNCTION(ZSTR_VAL(key), disabled_functions_hook, |
| 534 | PHP_FN(check_disabled_function)); | 533 | PHP_FN(check_disabled_function)); |
| 535 | bool is_builtin = | 534 | bool is_builtin = |
| 536 | check_is_builtin_name(((sp_list_node*)Z_PTR_P(value))->data); | 535 | check_is_builtin_name(((sp_list_node*)Z_PTR_P(value))->data); |
| 537 | if (hooked || is_builtin) { | 536 | if (hooked || is_builtin) { |
| @@ -540,7 +539,6 @@ static int hook_functions(HashTable* to_hook_ht, HashTable* hooked_ht) { | |||
| 540 | } | 539 | } |
| 541 | } | 540 | } |
| 542 | ZEND_HASH_FOREACH_END(); | 541 | ZEND_HASH_FOREACH_END(); |
| 543 | return SUCCESS; | ||
| 544 | } | 542 | } |
| 545 | 543 | ||
| 546 | ZEND_FUNCTION(eval_blacklist_callback) { | 544 | ZEND_FUNCTION(eval_blacklist_callback) { |
| @@ -565,13 +563,13 @@ ZEND_FUNCTION(eval_blacklist_callback) { | |||
| 565 | SP_TOKEN_EVAL_BLACKLIST); | 563 | SP_TOKEN_EVAL_BLACKLIST); |
| 566 | } | 564 | } |
| 567 | if (config_eval->simulation) { | 565 | if (config_eval->simulation) { |
| 568 | sp_log_msg("eval", SP_LOG_SIMULATION, | 566 | sp_log_simulation("eval", |
| 569 | "A call to %s was tried in eval, in %s:%d, logging it.", | 567 | "A call to %s was tried in eval, in %s:%d, logging it.", |
| 570 | current_function_name, ZSTR_VAL(filename), line_number); | 568 | current_function_name, ZSTR_VAL(filename), line_number); |
| 571 | } else { | 569 | } else { |
| 572 | sp_log_msg("eval", SP_LOG_DROP, | 570 | sp_log_drop("eval", |
| 573 | "A call to %s was tried in eval, in %s:%d, dropping it.", | 571 | "A call to %s was tried in eval, in %s:%d, dropping it.", |
| 574 | current_function_name, ZSTR_VAL(filename), line_number); | 572 | current_function_name, ZSTR_VAL(filename), line_number); |
| 575 | } | 573 | } |
| 576 | efree(filename); | 574 | efree(filename); |
| 577 | } | 575 | } |
| @@ -588,13 +586,11 @@ int hook_disabled_functions(void) { | |||
| 588 | 586 | ||
| 589 | int ret = SUCCESS; | 587 | int ret = SUCCESS; |
| 590 | 588 | ||
| 591 | ret |= | 589 | hook_functions(SNUFFLEUPAGUS_G(config).config_disabled_functions, |
| 592 | hook_functions(SNUFFLEUPAGUS_G(config).config_disabled_functions, | 590 | SNUFFLEUPAGUS_G(config).config_disabled_functions_hooked); |
| 593 | SNUFFLEUPAGUS_G(config).config_disabled_functions_hooked); | ||
| 594 | 591 | ||
| 595 | ret |= hook_functions( | 592 | hook_functions(SNUFFLEUPAGUS_G(config).config_disabled_functions_ret, |
| 596 | SNUFFLEUPAGUS_G(config).config_disabled_functions_ret, | 593 | SNUFFLEUPAGUS_G(config).config_disabled_functions_ret_hooked); |
| 597 | SNUFFLEUPAGUS_G(config).config_disabled_functions_ret_hooked); | ||
| 598 | 594 | ||
| 599 | ret |= hook_functions_regexp( | 595 | ret |= hook_functions_regexp( |
| 600 | SNUFFLEUPAGUS_G(config) | 596 | SNUFFLEUPAGUS_G(config) |
| @@ -619,7 +615,11 @@ int hook_disabled_functions(void) { | |||
| 619 | 615 | ||
| 620 | zend_write_func_t zend_write_default = NULL; | 616 | zend_write_func_t zend_write_default = NULL; |
| 621 | 617 | ||
| 618 | #if PHP_VERSION_ID >= 80000 | ||
| 619 | size_t hook_echo(const char* str, size_t str_length) { | ||
| 620 | #else | ||
| 622 | int hook_echo(const char* str, size_t str_length) { | 621 | int hook_echo(const char* str, size_t str_length) { |
| 622 | #endif | ||
| 623 | zend_string* zs = zend_string_init(str, str_length, 0); | 623 | zend_string* zs = zend_string_init(str, str_length, 0); |
| 624 | 624 | ||
| 625 | should_disable_ht( | 625 | should_disable_ht( |
diff --git a/src/sp_disabled_functions.h b/src/sp_disabled_functions.h index 3999aec..fd9b9b9 100644 --- a/src/sp_disabled_functions.h +++ b/src/sp_disabled_functions.h | |||
| @@ -3,8 +3,12 @@ | |||
| 3 | 3 | ||
| 4 | extern zend_write_func_t zend_write_default; | 4 | extern zend_write_func_t zend_write_default; |
| 5 | 5 | ||
| 6 | int hook_disabled_functions(); | 6 | #if PHP_VERSION_ID >= 80000 |
| 7 | size_t hook_echo(const char *, size_t); | ||
| 8 | #else | ||
| 7 | int hook_echo(const char *, size_t); | 9 | int hook_echo(const char *, size_t); |
| 10 | #endif | ||
| 11 | int hook_disabled_functions(void); | ||
| 8 | void should_disable_ht(zend_execute_data *, const char *, const zend_string *, | 12 | void should_disable_ht(zend_execute_data *, const char *, const zend_string *, |
| 9 | const char *, const sp_list_node *, const HashTable *); | 13 | const char *, const sp_list_node *, const HashTable *); |
| 10 | void should_drop_on_ret_ht(const zval *, const char *, | 14 | void should_drop_on_ret_ht(const zval *, const char *, |
diff --git a/src/sp_execute.c b/src/sp_execute.c index 4eae874..de83a2a 100644 --- a/src/sp_execute.c +++ b/src/sp_execute.c | |||
| @@ -18,12 +18,12 @@ ZEND_COLD static inline void terminate_if_writable(const char *filename) { | |||
| 18 | SP_TOKEN_READONLY_EXEC); | 18 | SP_TOKEN_READONLY_EXEC); |
| 19 | } | 19 | } |
| 20 | if (true == config_ro_exec->simulation) { | 20 | if (true == config_ro_exec->simulation) { |
| 21 | sp_log_msg("readonly_exec", SP_LOG_SIMULATION, | 21 | sp_log_simulation("readonly_exec", |
| 22 | "Attempted execution of a writable file (%s).", filename); | 22 | "Attempted execution of a writable file (%s).", |
| 23 | filename); | ||
| 23 | } else { | 24 | } else { |
| 24 | sp_log_msg("readonly_exec", SP_LOG_DROP, | 25 | sp_log_drop("readonly_exec", |
| 25 | "Attempted execution of a writable file (%s).", filename); | 26 | "Attempted execution of a writable file (%s).", filename); |
| 26 | zend_bailout(); | ||
| 27 | } | 27 | } |
| 28 | } else { | 28 | } else { |
| 29 | if (EACCES != errno) { | 29 | if (EACCES != errno) { |
| @@ -79,14 +79,14 @@ is_in_eval_and_whitelisted(const zend_execute_data *execute_data) { | |||
| 79 | SP_TOKEN_EVAL_WHITELIST); | 79 | SP_TOKEN_EVAL_WHITELIST); |
| 80 | } | 80 | } |
| 81 | if (config_eval->simulation) { | 81 | if (config_eval->simulation) { |
| 82 | sp_log_msg( | 82 | sp_log_simulation( |
| 83 | "Eval_whitelist", SP_LOG_SIMULATION, | 83 | "Eval_whitelist", |
| 84 | "The function '%s' isn't in the eval whitelist, logging its call.", | 84 | "The function '%s' isn't in the eval whitelist, logging its call.", |
| 85 | ZSTR_VAL(current_function)); | 85 | ZSTR_VAL(current_function)); |
| 86 | return; | 86 | return; |
| 87 | } else { | 87 | } else { |
| 88 | sp_log_msg( | 88 | sp_log_drop( |
| 89 | "Eval_whitelist", SP_LOG_DROP, | 89 | "Eval_whitelist", |
| 90 | "The function '%s' isn't in the eval whitelist, dropping its call.", | 90 | "The function '%s' isn't in the eval whitelist, dropping its call.", |
| 91 | ZSTR_VAL(current_function)); | 91 | ZSTR_VAL(current_function)); |
| 92 | } | 92 | } |
| @@ -156,6 +156,7 @@ static void sp_execute_ex(zend_execute_data *execute_data) { | |||
| 156 | return; | 156 | return; |
| 157 | } | 157 | } |
| 158 | 158 | ||
| 159 | // If we're at an internal function | ||
| 159 | if (!execute_data->prev_execute_data || | 160 | if (!execute_data->prev_execute_data || |
| 160 | !execute_data->prev_execute_data->func || | 161 | !execute_data->prev_execute_data->func || |
| 161 | !ZEND_USER_CODE(execute_data->prev_execute_data->func->type) || | 162 | !ZEND_USER_CODE(execute_data->prev_execute_data->func->type) || |
| @@ -163,17 +164,18 @@ static void sp_execute_ex(zend_execute_data *execute_data) { | |||
| 163 | should_disable_ht(execute_data, function_name, NULL, NULL, | 164 | should_disable_ht(execute_data, function_name, NULL, NULL, |
| 164 | config_disabled_functions_reg, | 165 | config_disabled_functions_reg, |
| 165 | config_disabled_functions); | 166 | config_disabled_functions); |
| 166 | } else if ((execute_data->prev_execute_data->opline->opcode == | 167 | } else { // If we're at a userland function call |
| 167 | ZEND_DO_FCALL || | 168 | switch (execute_data->prev_execute_data->opline->opcode) { |
| 168 | execute_data->prev_execute_data->opline->opcode == | 169 | case ZEND_DO_FCALL: |
| 169 | ZEND_DO_UCALL || | 170 | case ZEND_DO_FCALL_BY_NAME: |
| 170 | execute_data->prev_execute_data->opline->opcode == | 171 | case ZEND_DO_ICALL: |
| 171 | ZEND_DO_ICALL || | 172 | case ZEND_DO_UCALL: |
| 172 | execute_data->prev_execute_data->opline->opcode == | 173 | should_disable_ht(execute_data, function_name, NULL, NULL, |
| 173 | ZEND_DO_FCALL_BY_NAME)) { | 174 | config_disabled_functions_reg, |
| 174 | should_disable_ht(execute_data, function_name, NULL, NULL, | 175 | config_disabled_functions); |
| 175 | config_disabled_functions_reg, | 176 | default: |
| 176 | config_disabled_functions); | 177 | break; |
| 178 | } | ||
| 177 | } | 179 | } |
| 178 | 180 | ||
| 179 | // When a function's return value isn't used, php doesn't store it in the | 181 | // When a function's return value isn't used, php doesn't store it in the |
diff --git a/src/sp_harden_rand.h b/src/sp_harden_rand.h index 53ebdd0..bbe9be4 100644 --- a/src/sp_harden_rand.h +++ b/src/sp_harden_rand.h | |||
| @@ -5,6 +5,6 @@ | |||
| 5 | #include "ext/standard/php_random.h" | 5 | #include "ext/standard/php_random.h" |
| 6 | #include "zend_exceptions.h" | 6 | #include "zend_exceptions.h" |
| 7 | 7 | ||
| 8 | int hook_rand(); | 8 | int hook_rand(void); |
| 9 | 9 | ||
| 10 | #endif /* __SP_HARDEN_RAND_H */ | 10 | #endif /* __SP_HARDEN_RAND_H */ |
diff --git a/src/sp_list.c b/src/sp_list.c index c798d6d..0f00371 100644 --- a/src/sp_list.c +++ b/src/sp_list.c | |||
| @@ -10,7 +10,8 @@ void sp_list_free(sp_list_node *node) { | |||
| 10 | 10 | ||
| 11 | // Thanks to https://en.wikipedia.org/wiki/Insertion_sort :> | 11 | // Thanks to https://en.wikipedia.org/wiki/Insertion_sort :> |
| 12 | sp_list_node *sp_list_sort(sp_list_node *pList, | 12 | sp_list_node *sp_list_sort(sp_list_node *pList, |
| 13 | int (*cmp_func)(sp_list_node *, sp_list_node *)) { | 13 | int (*cmp_func)(sp_list_node const *const, |
| 14 | sp_list_node const *const)) { | ||
| 14 | sp_list_node *head = NULL; | 15 | sp_list_node *head = NULL; |
| 15 | 16 | ||
| 16 | if (pList == NULL || pList->next == NULL) { | 17 | if (pList == NULL || pList->next == NULL) { |
diff --git a/src/sp_list.h b/src/sp_list.h index 6b04486..2c91995 100644 --- a/src/sp_list.h +++ b/src/sp_list.h | |||
| @@ -7,8 +7,8 @@ typedef struct sp_node_s { | |||
| 7 | 7 | ||
| 8 | } sp_list_node; | 8 | } sp_list_node; |
| 9 | 9 | ||
| 10 | sp_list_node *sp_list_sort(sp_list_node *, | 10 | sp_list_node *sp_list_sort(sp_list_node *, int (*)(sp_list_node const *const, |
| 11 | int (*)(sp_list_node *, sp_list_node *)); | 11 | sp_list_node const *const)); |
| 12 | sp_list_node *sp_list_insert(sp_list_node *, void *); | 12 | sp_list_node *sp_list_insert(sp_list_node *, void *); |
| 13 | sp_list_node *sp_list_prepend(sp_list_node *, void *); | 13 | sp_list_node *sp_list_prepend(sp_list_node *, void *); |
| 14 | void sp_list_free(sp_list_node *); | 14 | void sp_list_free(sp_list_node *); |
diff --git a/src/sp_network_utils.c b/src/sp_network_utils.c index 1811d98..dc92969 100644 --- a/src/sp_network_utils.c +++ b/src/sp_network_utils.c | |||
| @@ -17,7 +17,8 @@ static inline bool cidr4_match(const struct in_addr addr, | |||
| 17 | 17 | ||
| 18 | static inline bool cidr6_match(const struct in6_addr address, | 18 | static inline bool cidr6_match(const struct in6_addr address, |
| 19 | const struct in6_addr network, uint8_t bits) { | 19 | const struct in6_addr network, uint8_t bits) { |
| 20 | #if defined(__FreeBSD__) || defined(__NetBSD__) || defined(__OpenBSD__) || defined(__APPLE__) | 20 | #if defined(__FreeBSD__) || defined(__NetBSD__) || defined(__OpenBSD__) || \ |
| 21 | defined(__APPLE__) | ||
| 21 | const uint32_t *a = address.__u6_addr.__u6_addr32; | 22 | const uint32_t *a = address.__u6_addr.__u6_addr32; |
| 22 | const uint32_t *n = network.__u6_addr.__u6_addr32; | 23 | const uint32_t *n = network.__u6_addr.__u6_addr32; |
| 23 | #else | 24 | #else |
diff --git a/src/sp_pcre_compat.c b/src/sp_pcre_compat.c index 3f8ff1e..509a8ea 100644 --- a/src/sp_pcre_compat.c +++ b/src/sp_pcre_compat.c | |||
| @@ -1,6 +1,8 @@ | |||
| 1 | #include "php_snuffleupagus.h" | 1 | #include "php_snuffleupagus.h" |
| 2 | 2 | ||
| 3 | sp_pcre* sp_pcre_compile(const char* const pattern) { | 3 | sp_pcre* sp_pcre_compile(const char* const pattern) { |
| 4 | assert(NULL != pattern); | ||
| 5 | |||
| 4 | sp_pcre* ret = NULL; | 6 | sp_pcre* ret = NULL; |
| 5 | #ifdef SP_HAS_PCRE2 | 7 | #ifdef SP_HAS_PCRE2 |
| 6 | unsigned char pcre_error[128] = {0}; | 8 | unsigned char pcre_error[128] = {0}; |
diff --git a/src/sp_pcre_compat.h b/src/sp_pcre_compat.h index 093a9c3..14c33b2 100644 --- a/src/sp_pcre_compat.h +++ b/src/sp_pcre_compat.h | |||
| @@ -4,21 +4,11 @@ | |||
| 4 | #include <stdlib.h> | 4 | #include <stdlib.h> |
| 5 | #include <stdbool.h> | 5 | #include <stdbool.h> |
| 6 | 6 | ||
| 7 | #undef pcre_exec | 7 | #define PCRE2_CODE_UNIT_WIDTH 8 |
| 8 | #undef pcre_compile | ||
| 9 | |||
| 10 | /* We're not supporting pcre2 when it's not bundled with php7, | ||
| 11 | * yet. Pull-requests are welcome. */ | ||
| 12 | #if HAVE_BUNDLED_PCRE | ||
| 13 | #if PHP_VERSION_ID >= 70300 | 8 | #if PHP_VERSION_ID >= 70300 |
| 14 | #define SP_HAS_PCRE2 | 9 | #define SP_HAS_PCRE2 |
| 15 | #include "ext/pcre/pcre2lib/pcre2.h" | ||
| 16 | #else | ||
| 17 | #include "ext/pcre/pcrelib/pcre.h" | ||
| 18 | #endif | ||
| 19 | #else | ||
| 20 | #include "pcre.h" | ||
| 21 | #endif | 10 | #endif |
| 11 | #include "ext/pcre/php_pcre.h" // PCRE1 | ||
| 22 | 12 | ||
| 23 | #ifdef SP_HAS_PCRE2 | 13 | #ifdef SP_HAS_PCRE2 |
| 24 | #define sp_pcre pcre2_code | 14 | #define sp_pcre pcre2_code |
diff --git a/src/sp_session.h b/src/sp_session.h index 435e983..06a0ce7 100644 --- a/src/sp_session.h +++ b/src/sp_session.h | |||
| @@ -7,4 +7,4 @@ | |||
| 7 | #include "ext/hash/php_hash_sha.h" | 7 | #include "ext/hash/php_hash_sha.h" |
| 8 | #include "ext/standard/base64.h" | 8 | #include "ext/standard/base64.h" |
| 9 | 9 | ||
| 10 | void hook_session(); | 10 | void hook_session(void); |
diff --git a/src/sp_sloppy.c b/src/sp_sloppy.c index 88052bb..f9ed718 100644 --- a/src/sp_sloppy.c +++ b/src/sp_sloppy.c | |||
| @@ -3,8 +3,8 @@ | |||
| 3 | ZEND_API zend_op_array* (*orig_zend_compile_file)(zend_file_handle* file_handle, | 3 | ZEND_API zend_op_array* (*orig_zend_compile_file)(zend_file_handle* file_handle, |
| 4 | int type) = NULL; | 4 | int type) = NULL; |
| 5 | #if PHP_VERSION_ID >= 80000 | 5 | #if PHP_VERSION_ID >= 80000 |
| 6 | ZEND_API zend_op_array* (*orig_zend_compile_string)(zval* source_string, | 6 | ZEND_API zend_op_array* (*orig_zend_compile_string)( |
| 7 | const char* filename) = NULL; | 7 | zend_string* source_string, const char* filename) = NULL; |
| 8 | #else | 8 | #else |
| 9 | ZEND_API zend_op_array* (*orig_zend_compile_string)(zval* source_string, | 9 | ZEND_API zend_op_array* (*orig_zend_compile_string)(zval* source_string, |
| 10 | char* filename) = NULL; | 10 | char* filename) = NULL; |
| @@ -25,7 +25,12 @@ static void modify_opcode(zend_op_array* opline) { | |||
| 25 | } | 25 | } |
| 26 | } | 26 | } |
| 27 | 27 | ||
| 28 | #if PHP_VERSION_ID >= 80000 | ||
| 29 | ZEND_API zend_op_array* sp_compile_string(zend_string* source_string, | ||
| 30 | const char* filename) { | ||
| 31 | #else | ||
| 28 | ZEND_API zend_op_array* sp_compile_string(zval* source_string, char* filename) { | 32 | ZEND_API zend_op_array* sp_compile_string(zval* source_string, char* filename) { |
| 33 | #endif | ||
| 29 | zend_op_array* opline = orig_zend_compile_string(source_string, filename); | 34 | zend_op_array* opline = orig_zend_compile_string(source_string, filename); |
| 30 | modify_opcode(opline); | 35 | modify_opcode(opline); |
| 31 | return opline; | 36 | return opline; |
diff --git a/src/sp_sloppy.h b/src/sp_sloppy.h index c01b77c..cd9f304 100644 --- a/src/sp_sloppy.h +++ b/src/sp_sloppy.h | |||
| @@ -3,6 +3,6 @@ | |||
| 3 | #include "php_snuffleupagus.h" | 3 | #include "php_snuffleupagus.h" |
| 4 | #include "zend_vm.h" | 4 | #include "zend_vm.h" |
| 5 | 5 | ||
| 6 | void hook_sloppy(); | 6 | void hook_sloppy(void); |
| 7 | 7 | ||
| 8 | #endif | 8 | #endif |
diff --git a/src/sp_tree.h b/src/sp_tree.h index d29d095..2659d56 100644 --- a/src/sp_tree.h +++ b/src/sp_tree.h | |||
| @@ -21,7 +21,7 @@ typedef struct parser_s { | |||
| 21 | struct parser_s *next; | 21 | struct parser_s *next; |
| 22 | } sp_tree; | 22 | } sp_tree; |
| 23 | 23 | ||
| 24 | sp_tree *sp_tree_new(); | 24 | sp_tree *sp_tree_new(void); |
| 25 | void sp_tree_free(sp_tree *); | 25 | void sp_tree_free(sp_tree *); |
| 26 | 26 | ||
| 27 | #endif | 27 | #endif |
diff --git a/src/sp_unserialize.c b/src/sp_unserialize.c index f265ce6..8977dd9 100644 --- a/src/sp_unserialize.c +++ b/src/sp_unserialize.c | |||
| @@ -1,6 +1,5 @@ | |||
| 1 | #include "php_snuffleupagus.h" | 1 | #include "php_snuffleupagus.h" |
| 2 | 2 | ||
| 3 | |||
| 4 | PHP_FUNCTION(sp_serialize) { | 3 | PHP_FUNCTION(sp_serialize) { |
| 5 | zif_handler orig_handler; | 4 | zif_handler orig_handler; |
| 6 | 5 | ||
| @@ -62,8 +61,7 @@ PHP_FUNCTION(sp_unserialize) { | |||
| 62 | 61 | ||
| 63 | /* 64 is the length of HMAC-256 */ | 62 | /* 64 is the length of HMAC-256 */ |
| 64 | if (buf_len < 64) { | 63 | if (buf_len < 64) { |
| 65 | sp_log_msg("unserialize", SP_LOG_DROP, | 64 | sp_log_drop("unserialize", "The serialized object is too small."); |
| 66 | "The serialized object is too small."); | ||
| 67 | } | 65 | } |
| 68 | 66 | ||
| 69 | hmac = buf + buf_len - 64; | 67 | hmac = buf + buf_len - 64; |
| @@ -100,16 +98,14 @@ PHP_FUNCTION(sp_unserialize) { | |||
| 100 | SP_TOKEN_UNSERIALIZE_HMAC); | 98 | SP_TOKEN_UNSERIALIZE_HMAC); |
| 101 | } | 99 | } |
| 102 | if (true == config_unserialize->simulation) { | 100 | if (true == config_unserialize->simulation) { |
| 103 | sp_log_msg("unserialize", SP_LOG_SIMULATION, "Invalid HMAC for %s", | 101 | sp_log_simulation("unserialize", "Invalid HMAC for %s", serialized_str); |
| 104 | serialized_str); | ||
| 105 | if ((orig_handler = zend_hash_str_find_ptr( | 102 | if ((orig_handler = zend_hash_str_find_ptr( |
| 106 | SNUFFLEUPAGUS_G(sp_internal_functions_hook), "unserialize", | 103 | SNUFFLEUPAGUS_G(sp_internal_functions_hook), "unserialize", |
| 107 | sizeof("unserialize") - 1))) { | 104 | sizeof("unserialize") - 1))) { |
| 108 | orig_handler(INTERNAL_FUNCTION_PARAM_PASSTHRU); | 105 | orig_handler(INTERNAL_FUNCTION_PARAM_PASSTHRU); |
| 109 | } | 106 | } |
| 110 | } else { | 107 | } else { |
| 111 | sp_log_msg("unserialize", SP_LOG_DROP, "Invalid HMAC for %s", | 108 | sp_log_drop("unserialize", "Invalid HMAC for %s", serialized_str); |
| 112 | serialized_str); | ||
| 113 | } | 109 | } |
| 114 | } | 110 | } |
| 115 | efree(serialized_str); | 111 | efree(serialized_str); |
diff --git a/src/sp_upload_validation.c b/src/sp_upload_validation.c index 54b0481..f3ae311 100644 --- a/src/sp_upload_validation.c +++ b/src/sp_upload_validation.c | |||
| @@ -13,10 +13,11 @@ int sp_rfc1867_callback(unsigned int event, void *event_data, void **extra); | |||
| 13 | 13 | ||
| 14 | int sp_rfc1867_callback_win(unsigned int event, void *event_data, | 14 | int sp_rfc1867_callback_win(unsigned int event, void *event_data, |
| 15 | void **extra) { | 15 | void **extra) { |
| 16 | sp_log_msg("upload_validation", SP_LOG_SIMULATION, | 16 | sp_log_simulation( |
| 17 | "The upload validation doesn't work for now on Windows yet, " | 17 | "upload_validation", |
| 18 | "see https://github.com/jvoisin/snuffleupagus/issues/248 for " | 18 | "The upload validation doesn't work for now on Windows yet, " |
| 19 | "details."); | 19 | "see https://github.com/jvoisin/snuffleupagus/issues/248 for " |
| 20 | "details."); | ||
| 20 | return SUCCESS; | 21 | return SUCCESS; |
| 21 | } | 22 | } |
| 22 | 23 | ||
| @@ -90,9 +91,9 @@ int sp_rfc1867_callback(unsigned int event, void *event_data, void **extra) { | |||
| 90 | if (WEXITSTATUS(waitstatus) != 0) { // Nope | 91 | if (WEXITSTATUS(waitstatus) != 0) { // Nope |
| 91 | char *uri = getenv("REQUEST_URI"); | 92 | char *uri = getenv("REQUEST_URI"); |
| 92 | int sim = config_upload->simulation; | 93 | int sim = config_upload->simulation; |
| 93 | sp_log_msg("upload_validation", sim ? SP_LOG_SIMULATION : SP_LOG_DROP, | 94 | sp_log_auto("upload_validation", sim, |
| 94 | "The upload of %s on %s was rejected.", filename, | 95 | "The upload of %s on %s was rejected.", filename, |
| 95 | uri ? uri : "?"); | 96 | uri ? uri : "?"); |
| 96 | } | 97 | } |
| 97 | } | 98 | } |
| 98 | ZEND_HASH_FOREACH_END(); | 99 | ZEND_HASH_FOREACH_END(); |
diff --git a/src/sp_upload_validation.h b/src/sp_upload_validation.h index 53790fd..1b239a0 100644 --- a/src/sp_upload_validation.h +++ b/src/sp_upload_validation.h | |||
| @@ -1,6 +1,6 @@ | |||
| 1 | #ifndef __SP_UPLOAD_VALIDATION_H__ | 1 | #ifndef __SP_UPLOAD_VALIDATION_H__ |
| 2 | #define __SP_UPLOAD_VALIDATION_H__ | 2 | #define __SP_UPLOAD_VALIDATION_H__ |
| 3 | 3 | ||
| 4 | void hook_upload(); | 4 | void hook_upload(void); |
| 5 | 5 | ||
| 6 | #endif | 6 | #endif |
diff --git a/src/sp_utils.c b/src/sp_utils.c index 0f87f17..a7a3d27 100644 --- a/src/sp_utils.c +++ b/src/sp_utils.c | |||
| @@ -7,7 +7,41 @@ bool sp_zend_string_equals(const zend_string* s1, const zend_string* s2) { | |||
| 7 | !memcmp(ZSTR_VAL(s1), ZSTR_VAL(s2), ZSTR_LEN(s1)); | 7 | !memcmp(ZSTR_VAL(s1), ZSTR_VAL(s2), ZSTR_LEN(s1)); |
| 8 | } | 8 | } |
| 9 | 9 | ||
| 10 | void sp_log_msg(char const* feature, int type, const char* fmt, ...) { | 10 | static const char* default_ipaddr = "0.0.0.0"; |
| 11 | const char* get_ipaddr() { | ||
| 12 | const char* client_ip = getenv("REMOTE_ADDR"); | ||
| 13 | if (client_ip) { | ||
| 14 | return client_ip; | ||
| 15 | } | ||
| 16 | |||
| 17 | const char* fwd_ip = getenv("HTTP_X_FORWARDED_FOR"); | ||
| 18 | if (fwd_ip) { | ||
| 19 | return fwd_ip; | ||
| 20 | } | ||
| 21 | |||
| 22 | /* Some hosters (like heroku, see | ||
| 23 | * https://github.com/jvoisin/snuffleupagus/issues/336) are clearing the | ||
| 24 | * environment variables, so we don't have access to them, hence why we're | ||
| 25 | * resorting to $_SERVER['REMOTE_ADDR']. | ||
| 26 | */ | ||
| 27 | if (!Z_ISUNDEF(PG(http_globals)[TRACK_VARS_SERVER])) { | ||
| 28 | const zval* const globals_client_ip = | ||
| 29 | zend_hash_str_find(Z_ARRVAL(PG(http_globals)[TRACK_VARS_SERVER]), | ||
| 30 | "REMOTE_ADDR", sizeof("REMOTE_ADDR") - 1); | ||
| 31 | if (globals_client_ip) { | ||
| 32 | if (Z_TYPE_P(globals_client_ip) == IS_STRING) { | ||
| 33 | if (Z_STRLEN_P(globals_client_ip) != 0) { | ||
| 34 | return estrdup(Z_STRVAL_P(globals_client_ip)); | ||
| 35 | } | ||
| 36 | } | ||
| 37 | } | ||
| 38 | } | ||
| 39 | |||
| 40 | return default_ipaddr; | ||
| 41 | } | ||
| 42 | |||
| 43 | void sp_log_msgf(char const* restrict feature, int level, int type, | ||
| 44 | const char* restrict fmt, ...) { | ||
| 11 | char* msg; | 45 | char* msg; |
| 12 | va_list args; | 46 | va_list args; |
| 13 | 47 | ||
| @@ -15,31 +49,45 @@ void sp_log_msg(char const* feature, int type, const char* fmt, ...) { | |||
| 15 | vspprintf(&msg, 0, fmt, args); | 49 | vspprintf(&msg, 0, fmt, args); |
| 16 | va_end(args); | 50 | va_end(args); |
| 17 | 51 | ||
| 18 | const char *client_ip = getenv("REMOTE_ADDR"); | 52 | const char* client_ip = get_ipaddr(); |
| 19 | if (!client_ip) { | 53 | const char* logtype = NULL; |
| 20 | client_ip = "0.0.0.0"; | 54 | switch (type) { |
| 55 | case SP_TYPE_SIMULATION: | ||
| 56 | logtype = "simulation"; | ||
| 57 | break; | ||
| 58 | case SP_TYPE_DROP: | ||
| 59 | logtype = "drop"; | ||
| 60 | break; | ||
| 61 | case SP_TYPE_LOG: | ||
| 62 | default: | ||
| 63 | logtype = "log"; | ||
| 64 | break; | ||
| 21 | } | 65 | } |
| 66 | |||
| 22 | switch (SNUFFLEUPAGUS_G(config).log_media) { | 67 | switch (SNUFFLEUPAGUS_G(config).log_media) { |
| 23 | case SP_SYSLOG: | 68 | case SP_SYSLOG: { |
| 24 | openlog(PHP_SNUFFLEUPAGUS_EXTNAME, LOG_PID, LOG_AUTH); | ||
| 25 | const char* error_filename = zend_get_executed_filename(); | 69 | const char* error_filename = zend_get_executed_filename(); |
| 26 | int syslog_level = SP_LOG_DROP ? LOG_ERR : LOG_INFO; | 70 | int syslog_level = (level == E_ERROR) ? LOG_ERR : LOG_INFO; |
| 27 | int error_lineno = zend_get_executed_lineno(TSRMLS_C); | 71 | int error_lineno = zend_get_executed_lineno(TSRMLS_C); |
| 28 | syslog(syslog_level, "[snuffleupagus][%s][%s] %s in %s on line %d", client_ip, feature, msg, | 72 | openlog(PHP_SNUFFLEUPAGUS_EXTNAME, LOG_PID, LOG_AUTH); |
| 29 | error_filename, error_lineno); | 73 | syslog(syslog_level, "[snuffleupagus][%s][%s][%s] %s in %s on line %d", |
| 74 | client_ip, feature, logtype, msg, error_filename, error_lineno); | ||
| 30 | closelog(); | 75 | closelog(); |
| 31 | if (type == SP_LOG_DROP) { | 76 | if (type == SP_TYPE_DROP) { |
| 32 | zend_bailout(); | 77 | zend_bailout(); |
| 33 | } | 78 | } |
| 34 | break; | 79 | break; |
| 80 | } | ||
| 35 | case SP_ZEND: | 81 | case SP_ZEND: |
| 36 | default: | 82 | default: |
| 37 | zend_error(type, "[snuffleupagus][%s][%s] %s", client_ip, feature, msg); | 83 | zend_error(level, "[snuffleupagus][%s][%s][%s] %s", client_ip, feature, |
| 84 | logtype, msg); | ||
| 38 | break; | 85 | break; |
| 39 | } | 86 | } |
| 40 | } | 87 | } |
| 41 | 88 | ||
| 42 | int compute_hash(const char* const filename, char* file_hash) { | 89 | int compute_hash(const char* const restrict filename, |
| 90 | char* restrict file_hash) { | ||
| 43 | unsigned char buf[1024]; | 91 | unsigned char buf[1024]; |
| 44 | unsigned char digest[SHA256_SIZE]; | 92 | unsigned char digest[SHA256_SIZE]; |
| 45 | PHP_SHA256_CTX context; | 93 | PHP_SHA256_CTX context; |
| @@ -65,8 +113,9 @@ int compute_hash(const char* const filename, char* file_hash) { | |||
| 65 | return SUCCESS; | 113 | return SUCCESS; |
| 66 | } | 114 | } |
| 67 | 115 | ||
| 68 | static int construct_filename(char* filename, const zend_string* folder, | 116 | static int construct_filename(char* filename, |
| 69 | const zend_string* textual) { | 117 | const zend_string* restrict folder, |
| 118 | const zend_string* restrict textual) { | ||
| 70 | PHP_SHA256_CTX context; | 119 | PHP_SHA256_CTX context; |
| 71 | unsigned char digest[SHA256_SIZE] = {0}; | 120 | unsigned char digest[SHA256_SIZE] = {0}; |
| 72 | char strhash[65] = {0}; | 121 | char strhash[65] = {0}; |
| @@ -78,7 +127,7 @@ static int construct_filename(char* filename, const zend_string* folder, | |||
| 78 | } | 127 | } |
| 79 | 128 | ||
| 80 | /* We're using the sha256 sum of the rule's textual representation | 129 | /* We're using the sha256 sum of the rule's textual representation |
| 81 | * as filename, in order to only have one dump per rule, to migitate | 130 | * as filename, in order to only have one dump per rule, to mitigate |
| 82 | * DoS attacks. */ | 131 | * DoS attacks. */ |
| 83 | PHP_SHA256Init(&context); | 132 | PHP_SHA256Init(&context); |
| 84 | PHP_SHA256Update(&context, (const unsigned char*)ZSTR_VAL(textual), | 133 | PHP_SHA256Update(&context, (const unsigned char*)ZSTR_VAL(textual), |
| @@ -90,14 +139,15 @@ static int construct_filename(char* filename, const zend_string* folder, | |||
| 90 | return 0; | 139 | return 0; |
| 91 | } | 140 | } |
| 92 | 141 | ||
| 93 | int sp_log_request(const zend_string* folder, const zend_string* text_repr, | 142 | int sp_log_request(const zend_string* restrict folder, |
| 94 | char* from) { | 143 | const zend_string* restrict text_repr, |
| 144 | char const* const from) { | ||
| 95 | FILE* file; | 145 | FILE* file; |
| 96 | const char* current_filename = zend_get_executed_filename(TSRMLS_C); | 146 | const char* current_filename = zend_get_executed_filename(TSRMLS_C); |
| 97 | const int current_line = zend_get_executed_lineno(TSRMLS_C); | 147 | const int current_line = zend_get_executed_lineno(TSRMLS_C); |
| 98 | char filename[PATH_MAX] = {0}; | 148 | char filename[PATH_MAX] = {0}; |
| 99 | const struct { | 149 | const struct { |
| 100 | const char* str; | 150 | char const* const str; |
| 101 | const int key; | 151 | const int key; |
| 102 | } zones[] = {{"GET", TRACK_VARS_GET}, {"POST", TRACK_VARS_POST}, | 152 | } zones[] = {{"GET", TRACK_VARS_GET}, {"POST", TRACK_VARS_POST}, |
| 103 | {"COOKIE", TRACK_VARS_COOKIE}, {"SERVER", TRACK_VARS_SERVER}, | 153 | {"COOKIE", TRACK_VARS_COOKIE}, {"SERVER", TRACK_VARS_SERVER}, |
| @@ -115,7 +165,22 @@ int sp_log_request(const zend_string* folder, const zend_string* text_repr, | |||
| 115 | fprintf(file, "RULE: sp%s%s\n", from, ZSTR_VAL(text_repr)); | 165 | fprintf(file, "RULE: sp%s%s\n", from, ZSTR_VAL(text_repr)); |
| 116 | 166 | ||
| 117 | fprintf(file, "FILE: %s:%d\n", current_filename, current_line); | 167 | fprintf(file, "FILE: %s:%d\n", current_filename, current_line); |
| 118 | for (size_t i = 0; i < (sizeof(zones) / sizeof(zones[0])) - 1; i++) { | 168 | |
| 169 | zend_execute_data* orig_execute_data = EG(current_execute_data); | ||
| 170 | zend_execute_data* current = EG(current_execute_data); | ||
| 171 | while (current) { | ||
| 172 | EG(current_execute_data) = current; | ||
| 173 | char* const complete_path_function = get_complete_function_path(current); | ||
| 174 | if (complete_path_function) { | ||
| 175 | const int current_line = zend_get_executed_lineno(TSRMLS_C); | ||
| 176 | fprintf(file, "STACKTRACE: %s:%d\n", complete_path_function, | ||
| 177 | current_line); | ||
| 178 | } | ||
| 179 | current = current->prev_execute_data; | ||
| 180 | } | ||
| 181 | EG(current_execute_data) = orig_execute_data; | ||
| 182 | |||
| 183 | for (size_t i = 0; zones[i].str; i++) { | ||
| 119 | zval* variable_value; | 184 | zval* variable_value; |
| 120 | zend_string* variable_key; | 185 | zend_string* variable_key; |
| 121 | 186 | ||
| @@ -232,26 +297,27 @@ void sp_log_disable(const char* restrict path, const char* restrict arg_name, | |||
| 232 | char_repr = zend_string_to_char(arg_value); | 297 | char_repr = zend_string_to_char(arg_value); |
| 233 | } | 298 | } |
| 234 | if (alias) { | 299 | if (alias) { |
| 235 | sp_log_msg("disabled_function", sim ? SP_LOG_SIMULATION : SP_LOG_DROP, | 300 | sp_log_auto( |
| 236 | "Aborted execution on call of the function '%s', " | 301 | "disabled_function", sim, |
| 237 | "because its argument '%s' content (%s) matched the rule '%s'", | 302 | "Aborted execution on call of the function '%s', " |
| 238 | path, arg_name, char_repr ? char_repr : "?", ZSTR_VAL(alias)); | 303 | "because its argument '%s' content (%s) matched the rule '%s'", |
| 304 | path, arg_name, char_repr ? char_repr : "?", ZSTR_VAL(alias)); | ||
| 239 | } else { | 305 | } else { |
| 240 | sp_log_msg("disabled_function", sim ? SP_LOG_SIMULATION : SP_LOG_DROP, | 306 | sp_log_auto("disabled_function", sim, |
| 241 | "Aborted execution on call of the function '%s', " | 307 | "Aborted execution on call of the function '%s', " |
| 242 | "because its argument '%s' content (%s) matched a rule", | 308 | "because its argument '%s' content (%s) matched a rule", |
| 243 | path, arg_name, char_repr ? char_repr : "?"); | 309 | path, arg_name, char_repr ? char_repr : "?"); |
| 244 | } | 310 | } |
| 245 | efree(char_repr); | 311 | efree(char_repr); |
| 246 | } else { | 312 | } else { |
| 247 | if (alias) { | 313 | if (alias) { |
| 248 | sp_log_msg("disabled_function", sim ? SP_LOG_SIMULATION : SP_LOG_DROP, | 314 | sp_log_auto("disabled_function", sim, |
| 249 | "Aborted execution on call of the function '%s', " | 315 | "Aborted execution on call of the function '%s', " |
| 250 | "because of the the rule '%s'", | 316 | "because of the the rule '%s'", |
| 251 | path, ZSTR_VAL(alias)); | 317 | path, ZSTR_VAL(alias)); |
| 252 | } else { | 318 | } else { |
| 253 | sp_log_msg("disabled_function", sim ? SP_LOG_SIMULATION : SP_LOG_DROP, | 319 | sp_log_auto("disabled_function", sim, |
| 254 | "Aborted execution on call of the function '%s'", path); | 320 | "Aborted execution on call of the function '%s'", path); |
| 255 | } | 321 | } |
| 256 | } | 322 | } |
| 257 | } | 323 | } |
| @@ -272,16 +338,16 @@ void sp_log_disable_ret(const char* restrict path, | |||
| 272 | char_repr = zend_string_to_char(ret_value); | 338 | char_repr = zend_string_to_char(ret_value); |
| 273 | } | 339 | } |
| 274 | if (alias) { | 340 | if (alias) { |
| 275 | sp_log_msg( | 341 | sp_log_auto( |
| 276 | "disabled_function", sim ? SP_LOG_SIMULATION : SP_LOG_DROP, | 342 | "disabled_function", sim, |
| 277 | "Aborted execution on return of the function '%s', " | 343 | "Aborted execution on return of the function '%s', " |
| 278 | "because the function returned '%s', which matched the rule '%s'", | 344 | "because the function returned '%s', which matched the rule '%s'", |
| 279 | path, char_repr ? char_repr : "?", ZSTR_VAL(alias)); | 345 | path, char_repr ? char_repr : "?", ZSTR_VAL(alias)); |
| 280 | } else { | 346 | } else { |
| 281 | sp_log_msg("disabled_function", sim ? SP_LOG_SIMULATION : SP_LOG_DROP, | 347 | sp_log_auto("disabled_function", sim, |
| 282 | "Aborted execution on return of the function '%s', " | 348 | "Aborted execution on return of the function '%s', " |
| 283 | "because the function returned '%s', which matched a rule", | 349 | "because the function returned '%s', which matched a rule", |
| 284 | path, char_repr ? char_repr : "?"); | 350 | path, char_repr ? char_repr : "?"); |
| 285 | } | 351 | } |
| 286 | efree(char_repr); | 352 | efree(char_repr); |
| 287 | } | 353 | } |
| @@ -317,10 +383,8 @@ bool sp_match_array_value(const zval* arr, const zend_string* to_match, | |||
| 317 | 383 | ||
| 318 | ZEND_HASH_FOREACH_VAL(Z_ARRVAL_P(arr), value) { | 384 | ZEND_HASH_FOREACH_VAL(Z_ARRVAL_P(arr), value) { |
| 319 | if (Z_TYPE_P(value) != IS_ARRAY) { | 385 | if (Z_TYPE_P(value) != IS_ARRAY) { |
| 320 | const zend_string* value_str = sp_zval_to_zend_string(value); | 386 | if (sp_match_value(sp_zval_to_zend_string(value), to_match, rx)) { |
| 321 | if (sp_match_value(value_str, to_match, rx)) { | ||
| 322 | return true; | 387 | return true; |
| 323 | } else { | ||
| 324 | } | 388 | } |
| 325 | } else if (sp_match_array_value(value, to_match, rx)) { | 389 | } else if (sp_match_array_value(value, to_match, rx)) { |
| 326 | return true; | 390 | return true; |
| @@ -330,10 +394,10 @@ bool sp_match_array_value(const zval* arr, const zend_string* to_match, | |||
| 330 | return false; | 394 | return false; |
| 331 | } | 395 | } |
| 332 | 396 | ||
| 333 | int hook_function(const char* original_name, HashTable* hook_table, | 397 | bool hook_function(const char* original_name, HashTable* hook_table, |
| 334 | zif_handler new_function) { | 398 | zif_handler new_function) { |
| 335 | zend_internal_function* func; | 399 | zend_internal_function* func; |
| 336 | bool ret = FAILURE; | 400 | bool ret = false; |
| 337 | 401 | ||
| 338 | /* The `mb` module likes to hook functions, like strlen->mb_strlen, | 402 | /* The `mb` module likes to hook functions, like strlen->mb_strlen, |
| 339 | * so we have to hook both of them. */ | 403 | * so we have to hook both of them. */ |
| @@ -352,7 +416,7 @@ int hook_function(const char* original_name, HashTable* hook_table, | |||
| 352 | // LCOV_EXCL_STOP | 416 | // LCOV_EXCL_STOP |
| 353 | } | 417 | } |
| 354 | func->handler = new_function; | 418 | func->handler = new_function; |
| 355 | ret = SUCCESS; | 419 | ret = true; |
| 356 | } | 420 | } |
| 357 | } | 421 | } |
| 358 | 422 | ||
| @@ -406,7 +470,7 @@ bool check_is_in_eval_whitelist(const zend_string* const function_name) { | |||
| 406 | } | 470 | } |
| 407 | 471 | ||
| 408 | /* yes, we could use a HashTable instead, but since the list is pretty | 472 | /* yes, we could use a HashTable instead, but since the list is pretty |
| 409 | * small, it doesn't maka a difference in practise. */ | 473 | * small, it doesn't make a difference in practise. */ |
| 410 | while (it && it->data) { | 474 | while (it && it->data) { |
| 411 | if (sp_zend_string_equals(function_name, (const zend_string*)(it->data))) { | 475 | if (sp_zend_string_equals(function_name, (const zend_string*)(it->data))) { |
| 412 | /* We've got a match, the function is whiteslited. */ | 476 | /* We've got a match, the function is whiteslited. */ |
diff --git a/src/sp_utils.h b/src/sp_utils.h index 9df196c..d2b88fb 100644 --- a/src/sp_utils.h +++ b/src/sp_utils.h | |||
| @@ -28,24 +28,42 @@ | |||
| 28 | #define HOOK_FUNCTION_BY_REGEXP(regexp, hook_table, new_function) \ | 28 | #define HOOK_FUNCTION_BY_REGEXP(regexp, hook_table, new_function) \ |
| 29 | hook_regexp(regexp, SNUFFLEUPAGUS_G(hook_table), new_function) | 29 | hook_regexp(regexp, SNUFFLEUPAGUS_G(hook_table), new_function) |
| 30 | 30 | ||
| 31 | #define SP_LOG_SIMULATION E_WARNING | 31 | #define SP_TYPE_LOG (0) |
| 32 | #define SP_LOG_DROP E_ERROR | 32 | #define SP_TYPE_DROP (1) |
| 33 | #define SP_TYPE_SIMULATION (2) | ||
| 34 | |||
| 33 | #define SP_LOG_DEBUG E_NOTICE | 35 | #define SP_LOG_DEBUG E_NOTICE |
| 34 | #define SP_LOG_ERROR E_ERROR | 36 | #define SP_LOG_ERROR E_ERROR |
| 35 | #define SP_LOG_WARN E_WARNING | 37 | #define SP_LOG_WARN E_WARNING |
| 36 | 38 | ||
| 37 | #define sp_log_err(feature, ...) sp_log_msg(feature, SP_LOG_ERROR, __VA_ARGS__) | 39 | #define sp_log_msg(feature, level, ...) \ |
| 38 | #define sp_log_warn(feature, ...) sp_log_msg(feature, SP_LOG_WARN, __VA_ARGS__) | 40 | sp_log_msgf(feature, level, SP_TYPE_LOG, __VA_ARGS__) |
| 41 | #define sp_log_drop(feature, ...) \ | ||
| 42 | sp_log_msgf(feature, SP_LOG_ERROR, SP_TYPE_DROP, __VA_ARGS__) | ||
| 43 | #define sp_log_simulation(feature, ...) \ | ||
| 44 | sp_log_msgf(feature, SP_LOG_WARN, SP_TYPE_SIMULATION, __VA_ARGS__) | ||
| 45 | #define sp_log_auto(feature, is_simulation, ...) \ | ||
| 46 | sp_log_msgf(feature, (is_simulation ? SP_LOG_WARN : SP_LOG_ERROR), \ | ||
| 47 | (is_simulation ? SP_TYPE_SIMULATION : SP_TYPE_DROP), \ | ||
| 48 | __VA_ARGS__) | ||
| 49 | |||
| 50 | #define sp_log_err(feature, ...) \ | ||
| 51 | sp_log_msgf(feature, SP_LOG_ERROR, SP_TYPE_LOG, __VA_ARGS__) | ||
| 52 | #define sp_log_warn(feature, ...) \ | ||
| 53 | sp_log_msgf(feature, SP_LOG_WARN, SP_TYPE_LOG, __VA_ARGS__) | ||
| 39 | #ifdef SP_DEBUG | 54 | #ifdef SP_DEBUG |
| 40 | #define sp_log_debug(fmt, ...) sp_log_msg("DEBUG", SP_LOG_DEBUG, "%s(): " fmt, __FUNCTION__, ##__VA_ARGS__) | 55 | #define sp_log_debug(...) \ |
| 56 | sp_log_msgf("DEBUG", SP_LOG_DEBUG, SP_TYPE_LOG, "%s(): " fmt, __FUNCTION__, ##__VA_ARGS__) | ||
| 41 | #else | 57 | #else |
| 42 | #define sp_log_debug(...) | 58 | #define sp_log_debug(...) |
| 43 | #endif | 59 | #endif |
| 44 | 60 | ||
| 45 | #define GET_SUFFIX(x) (x == 1) ? "st" : ((x == 2) ? "nd" : "th") | 61 | #define GET_SUFFIX(x) (x == 1) ? "st" : ((x == 2) ? "nd" : "th") |
| 46 | 62 | ||
| 47 | void sp_log_msg(char const *feature, int type, const char *fmt, ...); | 63 | const char *get_ipaddr(void); |
| 48 | int compute_hash(const char *const filename, char *file_hash); | 64 | void sp_log_msgf(char const *restrict feature, int level, int type, |
| 65 | const char *restrict fmt, ...); | ||
| 66 | int compute_hash(const char *const restrict filename, char *restrict file_hash); | ||
| 49 | const zend_string *sp_zval_to_zend_string(const zval *); | 67 | const zend_string *sp_zval_to_zend_string(const zval *); |
| 50 | bool sp_match_value(const zend_string *, const zend_string *, const sp_pcre *); | 68 | bool sp_match_value(const zend_string *, const zend_string *, const sp_pcre *); |
| 51 | bool sp_match_array_key(const zval *, const zend_string *, const sp_pcre *); | 69 | bool sp_match_array_key(const zval *, const zend_string *, const sp_pcre *); |
| @@ -54,11 +72,12 @@ void sp_log_disable(const char *restrict, const char *restrict, | |||
| 54 | const zend_string *restrict, const sp_disabled_function *); | 72 | const zend_string *restrict, const sp_disabled_function *); |
| 55 | void sp_log_disable_ret(const char *restrict, const zend_string *restrict, | 73 | void sp_log_disable_ret(const char *restrict, const zend_string *restrict, |
| 56 | const sp_disabled_function *); | 74 | const sp_disabled_function *); |
| 57 | int hook_function(const char *, HashTable *, zif_handler); | 75 | bool hook_function(const char *, HashTable *, zif_handler); |
| 58 | int hook_regexp(const sp_pcre *, HashTable *, zif_handler); | 76 | int hook_regexp(const sp_pcre *, HashTable *, zif_handler); |
| 59 | bool check_is_in_eval_whitelist(const zend_string *const function_name); | 77 | bool check_is_in_eval_whitelist(const zend_string *const function_name); |
| 60 | int sp_log_request(const zend_string *folder, const zend_string *text_repr, | 78 | int sp_log_request(const zend_string *restrict folder, |
| 61 | char *from); | 79 | const zend_string *restrict text_repr, |
| 80 | char const *const from); | ||
| 62 | bool sp_zend_string_equals(const zend_string *s1, const zend_string *s2); | 81 | bool sp_zend_string_equals(const zend_string *s1, const zend_string *s2); |
| 63 | 82 | ||
| 64 | #endif /* SP_UTILS_H */ | 83 | #endif /* SP_UTILS_H */ |
diff --git a/src/sp_var_parser.c b/src/sp_var_parser.c index 72cbc12..b066b84 100644 --- a/src/sp_var_parser.c +++ b/src/sp_var_parser.c | |||
| @@ -85,7 +85,8 @@ static int create_var(sp_tree *tree, const char *restrict value, | |||
| 85 | return 0; | 85 | return 0; |
| 86 | } | 86 | } |
| 87 | 87 | ||
| 88 | int cmp_tokens(sp_list_node *list1, sp_list_node *list2) { | 88 | int cmp_tokens(sp_list_node const *const list1, |
| 89 | sp_list_node const *const list2) { | ||
| 89 | return (((sp_conf_token *)list1->data)->pos - | 90 | return (((sp_conf_token *)list1->data)->pos - |
| 90 | ((sp_conf_token *)list2->data)->pos); | 91 | ((sp_conf_token *)list2->data)->pos); |
| 91 | } | 92 | } |
| @@ -123,7 +124,7 @@ static int is_token_valid(sp_list_node *tokens_list, elem_type quote, | |||
| 123 | } | 124 | } |
| 124 | break; | 125 | break; |
| 125 | case ARRAY_END: | 126 | case ARRAY_END: |
| 126 | if (!quote) { | 127 | if (UNDEFINED == quote) { |
| 127 | if (array_count < 1) { | 128 | if (array_count < 1) { |
| 128 | return -1; | 129 | return -1; |
| 129 | } else if (token_next) { | 130 | } else if (token_next) { |
| @@ -137,7 +138,8 @@ static int is_token_valid(sp_list_node *tokens_list, elem_type quote, | |||
| 137 | } | 138 | } |
| 138 | break; | 139 | break; |
| 139 | case OBJECT: | 140 | case OBJECT: |
| 140 | if (!quote && -1 == is_next_token_empty(token, token_next, str)) { | 141 | if (UNDEFINED == quote && |
| 142 | -1 == is_next_token_empty(token, token_next, str)) { | ||
| 141 | return -1; | 143 | return -1; |
| 142 | } | 144 | } |
| 143 | if (pos == 0 && *str != VARIABLE_TOKEN) { | 145 | if (pos == 0 && *str != VARIABLE_TOKEN) { |
| @@ -145,7 +147,8 @@ static int is_token_valid(sp_list_node *tokens_list, elem_type quote, | |||
| 145 | } | 147 | } |
| 146 | break; | 148 | break; |
| 147 | case CLASS: | 149 | case CLASS: |
| 148 | if (!quote && -1 == is_next_token_empty(token, token_next, str)) { | 150 | if (UNDEFINED == quote && |
| 151 | -1 == is_next_token_empty(token, token_next, str)) { | ||
| 149 | return -1; | 152 | return -1; |
| 150 | } | 153 | } |
| 151 | break; | 154 | break; |
| @@ -159,7 +162,7 @@ static sp_tree *parse_tokens(const char *restrict str, | |||
| 159 | sp_list_node *tokens_list) { | 162 | sp_list_node *tokens_list) { |
| 160 | size_t pos = 0; | 163 | size_t pos = 0; |
| 161 | int array_count = 0, pos_idx_start = -1; | 164 | int array_count = 0, pos_idx_start = -1; |
| 162 | elem_type quote = 0; | 165 | elem_type quote = UNDEFINED; |
| 163 | sp_tree *tree = sp_tree_new(); | 166 | sp_tree *tree = sp_tree_new(); |
| 164 | 167 | ||
| 165 | for (; tokens_list && tokens_list->data; tokens_list = tokens_list->next) { | 168 | for (; tokens_list && tokens_list->data; tokens_list = tokens_list->next) { |
| @@ -172,11 +175,15 @@ static sp_tree *parse_tokens(const char *restrict str, | |||
| 172 | goto error; | 175 | goto error; |
| 173 | } | 176 | } |
| 174 | if (token->type == INTERPRETED_STRING || token->type == LITERAL_STRING) { | 177 | if (token->type == INTERPRETED_STRING || token->type == LITERAL_STRING) { |
| 175 | pos = (!quote && !array_count) ? pos + strlen(token->text_repr) : pos; | 178 | pos = (UNDEFINED == quote && !array_count) |
| 176 | quote = (!quote) ? token->type : (quote == token->type) ? 0 : quote; | 179 | ? pos + strlen(token->text_repr) |
| 180 | : pos; | ||
| 181 | quote = (UNDEFINED == quote) ? token->type | ||
| 182 | : (quote == token->type) ? 0 | ||
| 183 | : quote; | ||
| 177 | token->type = INTERPRETED_STRING; | 184 | token->type = INTERPRETED_STRING; |
| 178 | } | 185 | } |
| 179 | if (quote == 0) { | 186 | if (UNDEFINED == quote) { |
| 180 | if (token->type == ARRAY) { | 187 | if (token->type == ARRAY) { |
| 181 | pos_idx_start = (array_count) | 188 | pos_idx_start = (array_count) |
| 182 | ? pos_idx_start | 189 | ? pos_idx_start |
| @@ -209,7 +216,7 @@ static sp_tree *parse_tokens(const char *restrict str, | |||
| 209 | sp_log_err("config", "You forgot to close a bracket."); | 216 | sp_log_err("config", "You forgot to close a bracket."); |
| 210 | goto error; | 217 | goto error; |
| 211 | } | 218 | } |
| 212 | if (quote != 0) { | 219 | if (quote != UNDEFINED) { |
| 213 | sp_log_err("config", "Missing a closing quote."); | 220 | sp_log_err("config", "Missing a closing quote."); |
| 214 | error: | 221 | error: |
| 215 | sp_tree_free(tree); | 222 | sp_tree_free(tree); |
diff --git a/src/sp_var_value.c b/src/sp_var_value.c index 7f08c46..b9ac357 100644 --- a/src/sp_var_value.c +++ b/src/sp_var_value.c | |||
| @@ -50,8 +50,7 @@ static zval *get_local_var(zend_execute_data *ed, const char *var_name) { | |||
| 50 | 50 | ||
| 51 | static zval *get_constant(const char *value) { | 51 | static zval *get_constant(const char *value) { |
| 52 | zend_string *name = zend_string_init(value, strlen(value), 0); | 52 | zend_string *name = zend_string_init(value, strlen(value), 0); |
| 53 | zval *zvalue = zend_get_constant_ex(name, NULL, 0); | 53 | zval *zvalue = zend_get_constant_ex(name, NULL, ZEND_FETCH_CLASS_SILENT); |
| 54 | |||
| 55 | zend_string_release(name); | 54 | zend_string_release(name); |
| 56 | return zvalue; | 55 | return zvalue; |
| 57 | } | 56 | } |
| @@ -71,12 +70,19 @@ static zval *get_var_value(zend_execute_data *ed, const char *var_name, | |||
| 71 | if (is_param) { | 70 | if (is_param) { |
| 72 | zval *zvalue = get_param_var(ed, var_name); | 71 | zval *zvalue = get_param_var(ed, var_name); |
| 73 | if (!zvalue) { | 72 | if (!zvalue) { |
| 74 | return get_local_var(ed, var_name); | 73 | char *complete_function_path = get_complete_function_path(ed); |
| 74 | sp_log_warn("config", | ||
| 75 | "It seems that you are filtering on a parameter " | ||
| 76 | "'%s' of the function '%s', but the parameter does " | ||
| 77 | "not exists.", | ||
| 78 | var_name, complete_function_path); | ||
| 79 | efree(complete_function_path); | ||
| 80 | return NULL; | ||
| 75 | } | 81 | } |
| 76 | return zvalue; | 82 | return zvalue; |
| 83 | } else { | ||
| 84 | return get_local_var(ed, var_name); | ||
| 77 | } | 85 | } |
| 78 | |||
| 79 | return get_local_var(ed, var_name); | ||
| 80 | } | 86 | } |
| 81 | 87 | ||
| 82 | static void *get_entry_hashtable(const HashTable *ht, const char *entry, | 88 | static void *get_entry_hashtable(const HashTable *ht, const char *entry, |
diff --git a/src/sp_wrapper.h b/src/sp_wrapper.h index f57513a..c4b17e0 100644 --- a/src/sp_wrapper.h +++ b/src/sp_wrapper.h | |||
| @@ -2,7 +2,7 @@ | |||
| 2 | #define SP_WRAPPER_H | 2 | #define SP_WRAPPER_H |
| 3 | #include "php_snuffleupagus.h" | 3 | #include "php_snuffleupagus.h" |
| 4 | 4 | ||
| 5 | void sp_disable_wrapper(); | 5 | void sp_disable_wrapper(void); |
| 6 | int hook_stream_wrappers(); | 6 | int hook_stream_wrappers(void); |
| 7 | 7 | ||
| 8 | #endif | 8 | #endif |
diff --git a/src/tests/broken_configuration/broken_conf.phpt b/src/tests/broken_configuration/broken_conf.phpt index ab79394..477ee64 100644 --- a/src/tests/broken_configuration/broken_conf.phpt +++ b/src/tests/broken_configuration/broken_conf.phpt | |||
| @@ -2,13 +2,14 @@ | |||
| 2 | Broken configuration | 2 | Broken configuration |
| 3 | --SKIPIF-- | 3 | --SKIPIF-- |
| 4 | <?php if (!extension_loaded("snuffleupagus")) print "skip"; ?> | 4 | <?php if (!extension_loaded("snuffleupagus")) print "skip"; ?> |
| 5 | <?php if (PHP_VERSION_ID >= 80000) print "skip"; ?> | ||
| 5 | --INI-- | 6 | --INI-- |
| 6 | sp.configuration_file={PWD}/config/broken_conf.ini | 7 | sp.configuration_file={PWD}/config/broken_conf.ini |
| 7 | --FILE-- | 8 | --FILE-- |
| 8 | --EXPECT-- | 9 | --EXPECT-- |
| 9 | PHP Fatal error: [snuffleupagus][0.0.0.0][config] Invalid configuration prefix for 'this is a broken line' on line 1 in Unknown on line 0 | 10 | PHP Fatal error: [snuffleupagus][0.0.0.0][config][log] Invalid configuration prefix for 'this is a broken line' on line 1 in Unknown on line 0 |
| 10 | 11 | ||
| 11 | Fatal error: [snuffleupagus][0.0.0.0][config] Invalid configuration prefix for 'this is a broken line' on line 1 in Unknown on line 0 | 12 | Fatal error: [snuffleupagus][0.0.0.0][config][log] Invalid configuration prefix for 'this is a broken line' on line 1 in Unknown on line 0 |
| 12 | 13 | ||
| 13 | Fatal error: [snuffleupagus][0.0.0.0][config] Invalid configuration file in Unknown on line 0 | 14 | Fatal error: [snuffleupagus][0.0.0.0][config][log] Invalid configuration file in Unknown on line 0 |
| 14 | Could not startup. \ No newline at end of file | 15 | Could not startup. |
diff --git a/src/tests/broken_configuration/broken_conf2.phpt b/src/tests/broken_configuration/broken_conf2.phpt index 919cd7b..4e67b9f 100644 --- a/src/tests/broken_configuration/broken_conf2.phpt +++ b/src/tests/broken_configuration/broken_conf2.phpt | |||
| @@ -2,13 +2,14 @@ | |||
| 2 | Broken configuration | 2 | Broken configuration |
| 3 | --SKIPIF-- | 3 | --SKIPIF-- |
| 4 | <?php if (!extension_loaded("snuffleupagus")) print "skip"; ?> | 4 | <?php if (!extension_loaded("snuffleupagus")) print "skip"; ?> |
| 5 | <?php if (PHP_VERSION_ID >= 80000) print "skip"; ?> | ||
| 5 | --INI-- | 6 | --INI-- |
| 6 | sp.configuration_file={PWD}/config/broken_conf2.ini | 7 | sp.configuration_file={PWD}/config/broken_conf2.ini |
| 7 | --FILE-- | 8 | --FILE-- |
| 8 | --EXPECT-- | 9 | --EXPECT-- |
| 9 | PHP Fatal error: [snuffleupagus][0.0.0.0][config] Invalid configuration section 'sp.wrong' on line 1 in Unknown on line 0 | 10 | PHP Fatal error: [snuffleupagus][0.0.0.0][config][log] Invalid configuration section 'sp.wrong' on line 1 in Unknown on line 0 |
| 10 | 11 | ||
| 11 | Fatal error: [snuffleupagus][0.0.0.0][config] Invalid configuration section 'sp.wrong' on line 1 in Unknown on line 0 | 12 | Fatal error: [snuffleupagus][0.0.0.0][config][log] Invalid configuration section 'sp.wrong' on line 1 in Unknown on line 0 |
| 12 | 13 | ||
| 13 | Fatal error: [snuffleupagus][0.0.0.0][config] Invalid configuration file in Unknown on line 0 | 14 | Fatal error: [snuffleupagus][0.0.0.0][config][log] Invalid configuration file in Unknown on line 0 |
| 14 | Could not startup. \ No newline at end of file | 15 | Could not startup. |
diff --git a/src/tests/broken_configuration/broken_conf_allow_broken_disabled.phpt b/src/tests/broken_configuration/broken_conf_allow_broken_disabled.phpt index 9cc45bf..e2ffab0 100644 --- a/src/tests/broken_configuration/broken_conf_allow_broken_disabled.phpt +++ b/src/tests/broken_configuration/broken_conf_allow_broken_disabled.phpt | |||
| @@ -2,6 +2,7 @@ | |||
| 2 | Broken configuration with allow broken turned off | 2 | Broken configuration with allow broken turned off |
| 3 | --SKIPIF-- | 3 | --SKIPIF-- |
| 4 | <?php if (!extension_loaded("snuffleupagus")) print "skip"; ?> | 4 | <?php if (!extension_loaded("snuffleupagus")) print "skip"; ?> |
| 5 | <?php if (PHP_VERSION_ID >= 80000) print "skip"; ?> | ||
| 5 | --INI-- | 6 | --INI-- |
| 6 | sp.configuration_file={PWD}/config/broken_conf.ini | 7 | sp.configuration_file={PWD}/config/broken_conf.ini |
| 7 | sp.allow_broken_configuration=Off | 8 | sp.allow_broken_configuration=Off |
| @@ -10,9 +11,9 @@ sp.allow_broken_configuration=Off | |||
| 10 | echo 1337; | 11 | echo 1337; |
| 11 | ?> | 12 | ?> |
| 12 | --EXPECT-- | 13 | --EXPECT-- |
| 13 | PHP Fatal error: [snuffleupagus][0.0.0.0][config] Invalid configuration prefix for 'this is a broken line' on line 1 in Unknown on line 0 | 14 | PHP Fatal error: [snuffleupagus][0.0.0.0][config][log] Invalid configuration prefix for 'this is a broken line' on line 1 in Unknown on line 0 |
| 14 | 15 | ||
| 15 | Fatal error: [snuffleupagus][0.0.0.0][config] Invalid configuration prefix for 'this is a broken line' on line 1 in Unknown on line 0 | 16 | Fatal error: [snuffleupagus][0.0.0.0][config][log] Invalid configuration prefix for 'this is a broken line' on line 1 in Unknown on line 0 |
| 16 | 17 | ||
| 17 | Fatal error: [snuffleupagus][0.0.0.0][config] Invalid configuration file in Unknown on line 0 | 18 | Fatal error: [snuffleupagus][0.0.0.0][config][log] Invalid configuration file in Unknown on line 0 |
| 18 | Could not startup. | 19 | Could not startup. |
diff --git a/src/tests/broken_configuration/broken_conf_allow_broken_enabled.phpt b/src/tests/broken_configuration/broken_conf_allow_broken_enabled.phpt index 614032a..68938fe 100644 --- a/src/tests/broken_configuration/broken_conf_allow_broken_enabled.phpt +++ b/src/tests/broken_configuration/broken_conf_allow_broken_enabled.phpt | |||
| @@ -2,6 +2,7 @@ | |||
| 2 | Broken configuration with allow broken turned on | 2 | Broken configuration with allow broken turned on |
| 3 | --SKIPIF-- | 3 | --SKIPIF-- |
| 4 | <?php if (!extension_loaded("snuffleupagus")) print "skip"; ?> | 4 | <?php if (!extension_loaded("snuffleupagus")) print "skip"; ?> |
| 5 | <?php if (PHP_VERSION_ID >= 80000) print "skip"; ?> | ||
| 5 | --INI-- | 6 | --INI-- |
| 6 | sp.configuration_file={PWD}/config/broken_conf.ini | 7 | sp.configuration_file={PWD}/config/broken_conf.ini |
| 7 | sp.allow_broken_configuration=On | 8 | sp.allow_broken_configuration=On |
| @@ -10,7 +11,7 @@ sp.allow_broken_configuration=On | |||
| 10 | echo 1337; | 11 | echo 1337; |
| 11 | ?> | 12 | ?> |
| 12 | --EXPECT-- | 13 | --EXPECT-- |
| 13 | PHP Fatal error: [snuffleupagus][0.0.0.0][config] Invalid configuration prefix for 'this is a broken line' on line 1 in Unknown on line 0 | 14 | PHP Fatal error: [snuffleupagus][0.0.0.0][config][log] Invalid configuration prefix for 'this is a broken line' on line 1 in Unknown on line 0 |
| 14 | 15 | ||
| 15 | Fatal error: [snuffleupagus][0.0.0.0][config] Invalid configuration prefix for 'this is a broken line' on line 1 in Unknown on line 0 | 16 | Fatal error: [snuffleupagus][0.0.0.0][config][log] Invalid configuration prefix for 'this is a broken line' on line 1 in Unknown on line 0 |
| 16 | 1337 | 17 | 1337 |
diff --git a/src/tests/broken_configuration/broken_conf_config_invalid_param.phpt b/src/tests/broken_configuration/broken_conf_config_invalid_param.phpt new file mode 100644 index 0000000..ac85dea --- /dev/null +++ b/src/tests/broken_configuration/broken_conf_config_invalid_param.phpt | |||
| @@ -0,0 +1,16 @@ | |||
| 1 | --TEST-- | ||
| 2 | Broken configuration with invalid parameter warning | ||
| 3 | --SKIPIF-- | ||
| 4 | <?php if (!extension_loaded("snuffleupagus")) print "skip"; ?> | ||
| 5 | --INI-- | ||
| 6 | sp.configuration_file={PWD}/config/broken_conf_config_invalid_param.ini | ||
| 7 | --FILE-- | ||
| 8 | <?php | ||
| 9 | function foo($blah, $x = null, $y = null) { | ||
| 10 | echo "ok"; | ||
| 11 | } | ||
| 12 | |||
| 13 | foo("qwe"); | ||
| 14 | --EXPECTF-- | ||
| 15 | Warning: [snuffleupagus][0.0.0.0][config][log] It seems that you are filtering on a parameter 'qwe' of the function 'foo', but the parameter does not exists. in %s/tests/broken_configuration/broken_conf_config_invalid_param.php on line %d | ||
| 16 | ok | ||
diff --git a/src/tests/broken_configuration/broken_conf_config_regexp.phpt b/src/tests/broken_configuration/broken_conf_config_regexp.phpt index d056e74..ff6280e 100644 --- a/src/tests/broken_configuration/broken_conf_config_regexp.phpt +++ b/src/tests/broken_configuration/broken_conf_config_regexp.phpt | |||
| @@ -2,16 +2,17 @@ | |||
| 2 | Broken configuration | 2 | Broken configuration |
| 3 | --SKIPIF-- | 3 | --SKIPIF-- |
| 4 | <?php if (!extension_loaded("snuffleupagus")) print "skip"; ?> | 4 | <?php if (!extension_loaded("snuffleupagus")) print "skip"; ?> |
| 5 | <?php if (PHP_VERSION_ID >= 80000) print "skip"; ?> | ||
| 5 | --INI-- | 6 | --INI-- |
| 6 | sp.configuration_file={PWD}/config/broken_config_regexp.ini | 7 | sp.configuration_file={PWD}/config/broken_config_regexp.ini |
| 7 | --FILE-- | 8 | --FILE-- |
| 8 | --EXPECTF-- | 9 | --EXPECTF-- |
| 9 | PHP Fatal error: [snuffleupagus][0.0.0.0][config] Failed to compile '*.': %s on line 1. in Unknown on line 0 | 10 | PHP Fatal error: [snuffleupagus][0.0.0.0][config][log] Failed to compile '*.': %s on line 1. in Unknown on line 0 |
| 10 | PHP Fatal error: [snuffleupagus][0.0.0.0][config] '.filename_r()' is expecting a valid regexp, and not '"*."' on line 1 in Unknown on line 0 | 11 | PHP Fatal error: [snuffleupagus][0.0.0.0][config][log] '.filename_r()' is expecting a valid regexp, and not '"*."' on line 1 in Unknown on line 0 |
| 11 | 12 | ||
| 12 | Fatal error: [snuffleupagus][0.0.0.0][config] Failed to compile '*.': %s on line 1. in Unknown on line 0 | 13 | Fatal error: [snuffleupagus][0.0.0.0][config][log] Failed to compile '*.': %s on line 1. in Unknown on line 0 |
| 13 | 14 | ||
| 14 | Fatal error: [snuffleupagus][0.0.0.0][config] '.filename_r()' is expecting a valid regexp, and not '"*."' on line 1 in Unknown on line 0 | 15 | Fatal error: [snuffleupagus][0.0.0.0][config][log] '.filename_r()' is expecting a valid regexp, and not '"*."' on line 1 in Unknown on line 0 |
| 15 | 16 | ||
| 16 | Fatal error: [snuffleupagus][0.0.0.0][config] Invalid configuration file in Unknown on line 0 | 17 | Fatal error: [snuffleupagus][0.0.0.0][config][log] Invalid configuration file in Unknown on line 0 |
| 17 | Could not startup. | 18 | Could not startup. |
diff --git a/src/tests/broken_configuration/broken_conf_config_regexp_no_closing_paren.phpt b/src/tests/broken_configuration/broken_conf_config_regexp_no_closing_paren.phpt index 1792cdd..8644dfe 100644 --- a/src/tests/broken_configuration/broken_conf_config_regexp_no_closing_paren.phpt +++ b/src/tests/broken_configuration/broken_conf_config_regexp_no_closing_paren.phpt | |||
| @@ -2,16 +2,17 @@ | |||
| 2 | Broken configuration - regexp without a closing parenthesis | 2 | Broken configuration - regexp without a closing parenthesis |
| 3 | --SKIPIF-- | 3 | --SKIPIF-- |
| 4 | <?php if (!extension_loaded("snuffleupagus")) print "skip"; ?> | 4 | <?php if (!extension_loaded("snuffleupagus")) print "skip"; ?> |
| 5 | <?php if (PHP_VERSION_ID >= 80000) print "skip"; ?> | ||
| 5 | --INI-- | 6 | --INI-- |
| 6 | sp.configuration_file={PWD}/config/broken_config_regexp_no_closing_paren.ini | 7 | sp.configuration_file={PWD}/config/broken_config_regexp_no_closing_paren.ini |
| 7 | --FILE-- | 8 | --FILE-- |
| 8 | --EXPECT-- | 9 | --EXPECT-- |
| 9 | PHP Fatal error: [snuffleupagus][0.0.0.0][error] There is an issue with the parsing of '"*."': it doesn't look like a valid string on line 1 in Unknown on line 0 | 10 | PHP Fatal error: [snuffleupagus][0.0.0.0][error][log] There is an issue with the parsing of '"*."': it doesn't look like a valid string on line 1 in Unknown on line 0 |
| 10 | PHP Fatal error: [snuffleupagus][0.0.0.0][config] '.filename_r()' is expecting a valid regexp, and not '"*."' on line 1 in Unknown on line 0 | 11 | PHP Fatal error: [snuffleupagus][0.0.0.0][config][log] '.filename_r()' is expecting a valid regexp, and not '"*."' on line 1 in Unknown on line 0 |
| 11 | 12 | ||
| 12 | Fatal error: [snuffleupagus][0.0.0.0][error] There is an issue with the parsing of '"*."': it doesn't look like a valid string on line 1 in Unknown on line 0 | 13 | Fatal error: [snuffleupagus][0.0.0.0][error][log] There is an issue with the parsing of '"*."': it doesn't look like a valid string on line 1 in Unknown on line 0 |
| 13 | 14 | ||
| 14 | Fatal error: [snuffleupagus][0.0.0.0][config] '.filename_r()' is expecting a valid regexp, and not '"*."' on line 1 in Unknown on line 0 | 15 | Fatal error: [snuffleupagus][0.0.0.0][config][log] '.filename_r()' is expecting a valid regexp, and not '"*."' on line 1 in Unknown on line 0 |
| 15 | 16 | ||
| 16 | Fatal error: [snuffleupagus][0.0.0.0][config] Invalid configuration file in Unknown on line 0 | 17 | Fatal error: [snuffleupagus][0.0.0.0][config][log] Invalid configuration file in Unknown on line 0 |
| 17 | Could not startup. \ No newline at end of file | 18 | Could not startup. |
diff --git a/src/tests/broken_configuration/broken_conf_cookie_encryption_without_encryption_key.phpt b/src/tests/broken_configuration/broken_conf_cookie_encryption_without_encryption_key.phpt index f3dc06f..857c803 100644 --- a/src/tests/broken_configuration/broken_conf_cookie_encryption_without_encryption_key.phpt +++ b/src/tests/broken_configuration/broken_conf_cookie_encryption_without_encryption_key.phpt | |||
| @@ -1,14 +1,15 @@ | |||
| 1 | --TEST-- | 1 | --TEST-- |
| 2 | Borken configuration - encrypted cookie without encryption key | 2 | Broken configuration - encrypted cookie without encryption key |
| 3 | --SKIPIF-- | 3 | --SKIPIF-- |
| 4 | <?php if (!extension_loaded("snuffleupagus")) print "skip"; ?> | 4 | <?php if (!extension_loaded("snuffleupagus")) print "skip"; ?> |
| 5 | <?php if (PHP_VERSION_ID >= 80000) print "skip"; ?> | ||
| 5 | --INI-- | 6 | --INI-- |
| 6 | sp.configuration_file={PWD}/config/broken_conf_cookie_encryption_without_encryption_key.ini | 7 | sp.configuration_file={PWD}/config/broken_conf_cookie_encryption_without_encryption_key.ini |
| 7 | --FILE-- | 8 | --FILE-- |
| 8 | --EXPECT-- | 9 | --EXPECT-- |
| 9 | PHP Fatal error: [snuffleupagus][0.0.0.0][config] You're trying to use the cookie encryption featureon line 2 without having set the `.encryption_key` option in`sp.global`: please set it first in Unknown on line 0 | 10 | PHP Fatal error: [snuffleupagus][0.0.0.0][config][log] You're trying to use the cookie encryption featureon line 2 without having set the `.encryption_key` option in`sp.global`: please set it first in Unknown on line 0 |
| 10 | 11 | ||
| 11 | Fatal error: [snuffleupagus][0.0.0.0][config] You're trying to use the cookie encryption featureon line 2 without having set the `.encryption_key` option in`sp.global`: please set it first in Unknown on line 0 | 12 | Fatal error: [snuffleupagus][0.0.0.0][config][log] You're trying to use the cookie encryption featureon line 2 without having set the `.encryption_key` option in`sp.global`: please set it first in Unknown on line 0 |
| 12 | 13 | ||
| 13 | Fatal error: [snuffleupagus][0.0.0.0][config] Invalid configuration file in Unknown on line 0 | 14 | Fatal error: [snuffleupagus][0.0.0.0][config][log] Invalid configuration file in Unknown on line 0 |
| 14 | Could not startup. | 15 | Could not startup. |
diff --git a/src/tests/broken_configuration/broken_conf_cookie_encryption_without_env_var.phpt b/src/tests/broken_configuration/broken_conf_cookie_encryption_without_env_var.phpt index 882b4f7..de97a9d 100644 --- a/src/tests/broken_configuration/broken_conf_cookie_encryption_without_env_var.phpt +++ b/src/tests/broken_configuration/broken_conf_cookie_encryption_without_env_var.phpt | |||
| @@ -1,14 +1,15 @@ | |||
| 1 | --TEST-- | 1 | --TEST-- |
| 2 | Borken configuration - encrypted cookie with without cookie env var | 2 | Broken configuration - encrypted cookie with without cookie env var |
| 3 | --SKIPIF-- | 3 | --SKIPIF-- |
| 4 | <?php if (!extension_loaded("snuffleupagus")) print "skip"; ?> | 4 | <?php if (!extension_loaded("snuffleupagus")) print "skip"; ?> |
| 5 | <?php if (PHP_VERSION_ID >= 80000) print "skip"; ?> | ||
| 5 | --INI-- | 6 | --INI-- |
| 6 | sp.configuration_file={PWD}/config/broken_conf_cookie_encryption_without_env_var.ini | 7 | sp.configuration_file={PWD}/config/broken_conf_cookie_encryption_without_env_var.ini |
| 7 | --FILE-- | 8 | --FILE-- |
| 8 | --EXPECT-- | 9 | --EXPECT-- |
| 9 | PHP Fatal error: [snuffleupagus][0.0.0.0][config] You're trying to use the cookie encryption featureon line 2 without having set the `.cookie_env_var` option in`sp.global`: please set it first in Unknown on line 0 | 10 | PHP Fatal error: [snuffleupagus][0.0.0.0][config][log] You're trying to use the cookie encryption featureon line 2 without having set the `.cookie_env_var` option in`sp.global`: please set it first in Unknown on line 0 |
| 10 | 11 | ||
| 11 | Fatal error: [snuffleupagus][0.0.0.0][config] You're trying to use the cookie encryption featureon line 2 without having set the `.cookie_env_var` option in`sp.global`: please set it first in Unknown on line 0 | 12 | Fatal error: [snuffleupagus][0.0.0.0][config][log] You're trying to use the cookie encryption featureon line 2 without having set the `.cookie_env_var` option in`sp.global`: please set it first in Unknown on line 0 |
| 12 | 13 | ||
| 13 | Fatal error: [snuffleupagus][0.0.0.0][config] Invalid configuration file in Unknown on line 0 | 14 | Fatal error: [snuffleupagus][0.0.0.0][config][log] Invalid configuration file in Unknown on line 0 |
| 14 | Could not startup. | 15 | Could not startup. |
diff --git a/src/tests/broken_configuration/broken_conf_cookie_name_and_regexp.phpt b/src/tests/broken_configuration/broken_conf_cookie_name_and_regexp.phpt index 50bc569..141cf77 100644 --- a/src/tests/broken_configuration/broken_conf_cookie_name_and_regexp.phpt +++ b/src/tests/broken_configuration/broken_conf_cookie_name_and_regexp.phpt | |||
| @@ -1,14 +1,15 @@ | |||
| 1 | --TEST-- | 1 | --TEST-- |
| 2 | Borken configuration - encrypted cookie with name and regexp | 2 | Broken configuration - encrypted cookie with name and regexp |
| 3 | --SKIPIF-- | 3 | --SKIPIF-- |
| 4 | <?php if (!extension_loaded("snuffleupagus")) print "skip"; ?> | 4 | <?php if (!extension_loaded("snuffleupagus")) print "skip"; ?> |
| 5 | <?php if (PHP_VERSION_ID >= 80000) print "skip"; ?> | ||
| 5 | --INI-- | 6 | --INI-- |
| 6 | sp.configuration_file={PWD}/config/broken_conf_cookie_name_and_regexp.ini | 7 | sp.configuration_file={PWD}/config/broken_conf_cookie_name_and_regexp.ini |
| 7 | --FILE-- | 8 | --FILE-- |
| 8 | --EXPECT-- | 9 | --EXPECT-- |
| 9 | PHP Fatal error: [snuffleupagus][0.0.0.0][config] name and name_r are mutually exclusive on line 2 in Unknown on line 0 | 10 | PHP Fatal error: [snuffleupagus][0.0.0.0][config][log] name and name_r are mutually exclusive on line 2 in Unknown on line 0 |
| 10 | 11 | ||
| 11 | Fatal error: [snuffleupagus][0.0.0.0][config] name and name_r are mutually exclusive on line 2 in Unknown on line 0 | 12 | Fatal error: [snuffleupagus][0.0.0.0][config][log] name and name_r are mutually exclusive on line 2 in Unknown on line 0 |
| 12 | 13 | ||
| 13 | Fatal error: [snuffleupagus][0.0.0.0][config] Invalid configuration file in Unknown on line 0 | 14 | Fatal error: [snuffleupagus][0.0.0.0][config][log] Invalid configuration file in Unknown on line 0 |
| 14 | Could not startup. \ No newline at end of file | 15 | Could not startup. |
diff --git a/src/tests/broken_configuration/broken_conf_enable_disable.phpt b/src/tests/broken_configuration/broken_conf_enable_disable.phpt index 48ec954..eeba04a 100644 --- a/src/tests/broken_configuration/broken_conf_enable_disable.phpt +++ b/src/tests/broken_configuration/broken_conf_enable_disable.phpt | |||
| @@ -2,13 +2,14 @@ | |||
| 2 | Global strict mode | 2 | Global strict mode |
| 3 | --SKIPIF-- | 3 | --SKIPIF-- |
| 4 | <?php if (!extension_loaded("snuffleupagus")) print "skip"; ?> | 4 | <?php if (!extension_loaded("snuffleupagus")) print "skip"; ?> |
| 5 | <?php if (PHP_VERSION_ID >= 80000) print "skip"; ?> | ||
| 5 | --INI-- | 6 | --INI-- |
| 6 | sp.configuration_file={PWD}/config/borken_conf_enable_disable.ini | 7 | sp.configuration_file={PWD}/config/borken_conf_enable_disable.ini |
| 7 | --FILE-- | 8 | --FILE-- |
| 8 | --EXPECTF-- | 9 | --EXPECTF-- |
| 9 | PHP Fatal error: [snuffleupagus][0.0.0.0][config] A rule can't be enabled and disabled on line 1 in Unknown on line 0 | 10 | PHP Fatal error: [snuffleupagus][0.0.0.0][config][log] A rule can't be enabled and disabled on line 1 in Unknown on line 0 |
| 10 | 11 | ||
| 11 | Fatal error: [snuffleupagus][0.0.0.0][config] A rule can't be enabled and disabled on line 1 in Unknown on line 0 | 12 | Fatal error: [snuffleupagus][0.0.0.0][config][log] A rule can't be enabled and disabled on line 1 in Unknown on line 0 |
| 12 | 13 | ||
| 13 | Fatal error: [snuffleupagus][0.0.0.0][config] Invalid configuration file in Unknown on line 0 | 14 | Fatal error: [snuffleupagus][0.0.0.0][config][log] Invalid configuration file in Unknown on line 0 |
| 14 | Could not startup. \ No newline at end of file | 15 | Could not startup. |
diff --git a/src/tests/broken_configuration/broken_conf_eval.phpt b/src/tests/broken_configuration/broken_conf_eval.phpt index e1e05bc..791795a 100644 --- a/src/tests/broken_configuration/broken_conf_eval.phpt +++ b/src/tests/broken_configuration/broken_conf_eval.phpt | |||
| @@ -2,13 +2,14 @@ | |||
| 2 | Broken configuration for eval | 2 | Broken configuration for eval |
| 3 | --SKIPIF-- | 3 | --SKIPIF-- |
| 4 | <?php if (!extension_loaded("snuffleupagus")) print "skip"; ?> | 4 | <?php if (!extension_loaded("snuffleupagus")) print "skip"; ?> |
| 5 | <?php if (PHP_VERSION_ID >= 80000) print "skip"; ?> | ||
| 5 | --INI-- | 6 | --INI-- |
| 6 | sp.configuration_file={PWD}/config/broken_conf_eval.ini | 7 | sp.configuration_file={PWD}/config/broken_conf_eval.ini |
| 7 | --FILE-- | 8 | --FILE-- |
| 8 | --EXPECT-- | 9 | --EXPECT-- |
| 9 | PHP Fatal error: [snuffleupagus][0.0.0.0][error] There is an issue with the parsing of '"cos,sin': it doesn't look like a valid string on line 1 in Unknown on line 0 | 10 | PHP Fatal error: [snuffleupagus][0.0.0.0][error][log] There is an issue with the parsing of '"cos,sin': it doesn't look like a valid string on line 1 in Unknown on line 0 |
| 10 | 11 | ||
| 11 | Fatal error: [snuffleupagus][0.0.0.0][error] There is an issue with the parsing of '"cos,sin': it doesn't look like a valid string on line 1 in Unknown on line 0 | 12 | Fatal error: [snuffleupagus][0.0.0.0][error][log] There is an issue with the parsing of '"cos,sin': it doesn't look like a valid string on line 1 in Unknown on line 0 |
| 12 | 13 | ||
| 13 | Fatal error: [snuffleupagus][0.0.0.0][config] Invalid configuration file in Unknown on line 0 | 14 | Fatal error: [snuffleupagus][0.0.0.0][config][log] Invalid configuration file in Unknown on line 0 |
| 14 | Could not startup. \ No newline at end of file | 15 | Could not startup. |
diff --git a/src/tests/broken_configuration/broken_conf_expecting_bool.phpt b/src/tests/broken_configuration/broken_conf_expecting_bool.phpt index 38a648d..4857ebe 100644 --- a/src/tests/broken_configuration/broken_conf_expecting_bool.phpt +++ b/src/tests/broken_configuration/broken_conf_expecting_bool.phpt | |||
| @@ -2,13 +2,14 @@ | |||
| 2 | Bad boolean value in configuration | 2 | Bad boolean value in configuration |
| 3 | --SKIPIF-- | 3 | --SKIPIF-- |
| 4 | <?php if (!extension_loaded("snuffleupagus")) print "skip"; ?> | 4 | <?php if (!extension_loaded("snuffleupagus")) print "skip"; ?> |
| 5 | <?php if (PHP_VERSION_ID >= 80000) print "skip"; ?> | ||
| 5 | --INI-- | 6 | --INI-- |
| 6 | sp.configuration_file={PWD}/config/broken_conf_expecting_bool.ini | 7 | sp.configuration_file={PWD}/config/broken_conf_expecting_bool.ini |
| 7 | --FILE-- | 8 | --FILE-- |
| 8 | --EXPECT-- | 9 | --EXPECT-- |
| 9 | PHP Fatal error: [snuffleupagus][0.0.0.0][config] Trailing chars '337);' at the end of '.enable(1337);' on line 5 in Unknown on line 0 | 10 | PHP Fatal error: [snuffleupagus][0.0.0.0][config][log] Trailing chars '337);' at the end of '.enable(1337);' on line 5 in Unknown on line 0 |
| 10 | 11 | ||
| 11 | Fatal error: [snuffleupagus][0.0.0.0][config] Trailing chars '337);' at the end of '.enable(1337);' on line 5 in Unknown on line 0 | 12 | Fatal error: [snuffleupagus][0.0.0.0][config][log] Trailing chars '337);' at the end of '.enable(1337);' on line 5 in Unknown on line 0 |
| 12 | 13 | ||
| 13 | Fatal error: [snuffleupagus][0.0.0.0][config] Invalid configuration file in Unknown on line 0 | 14 | Fatal error: [snuffleupagus][0.0.0.0][config][log] Invalid configuration file in Unknown on line 0 |
| 14 | Could not startup. \ No newline at end of file | 15 | Could not startup. |
diff --git a/src/tests/broken_configuration/broken_conf_invalid_cidr.phpt b/src/tests/broken_configuration/broken_conf_invalid_cidr.phpt index e23b880..e618676 100644 --- a/src/tests/broken_configuration/broken_conf_invalid_cidr.phpt +++ b/src/tests/broken_configuration/broken_conf_invalid_cidr.phpt | |||
| @@ -2,13 +2,14 @@ | |||
| 2 | Broken configuration | 2 | Broken configuration |
| 3 | --SKIPIF-- | 3 | --SKIPIF-- |
| 4 | <?php if (!extension_loaded("snuffleupagus")) print "skip"; ?> | 4 | <?php if (!extension_loaded("snuffleupagus")) print "skip"; ?> |
| 5 | <?php if (PHP_VERSION_ID >= 80000) print "skip"; ?> | ||
| 5 | --INI-- | 6 | --INI-- |
| 6 | sp.configuration_file={PWD}/config/broken_conf_invalid_cidr.ini | 7 | sp.configuration_file={PWD}/config/broken_conf_invalid_cidr.ini |
| 7 | --FILE-- | 8 | --FILE-- |
| 8 | --EXPECT-- | 9 | --EXPECT-- |
| 9 | PHP Fatal error: [snuffleupagus][0.0.0.0][config] '42' isn't a valid ipv4 mask. in Unknown on line 0 | 10 | PHP Fatal error: [snuffleupagus][0.0.0.0][config][log] '42' isn't a valid ipv4 mask. in Unknown on line 0 |
| 10 | 11 | ||
| 11 | Fatal error: [snuffleupagus][0.0.0.0][config] '42' isn't a valid ipv4 mask. in Unknown on line 0 | 12 | Fatal error: [snuffleupagus][0.0.0.0][config][log] '42' isn't a valid ipv4 mask. in Unknown on line 0 |
| 12 | 13 | ||
| 13 | Fatal error: [snuffleupagus][0.0.0.0][config] Invalid configuration file in Unknown on line 0 | 14 | Fatal error: [snuffleupagus][0.0.0.0][config][log] Invalid configuration file in Unknown on line 0 |
| 14 | Could not startup. \ No newline at end of file | 15 | Could not startup. |
diff --git a/src/tests/broken_configuration/broken_conf_invalid_cidr6.phpt b/src/tests/broken_configuration/broken_conf_invalid_cidr6.phpt index b8721b1..34a0d30 100644 --- a/src/tests/broken_configuration/broken_conf_invalid_cidr6.phpt +++ b/src/tests/broken_configuration/broken_conf_invalid_cidr6.phpt | |||
| @@ -2,13 +2,14 @@ | |||
| 2 | Broken configuration | 2 | Broken configuration |
| 3 | --SKIPIF-- | 3 | --SKIPIF-- |
| 4 | <?php if (!extension_loaded("snuffleupagus")) print "skip"; ?> | 4 | <?php if (!extension_loaded("snuffleupagus")) print "skip"; ?> |
| 5 | <?php if (PHP_VERSION_ID >= 80000) print "skip"; ?> | ||
| 5 | --INI-- | 6 | --INI-- |
| 6 | sp.configuration_file={PWD}/config/broken_conf_invalid_cidr6.ini | 7 | sp.configuration_file={PWD}/config/broken_conf_invalid_cidr6.ini |
| 7 | --FILE-- | 8 | --FILE-- |
| 8 | --EXPECT-- | 9 | --EXPECT-- |
| 9 | PHP Fatal error: [snuffleupagus][0.0.0.0][config] 'ZZZ' isn't a valid network mask. in Unknown on line 0 | 10 | PHP Fatal error: [snuffleupagus][0.0.0.0][config][log] 'ZZZ' isn't a valid network mask. in Unknown on line 0 |
| 10 | 11 | ||
| 11 | Fatal error: [snuffleupagus][0.0.0.0][config] 'ZZZ' isn't a valid network mask. in Unknown on line 0 | 12 | Fatal error: [snuffleupagus][0.0.0.0][config][log] 'ZZZ' isn't a valid network mask. in Unknown on line 0 |
| 12 | 13 | ||
| 13 | Fatal error: [snuffleupagus][0.0.0.0][config] Invalid configuration file in Unknown on line 0 | 14 | Fatal error: [snuffleupagus][0.0.0.0][config][log] Invalid configuration file in Unknown on line 0 |
| 14 | Could not startup. \ No newline at end of file | 15 | Could not startup. |
diff --git a/src/tests/broken_configuration/broken_conf_invalid_cidr6_no_slash.phpt b/src/tests/broken_configuration/broken_conf_invalid_cidr6_no_slash.phpt index cbc609e..8703dff 100644 --- a/src/tests/broken_configuration/broken_conf_invalid_cidr6_no_slash.phpt +++ b/src/tests/broken_configuration/broken_conf_invalid_cidr6_no_slash.phpt | |||
| @@ -2,13 +2,14 @@ | |||
| 2 | Broken configuration, invalid cidr for ipv6 because there is no `/` in it | 2 | Broken configuration, invalid cidr for ipv6 because there is no `/` in it |
| 3 | --SKIPIF-- | 3 | --SKIPIF-- |
| 4 | <?php if (!extension_loaded("snuffleupagus")) print "skip"; ?> | 4 | <?php if (!extension_loaded("snuffleupagus")) print "skip"; ?> |
| 5 | <?php if (PHP_VERSION_ID >= 80000) print "skip"; ?> | ||
| 5 | --INI-- | 6 | --INI-- |
| 6 | sp.configuration_file={PWD}/config/broken_conf_invalid_cidr6_no_slash.ini | 7 | sp.configuration_file={PWD}/config/broken_conf_invalid_cidr6_no_slash.ini |
| 7 | --FILE-- | 8 | --FILE-- |
| 8 | --EXPECT-- | 9 | --EXPECT-- |
| 9 | PHP Fatal error: [snuffleupagus][0.0.0.0][config] '2001:0db8:0000:0000:0000:ff00:0042:8329' isn't a valid network mask, it seems that you forgot a '/'. in Unknown on line 0 | 10 | PHP Fatal error: [snuffleupagus][0.0.0.0][config][log] '2001:0db8:0000:0000:0000:ff00:0042:8329' isn't a valid network mask, it seems that you forgot a '/'. in Unknown on line 0 |
| 10 | 11 | ||
| 11 | Fatal error: [snuffleupagus][0.0.0.0][config] '2001:0db8:0000:0000:0000:ff00:0042:8329' isn't a valid network mask, it seems that you forgot a '/'. in Unknown on line 0 | 12 | Fatal error: [snuffleupagus][0.0.0.0][config][log] '2001:0db8:0000:0000:0000:ff00:0042:8329' isn't a valid network mask, it seems that you forgot a '/'. in Unknown on line 0 |
| 12 | 13 | ||
| 13 | Fatal error: [snuffleupagus][0.0.0.0][config] Invalid configuration file in Unknown on line 0 | 14 | Fatal error: [snuffleupagus][0.0.0.0][config][log] Invalid configuration file in Unknown on line 0 |
| 14 | Could not startup. \ No newline at end of file | 15 | Could not startup. |
diff --git a/src/tests/broken_configuration/broken_conf_invalid_cidr_value.phpt b/src/tests/broken_configuration/broken_conf_invalid_cidr_value.phpt index 3372409..1424853 100644 --- a/src/tests/broken_configuration/broken_conf_invalid_cidr_value.phpt +++ b/src/tests/broken_configuration/broken_conf_invalid_cidr_value.phpt | |||
| @@ -3,16 +3,17 @@ Broken configuration, invalid cidr value | |||
| 3 | (13337%128 = 25) | 3 | (13337%128 = 25) |
| 4 | --SKIPIF-- | 4 | --SKIPIF-- |
| 5 | <?php if (!extension_loaded("snuffleupagus")) print "skip"; ?> | 5 | <?php if (!extension_loaded("snuffleupagus")) print "skip"; ?> |
| 6 | <?php if (PHP_VERSION_ID >= 80000) print "skip"; ?> | ||
| 6 | --INI-- | 7 | --INI-- |
| 7 | sp.configuration_file={PWD}/config/broken_conf_invalid_cidr_value.ini | 8 | sp.configuration_file={PWD}/config/broken_conf_invalid_cidr_value.ini |
| 8 | --FILE-- | 9 | --FILE-- |
| 9 | --EXPECT-- | 10 | --EXPECT-- |
| 10 | PHP Fatal error: [snuffleupagus][0.0.0.0][error] A valid string as parameter is expected on line 1 in Unknown on line 0 | 11 | PHP Fatal error: [snuffleupagus][0.0.0.0][error][log] A valid string as parameter is expected on line 1 in Unknown on line 0 |
| 11 | PHP Fatal error: [snuffleupagus][0.0.0.0][config] " doesn't contain a valid cidr on line 1 in Unknown on line 0 | 12 | PHP Fatal error: [snuffleupagus][0.0.0.0][config][log] " doesn't contain a valid cidr on line 1 in Unknown on line 0 |
| 12 | 13 | ||
| 13 | Fatal error: [snuffleupagus][0.0.0.0][error] A valid string as parameter is expected on line 1 in Unknown on line 0 | 14 | Fatal error: [snuffleupagus][0.0.0.0][error][log] A valid string as parameter is expected on line 1 in Unknown on line 0 |
| 14 | 15 | ||
| 15 | Fatal error: [snuffleupagus][0.0.0.0][config] " doesn't contain a valid cidr on line 1 in Unknown on line 0 | 16 | Fatal error: [snuffleupagus][0.0.0.0][config][log] " doesn't contain a valid cidr on line 1 in Unknown on line 0 |
| 16 | 17 | ||
| 17 | Fatal error: [snuffleupagus][0.0.0.0][config] Invalid configuration file in Unknown on line 0 | 18 | Fatal error: [snuffleupagus][0.0.0.0][config][log] Invalid configuration file in Unknown on line 0 |
| 18 | Could not startup. \ No newline at end of file | 19 | Could not startup. |
diff --git a/src/tests/broken_configuration/broken_conf_invalid_filename.phpt b/src/tests/broken_configuration/broken_conf_invalid_filename.phpt index 1bc6564..b9a904c 100644 --- a/src/tests/broken_configuration/broken_conf_invalid_filename.phpt +++ b/src/tests/broken_configuration/broken_conf_invalid_filename.phpt | |||
| @@ -1,14 +1,15 @@ | |||
| 1 | --TEST-- | 1 | --TEST-- |
| 2 | Broken configuration filename without absolute path | 2 | Broken configuration filename without absolute path |
| 3 | --SKIPIF-- | 3 | --SKIPIF-- |
| 4 | <?php if (!extension_loaded("snuffleupagus")) die "skip"; ?> | 4 | <?php if (!extension_loaded("snuffleupagus")) print "skip"; ?> |
| 5 | <?php if (PHP_VERSION_ID >= 80000) print "skip"; ?> | ||
| 5 | --INI-- | 6 | --INI-- |
| 6 | sp.configuration_file={PWD}/config/broken_conf_invalid_filename.ini | 7 | sp.configuration_file={PWD}/config/broken_conf_invalid_filename.ini |
| 7 | --FILE-- | 8 | --FILE-- |
| 8 | --EXPECTF-- | 9 | --EXPECTF-- |
| 9 | PHP Fatal error: [snuffleupagus][0.0.0.0][config] Invalid configuration line: 'sp.disabled_functions.function("sprintf").filename("wrong file name").drop();':'.filename' must be an absolute path or a phar archive on line 1 in Unknown on line 0 | 10 | PHP Fatal error: [snuffleupagus][0.0.0.0][config][log] Invalid configuration line: 'sp.disabled_functions.function("sprintf").filename("wrong file name").drop();':'.filename' must be an absolute path or a phar archive on line 1 in Unknown on line 0 |
| 10 | 11 | ||
| 11 | Fatal error: [snuffleupagus][0.0.0.0][config] Invalid configuration line: 'sp.disabled_functions.function("sprintf").filename("wrong file name").drop();':'.filename' must be an absolute path or a phar archive on line 1 in Unknown on line 0 | 12 | Fatal error: [snuffleupagus][0.0.0.0][config][log] Invalid configuration line: 'sp.disabled_functions.function("sprintf").filename("wrong file name").drop();':'.filename' must be an absolute path or a phar archive on line 1 in Unknown on line 0 |
| 12 | 13 | ||
| 13 | Fatal error: [snuffleupagus][0.0.0.0][config] Invalid configuration file in Unknown on line 0 | 14 | Fatal error: [snuffleupagus][0.0.0.0][config][log] Invalid configuration file in Unknown on line 0 |
| 14 | Could not startup. \ No newline at end of file | 15 | Could not startup. |
diff --git a/src/tests/broken_configuration/broken_conf_invalid_log_media.phpt b/src/tests/broken_configuration/broken_conf_invalid_log_media.phpt index a162ea8..c1c2668 100644 --- a/src/tests/broken_configuration/broken_conf_invalid_log_media.phpt +++ b/src/tests/broken_configuration/broken_conf_invalid_log_media.phpt | |||
| @@ -1,14 +1,15 @@ | |||
| 1 | --TEST-- | 1 | --TEST-- |
| 2 | Broken configuration filename with improper log media | 2 | Broken configuration filename with improper log media |
| 3 | --SKIPIF-- | 3 | --SKIPIF-- |
| 4 | <?php if (!extension_loaded("snuffleupagus")) die "skip"; ?> | 4 | <?php if (!extension_loaded("snuffleupagus")) print "skip"; ?> |
| 5 | <?php if (PHP_VERSION_ID >= 80000) print "skip"; ?> | ||
| 5 | --INI-- | 6 | --INI-- |
| 6 | sp.configuration_file={PWD}/config/broken_conf_invalid_log_media.ini | 7 | sp.configuration_file={PWD}/config/broken_conf_invalid_log_media.ini |
| 7 | --FILE-- | 8 | --FILE-- |
| 8 | --EXPECTF-- | 9 | --EXPECTF-- |
| 9 | PHP Fatal error: [snuffleupagus][0.0.0.0][config] .log_media() only supports 'syslog' or 'php', on line 1 in Unknown on line 0 | 10 | PHP Fatal error: [snuffleupagus][0.0.0.0][config][log] .log_media() only supports 'syslog' or 'php', on line 1 in Unknown on line 0 |
| 10 | 11 | ||
| 11 | Fatal error: [snuffleupagus][0.0.0.0][config] .log_media() only supports 'syslog' or 'php', on line 1 in Unknown on line 0 | 12 | Fatal error: [snuffleupagus][0.0.0.0][config][log] .log_media() only supports 'syslog' or 'php', on line 1 in Unknown on line 0 |
| 12 | 13 | ||
| 13 | Fatal error: [snuffleupagus][0.0.0.0][config] Invalid configuration file in Unknown on line 0 | 14 | Fatal error: [snuffleupagus][0.0.0.0][config][log] Invalid configuration file in Unknown on line 0 |
| 14 | Could not startup. | 15 | Could not startup. |
diff --git a/src/tests/broken_configuration/broken_conf_invalid_type.phpt b/src/tests/broken_configuration/broken_conf_invalid_type.phpt index cc4a381..aeb6b85 100644 --- a/src/tests/broken_configuration/broken_conf_invalid_type.phpt +++ b/src/tests/broken_configuration/broken_conf_invalid_type.phpt | |||
| @@ -1,14 +1,15 @@ | |||
| 1 | --TEST-- | 1 | --TEST-- |
| 2 | Broken conf with wrong type | 2 | Broken conf with wrong type |
| 3 | --SKIPIF-- | 3 | --SKIPIF-- |
| 4 | <?php if (!extension_loaded("snuffleupagus")) die "skip"; ?> | 4 | <?php if (!extension_loaded("snuffleupagus")) print "skip"; ?> |
| 5 | <?php if (PHP_VERSION_ID >= 80000) print "skip"; ?> | ||
| 5 | --INI-- | 6 | --INI-- |
| 6 | sp.configuration_file={PWD}/config/broken_conf_invalid_type.ini | 7 | sp.configuration_file={PWD}/config/broken_conf_invalid_type.ini |
| 7 | --FILE-- | 8 | --FILE-- |
| 8 | --EXPECTF-- | 9 | --EXPECTF-- |
| 9 | PHP Fatal error: [snuffleupagus][0.0.0.0][error] There is an issue with the parsing of '"totally_wrong"_type")': it doesn't look like a valid string on line 1 in Unknown on line 0 | 10 | PHP Fatal error: [snuffleupagus][0.0.0.0][error][log] There is an issue with the parsing of '"totally_wrong"_type")': it doesn't look like a valid string on line 1 in Unknown on line 0 |
| 10 | 11 | ||
| 11 | Fatal error: [snuffleupagus][0.0.0.0][error] There is an issue with the parsing of '"totally_wrong"_type")': it doesn't look like a valid string on line 1 in Unknown on line 0 | 12 | Fatal error: [snuffleupagus][0.0.0.0][error][log] There is an issue with the parsing of '"totally_wrong"_type")': it doesn't look like a valid string on line 1 in Unknown on line 0 |
| 12 | 13 | ||
| 13 | Fatal error: [snuffleupagus][0.0.0.0][config] Invalid configuration file in Unknown on line 0 | 14 | Fatal error: [snuffleupagus][0.0.0.0][config][log] Invalid configuration file in Unknown on line 0 |
| 14 | Could not startup. \ No newline at end of file | 15 | Could not startup. |
diff --git a/src/tests/broken_configuration/broken_conf_key_value.phpt b/src/tests/broken_configuration/broken_conf_key_value.phpt index 14a3d91..ec87d93 100644 --- a/src/tests/broken_configuration/broken_conf_key_value.phpt +++ b/src/tests/broken_configuration/broken_conf_key_value.phpt | |||
| @@ -2,13 +2,14 @@ | |||
| 2 | Broken configuration | 2 | Broken configuration |
| 3 | --SKIPIF-- | 3 | --SKIPIF-- |
| 4 | <?php if (!extension_loaded("snuffleupagus")) print "skip"; ?> | 4 | <?php if (!extension_loaded("snuffleupagus")) print "skip"; ?> |
| 5 | <?php if (PHP_VERSION_ID >= 80000) print "skip"; ?> | ||
| 5 | --INI-- | 6 | --INI-- |
| 6 | sp.configuration_file={PWD}/config/broken_conf_key_value.ini | 7 | sp.configuration_file={PWD}/config/broken_conf_key_value.ini |
| 7 | --FILE-- | 8 | --FILE-- |
| 8 | --EXPECT-- | 9 | --EXPECT-- |
| 9 | PHP Fatal error: [snuffleupagus][0.0.0.0][config] Invalid configuration line: 'sp.disabled_functions.function("system").var("").value("").key("").drop();':`key` and `value` are mutually exclusive on line 1 in Unknown on line 0 | 10 | PHP Fatal error: [snuffleupagus][0.0.0.0][config][log] Invalid configuration line: 'sp.disabled_functions.function("system").var("").value("").key("").drop();':`key` and `value` are mutually exclusive on line 1 in Unknown on line 0 |
| 10 | 11 | ||
| 11 | Fatal error: [snuffleupagus][0.0.0.0][config] Invalid configuration line: 'sp.disabled_functions.function("system").var("").value("").key("").drop();':`key` and `value` are mutually exclusive on line 1 in Unknown on line 0 | 12 | Fatal error: [snuffleupagus][0.0.0.0][config][log] Invalid configuration line: 'sp.disabled_functions.function("system").var("").value("").key("").drop();':`key` and `value` are mutually exclusive on line 1 in Unknown on line 0 |
| 12 | 13 | ||
| 13 | Fatal error: [snuffleupagus][0.0.0.0][config] Invalid configuration file in Unknown on line 0 | 14 | Fatal error: [snuffleupagus][0.0.0.0][config][log] Invalid configuration file in Unknown on line 0 |
| 14 | Could not startup. \ No newline at end of file | 15 | Could not startup. |
diff --git a/src/tests/broken_configuration/broken_conf_line_empty_string.phpt b/src/tests/broken_configuration/broken_conf_line_empty_string.phpt index 15c11fd..3790d83 100644 --- a/src/tests/broken_configuration/broken_conf_line_empty_string.phpt +++ b/src/tests/broken_configuration/broken_conf_line_empty_string.phpt | |||
| @@ -2,13 +2,14 @@ | |||
| 2 | Configuration line with an empty string | 2 | Configuration line with an empty string |
| 3 | --SKIPIF-- | 3 | --SKIPIF-- |
| 4 | <?php if (!extension_loaded("snuffleupagus")) print "skip"; ?> | 4 | <?php if (!extension_loaded("snuffleupagus")) print "skip"; ?> |
| 5 | <?php if (PHP_VERSION_ID >= 80000) print "skip"; ?> | ||
| 5 | --INI-- | 6 | --INI-- |
| 6 | sp.configuration_file={PWD}/config/broken_conf_line_empty_string.ini | 7 | sp.configuration_file={PWD}/config/broken_conf_line_empty_string.ini |
| 7 | --FILE-- | 8 | --FILE-- |
| 8 | --EXPECT-- | 9 | --EXPECT-- |
| 9 | PHP Fatal error: [snuffleupagus][0.0.0.0][error] A valid string as parameter is expected on line 1 in Unknown on line 0 | 10 | PHP Fatal error: [snuffleupagus][0.0.0.0][error][log] A valid string as parameter is expected on line 1 in Unknown on line 0 |
| 10 | 11 | ||
| 11 | Fatal error: [snuffleupagus][0.0.0.0][error] A valid string as parameter is expected on line 1 in Unknown on line 0 | 12 | Fatal error: [snuffleupagus][0.0.0.0][error][log] A valid string as parameter is expected on line 1 in Unknown on line 0 |
| 12 | 13 | ||
| 13 | Fatal error: [snuffleupagus][0.0.0.0][config] Invalid configuration file in Unknown on line 0 | 14 | Fatal error: [snuffleupagus][0.0.0.0][config][log] Invalid configuration file in Unknown on line 0 |
| 14 | Could not startup. \ No newline at end of file | 15 | Could not startup. |
diff --git a/src/tests/broken_configuration/broken_conf_line_no_closing.phpt b/src/tests/broken_configuration/broken_conf_line_no_closing.phpt index c8ba73b..0f51dcf 100644 --- a/src/tests/broken_configuration/broken_conf_line_no_closing.phpt +++ b/src/tests/broken_configuration/broken_conf_line_no_closing.phpt | |||
| @@ -2,13 +2,14 @@ | |||
| 2 | Configuration line without closing parenthese | 2 | Configuration line without closing parenthese |
| 3 | --SKIPIF-- | 3 | --SKIPIF-- |
| 4 | <?php if (!extension_loaded("snuffleupagus")) print "skip"; ?> | 4 | <?php if (!extension_loaded("snuffleupagus")) print "skip"; ?> |
| 5 | <?php if (PHP_VERSION_ID >= 80000) print "skip"; ?> | ||
| 5 | --INI-- | 6 | --INI-- |
| 6 | sp.configuration_file={PWD}/config/broken_conf_line_no_closing.ini | 7 | sp.configuration_file={PWD}/config/broken_conf_line_no_closing.ini |
| 7 | --FILE-- | 8 | --FILE-- |
| 8 | --EXPECT-- | 9 | --EXPECT-- |
| 9 | PHP Fatal error: [snuffleupagus][0.0.0.0][error] There is an issue with the parsing of '"123"': it doesn't look like a valid string on line 1 in Unknown on line 0 | 10 | PHP Fatal error: [snuffleupagus][0.0.0.0][error][log] There is an issue with the parsing of '"123"': it doesn't look like a valid string on line 1 in Unknown on line 0 |
| 10 | 11 | ||
| 11 | Fatal error: [snuffleupagus][0.0.0.0][error] There is an issue with the parsing of '"123"': it doesn't look like a valid string on line 1 in Unknown on line 0 | 12 | Fatal error: [snuffleupagus][0.0.0.0][error][log] There is an issue with the parsing of '"123"': it doesn't look like a valid string on line 1 in Unknown on line 0 |
| 12 | 13 | ||
| 13 | Fatal error: [snuffleupagus][0.0.0.0][config] Invalid configuration file in Unknown on line 0 | 14 | Fatal error: [snuffleupagus][0.0.0.0][config][log] Invalid configuration file in Unknown on line 0 |
| 14 | Could not startup. \ No newline at end of file | 15 | Could not startup. |
diff --git a/src/tests/broken_configuration/broken_conf_local_var_1.phpt b/src/tests/broken_configuration/broken_conf_local_var_1.phpt index 573246c..851d532 100644 --- a/src/tests/broken_configuration/broken_conf_local_var_1.phpt +++ b/src/tests/broken_configuration/broken_conf_local_var_1.phpt | |||
| @@ -2,16 +2,17 @@ | |||
| 2 | Broken configuration | 2 | Broken configuration |
| 3 | --SKIPIF-- | 3 | --SKIPIF-- |
| 4 | <?php if (!extension_loaded("snuffleupagus")) print "skip"; ?> | 4 | <?php if (!extension_loaded("snuffleupagus")) print "skip"; ?> |
| 5 | <?php if (PHP_VERSION_ID >= 80000) print "skip"; ?> | ||
| 5 | --INI-- | 6 | --INI-- |
| 6 | sp.configuration_file={PWD}/config/broken_conf_local_var_1.ini | 7 | sp.configuration_file={PWD}/config/broken_conf_local_var_1.ini |
| 7 | --FILE-- | 8 | --FILE-- |
| 8 | --EXPECT-- | 9 | --EXPECT-- |
| 9 | PHP Fatal error: [snuffleupagus][0.0.0.0][config] Invalid `]` position. in Unknown on line 0 | 10 | PHP Fatal error: [snuffleupagus][0.0.0.0][config][log] Invalid `]` position. in Unknown on line 0 |
| 10 | PHP Fatal error: [snuffleupagus][0.0.0.0][config] Invalid value ']' for `var` on line 1 in Unknown on line 0 | 11 | PHP Fatal error: [snuffleupagus][0.0.0.0][config][log] Invalid value ']' for `var` on line 1 in Unknown on line 0 |
| 11 | 12 | ||
| 12 | Fatal error: [snuffleupagus][0.0.0.0][config] Invalid `]` position. in Unknown on line 0 | 13 | Fatal error: [snuffleupagus][0.0.0.0][config][log] Invalid `]` position. in Unknown on line 0 |
| 13 | 14 | ||
| 14 | Fatal error: [snuffleupagus][0.0.0.0][config] Invalid value ']' for `var` on line 1 in Unknown on line 0 | 15 | Fatal error: [snuffleupagus][0.0.0.0][config][log] Invalid value ']' for `var` on line 1 in Unknown on line 0 |
| 15 | 16 | ||
| 16 | Fatal error: [snuffleupagus][0.0.0.0][config] Invalid configuration file in Unknown on line 0 | 17 | Fatal error: [snuffleupagus][0.0.0.0][config][log] Invalid configuration file in Unknown on line 0 |
| 17 | Could not startup. \ No newline at end of file | 18 | Could not startup. |
diff --git a/src/tests/broken_configuration/broken_conf_local_var_10.phpt b/src/tests/broken_configuration/broken_conf_local_var_10.phpt index 2cf19f9..747cc5a 100644 --- a/src/tests/broken_configuration/broken_conf_local_var_10.phpt +++ b/src/tests/broken_configuration/broken_conf_local_var_10.phpt | |||
| @@ -2,16 +2,17 @@ | |||
| 2 | Broken configuration | 2 | Broken configuration |
| 3 | --SKIPIF-- | 3 | --SKIPIF-- |
| 4 | <?php if (!extension_loaded("snuffleupagus")) print "skip"; ?> | 4 | <?php if (!extension_loaded("snuffleupagus")) print "skip"; ?> |
| 5 | <?php if (PHP_VERSION_ID >= 80000) print "skip"; ?> | ||
| 5 | --INI-- | 6 | --INI-- |
| 6 | sp.configuration_file={PWD}/config/broken_conf_local_var_10.ini | 7 | sp.configuration_file={PWD}/config/broken_conf_local_var_10.ini |
| 7 | --FILE-- | 8 | --FILE-- |
| 8 | --EXPECT-- | 9 | --EXPECT-- |
| 9 | PHP Fatal error: [snuffleupagus][0.0.0.0][config] Invalid `]` position. in Unknown on line 0 | 10 | PHP Fatal error: [snuffleupagus][0.0.0.0][config][log] Invalid `]` position. in Unknown on line 0 |
| 10 | PHP Fatal error: [snuffleupagus][0.0.0.0][config] Invalid value 'asd[asd]asd' for `var` on line 1 in Unknown on line 0 | 11 | PHP Fatal error: [snuffleupagus][0.0.0.0][config][log] Invalid value 'asd[asd]asd' for `var` on line 1 in Unknown on line 0 |
| 11 | 12 | ||
| 12 | Fatal error: [snuffleupagus][0.0.0.0][config] Invalid `]` position. in Unknown on line 0 | 13 | Fatal error: [snuffleupagus][0.0.0.0][config][log] Invalid `]` position. in Unknown on line 0 |
| 13 | 14 | ||
| 14 | Fatal error: [snuffleupagus][0.0.0.0][config] Invalid value 'asd[asd]asd' for `var` on line 1 in Unknown on line 0 | 15 | Fatal error: [snuffleupagus][0.0.0.0][config][log] Invalid value 'asd[asd]asd' for `var` on line 1 in Unknown on line 0 |
| 15 | 16 | ||
| 16 | Fatal error: [snuffleupagus][0.0.0.0][config] Invalid configuration file in Unknown on line 0 | 17 | Fatal error: [snuffleupagus][0.0.0.0][config][log] Invalid configuration file in Unknown on line 0 |
| 17 | Could not startup. \ No newline at end of file | 18 | Could not startup. |
diff --git a/src/tests/broken_configuration/broken_conf_local_var_11.phpt b/src/tests/broken_configuration/broken_conf_local_var_11.phpt index bd018e4..11ca562 100644 --- a/src/tests/broken_configuration/broken_conf_local_var_11.phpt +++ b/src/tests/broken_configuration/broken_conf_local_var_11.phpt | |||
| @@ -2,16 +2,17 @@ | |||
| 2 | Broken configuration | 2 | Broken configuration |
| 3 | --SKIPIF-- | 3 | --SKIPIF-- |
| 4 | <?php if (!extension_loaded("snuffleupagus")) print "skip"; ?> | 4 | <?php if (!extension_loaded("snuffleupagus")) print "skip"; ?> |
| 5 | <?php if (PHP_VERSION_ID >= 80000) print "skip"; ?> | ||
| 5 | --INI-- | 6 | --INI-- |
| 6 | sp.configuration_file={PWD}/config/broken_conf_local_var_11.ini | 7 | sp.configuration_file={PWD}/config/broken_conf_local_var_11.ini |
| 7 | --FILE-- | 8 | --FILE-- |
| 8 | --EXPECT-- | 9 | --EXPECT-- |
| 9 | PHP Fatal error: [snuffleupagus][0.0.0.0][config] Invalid `::` position. in Unknown on line 0 | 10 | PHP Fatal error: [snuffleupagus][0.0.0.0][config][log] Invalid `::` position. in Unknown on line 0 |
| 10 | PHP Fatal error: [snuffleupagus][0.0.0.0][config] Invalid value 'asd::' for `param` on line 1 in Unknown on line 0 | 11 | PHP Fatal error: [snuffleupagus][0.0.0.0][config][log] Invalid value 'asd::' for `param` on line 1 in Unknown on line 0 |
| 11 | 12 | ||
| 12 | Fatal error: [snuffleupagus][0.0.0.0][config] Invalid `::` position. in Unknown on line 0 | 13 | Fatal error: [snuffleupagus][0.0.0.0][config][log] Invalid `::` position. in Unknown on line 0 |
| 13 | 14 | ||
| 14 | Fatal error: [snuffleupagus][0.0.0.0][config] Invalid value 'asd::' for `param` on line 1 in Unknown on line 0 | 15 | Fatal error: [snuffleupagus][0.0.0.0][config][log] Invalid value 'asd::' for `param` on line 1 in Unknown on line 0 |
| 15 | 16 | ||
| 16 | Fatal error: [snuffleupagus][0.0.0.0][config] Invalid configuration file in Unknown on line 0 | 17 | Fatal error: [snuffleupagus][0.0.0.0][config][log] Invalid configuration file in Unknown on line 0 |
| 17 | Could not startup. \ No newline at end of file | 18 | Could not startup. |
diff --git a/src/tests/broken_configuration/broken_conf_local_var_12.phpt b/src/tests/broken_configuration/broken_conf_local_var_12.phpt index 2c86d57..962f5ab 100644 --- a/src/tests/broken_configuration/broken_conf_local_var_12.phpt +++ b/src/tests/broken_configuration/broken_conf_local_var_12.phpt | |||
| @@ -2,13 +2,14 @@ | |||
| 2 | Broken configuration | 2 | Broken configuration |
| 3 | --SKIPIF-- | 3 | --SKIPIF-- |
| 4 | <?php if (!extension_loaded("snuffleupagus")) print "skip"; ?> | 4 | <?php if (!extension_loaded("snuffleupagus")) print "skip"; ?> |
| 5 | <?php if (PHP_VERSION_ID >= 80000) print "skip"; ?> | ||
| 5 | --INI-- | 6 | --INI-- |
| 6 | sp.configuration_file={PWD}/config/broken_conf_local_var_12.ini | 7 | sp.configuration_file={PWD}/config/broken_conf_local_var_12.ini |
| 7 | --FILE-- | 8 | --FILE-- |
| 8 | --EXPECT-- | 9 | --EXPECT-- |
| 9 | PHP Fatal error: [snuffleupagus][0.0.0.0][config] Empty value in `var` on line 1 in Unknown on line 0 | 10 | PHP Fatal error: [snuffleupagus][0.0.0.0][config][log] Empty value in `var` on line 1 in Unknown on line 0 |
| 10 | 11 | ||
| 11 | Fatal error: [snuffleupagus][0.0.0.0][config] Empty value in `var` on line 1 in Unknown on line 0 | 12 | Fatal error: [snuffleupagus][0.0.0.0][config][log] Empty value in `var` on line 1 in Unknown on line 0 |
| 12 | 13 | ||
| 13 | Fatal error: [snuffleupagus][0.0.0.0][config] Invalid configuration file in Unknown on line 0 | 14 | Fatal error: [snuffleupagus][0.0.0.0][config][log] Invalid configuration file in Unknown on line 0 |
| 14 | Could not startup. \ No newline at end of file | 15 | Could not startup. |
diff --git a/src/tests/broken_configuration/broken_conf_local_var_13.phpt b/src/tests/broken_configuration/broken_conf_local_var_13.phpt index a42507d..5c33fdd 100644 --- a/src/tests/broken_configuration/broken_conf_local_var_13.phpt +++ b/src/tests/broken_configuration/broken_conf_local_var_13.phpt | |||
| @@ -2,16 +2,17 @@ | |||
| 2 | Broken configuration | 2 | Broken configuration |
| 3 | --SKIPIF-- | 3 | --SKIPIF-- |
| 4 | <?php if (!extension_loaded("snuffleupagus")) print "skip"; ?> | 4 | <?php if (!extension_loaded("snuffleupagus")) print "skip"; ?> |
| 5 | <?php if (PHP_VERSION_ID >= 80000) print "skip"; ?> | ||
| 5 | --INI-- | 6 | --INI-- |
| 6 | sp.configuration_file={PWD}/config/broken_conf_local_var_13.ini | 7 | sp.configuration_file={PWD}/config/broken_conf_local_var_13.ini |
| 7 | --FILE-- | 8 | --FILE-- |
| 8 | --EXPECT-- | 9 | --EXPECT-- |
| 9 | PHP Fatal error: [snuffleupagus][0.0.0.0][config] Invalid `->` position. in Unknown on line 0 | 10 | PHP Fatal error: [snuffleupagus][0.0.0.0][config][log] Invalid `->` position. in Unknown on line 0 |
| 10 | PHP Fatal error: [snuffleupagus][0.0.0.0][config] Invalid value 'asd->asd' for `var` on line 1 in Unknown on line 0 | 11 | PHP Fatal error: [snuffleupagus][0.0.0.0][config][log] Invalid value 'asd->asd' for `var` on line 1 in Unknown on line 0 |
| 11 | 12 | ||
| 12 | Fatal error: [snuffleupagus][0.0.0.0][config] Invalid `->` position. in Unknown on line 0 | 13 | Fatal error: [snuffleupagus][0.0.0.0][config][log] Invalid `->` position. in Unknown on line 0 |
| 13 | 14 | ||
| 14 | Fatal error: [snuffleupagus][0.0.0.0][config] Invalid value 'asd->asd' for `var` on line 1 in Unknown on line 0 | 15 | Fatal error: [snuffleupagus][0.0.0.0][config][log] Invalid value 'asd->asd' for `var` on line 1 in Unknown on line 0 |
| 15 | 16 | ||
| 16 | Fatal error: [snuffleupagus][0.0.0.0][config] Invalid configuration file in Unknown on line 0 | 17 | Fatal error: [snuffleupagus][0.0.0.0][config][log] Invalid configuration file in Unknown on line 0 |
| 17 | Could not startup. \ No newline at end of file | 18 | Could not startup. |
diff --git a/src/tests/broken_configuration/broken_conf_local_var_14.phpt b/src/tests/broken_configuration/broken_conf_local_var_14.phpt index 01c9228..a831ef7 100644 --- a/src/tests/broken_configuration/broken_conf_local_var_14.phpt +++ b/src/tests/broken_configuration/broken_conf_local_var_14.phpt | |||
| @@ -2,16 +2,17 @@ | |||
| 2 | Broken configuration | 2 | Broken configuration |
| 3 | --SKIPIF-- | 3 | --SKIPIF-- |
| 4 | <?php if (!extension_loaded("snuffleupagus")) print "skip"; ?> | 4 | <?php if (!extension_loaded("snuffleupagus")) print "skip"; ?> |
| 5 | <?php if (PHP_VERSION_ID >= 80000) print "skip"; ?> | ||
| 5 | --INI-- | 6 | --INI-- |
| 6 | sp.configuration_file={PWD}/config/broken_conf_local_var_14.ini | 7 | sp.configuration_file={PWD}/config/broken_conf_local_var_14.ini |
| 7 | --FILE-- | 8 | --FILE-- |
| 8 | --EXPECT-- | 9 | --EXPECT-- |
| 9 | PHP Fatal error: [snuffleupagus][0.0.0.0][config] Invalid var name: $i+valid var name . in Unknown on line 0 | 10 | PHP Fatal error: [snuffleupagus][0.0.0.0][config][log] Invalid var name: $i+valid var name . in Unknown on line 0 |
| 10 | PHP Fatal error: [snuffleupagus][0.0.0.0][config] Invalid value '$i+valid var name ' for `var` on line 1 in Unknown on line 0 | 11 | PHP Fatal error: [snuffleupagus][0.0.0.0][config][log] Invalid value '$i+valid var name ' for `var` on line 1 in Unknown on line 0 |
| 11 | 12 | ||
| 12 | Fatal error: [snuffleupagus][0.0.0.0][config] Invalid var name: $i+valid var name . in Unknown on line 0 | 13 | Fatal error: [snuffleupagus][0.0.0.0][config][log] Invalid var name: $i+valid var name . in Unknown on line 0 |
| 13 | 14 | ||
| 14 | Fatal error: [snuffleupagus][0.0.0.0][config] Invalid value '$i+valid var name ' for `var` on line 1 in Unknown on line 0 | 15 | Fatal error: [snuffleupagus][0.0.0.0][config][log] Invalid value '$i+valid var name ' for `var` on line 1 in Unknown on line 0 |
| 15 | 16 | ||
| 16 | Fatal error: [snuffleupagus][0.0.0.0][config] Invalid configuration file in Unknown on line 0 | 17 | Fatal error: [snuffleupagus][0.0.0.0][config][log] Invalid configuration file in Unknown on line 0 |
| 17 | Could not startup. \ No newline at end of file | 18 | Could not startup. |
diff --git a/src/tests/broken_configuration/broken_conf_local_var_15.phpt b/src/tests/broken_configuration/broken_conf_local_var_15.phpt index 8fca43a..5d8c6f1 100644 --- a/src/tests/broken_configuration/broken_conf_local_var_15.phpt +++ b/src/tests/broken_configuration/broken_conf_local_var_15.phpt | |||
| @@ -2,16 +2,17 @@ | |||
| 2 | Broken configuration | 2 | Broken configuration |
| 3 | --SKIPIF-- | 3 | --SKIPIF-- |
| 4 | <?php if (!extension_loaded("snuffleupagus")) print "skip"; ?> | 4 | <?php if (!extension_loaded("snuffleupagus")) print "skip"; ?> |
| 5 | <?php if (PHP_VERSION_ID >= 80000) print "skip"; ?> | ||
| 5 | --INI-- | 6 | --INI-- |
| 6 | sp.configuration_file={PWD}/config/broken_conf_local_var_15.ini | 7 | sp.configuration_file={PWD}/config/broken_conf_local_var_15.ini |
| 7 | --FILE-- | 8 | --FILE-- |
| 8 | --EXPECT-- | 9 | --EXPECT-- |
| 9 | PHP Fatal error: [snuffleupagus][0.0.0.0][config] Invalid var name: $i$$!@#. in Unknown on line 0 | 10 | PHP Fatal error: [snuffleupagus][0.0.0.0][config][log] Invalid var name: $i$$!@#. in Unknown on line 0 |
| 10 | PHP Fatal error: [snuffleupagus][0.0.0.0][config] Invalid value '$i$$!@#->qwe' for `var` on line 1 in Unknown on line 0 | 11 | PHP Fatal error: [snuffleupagus][0.0.0.0][config][log] Invalid value '$i$$!@#->qwe' for `var` on line 1 in Unknown on line 0 |
| 11 | 12 | ||
| 12 | Fatal error: [snuffleupagus][0.0.0.0][config] Invalid var name: $i$$!@#. in Unknown on line 0 | 13 | Fatal error: [snuffleupagus][0.0.0.0][config][log] Invalid var name: $i$$!@#. in Unknown on line 0 |
| 13 | 14 | ||
| 14 | Fatal error: [snuffleupagus][0.0.0.0][config] Invalid value '$i$$!@#->qwe' for `var` on line 1 in Unknown on line 0 | 15 | Fatal error: [snuffleupagus][0.0.0.0][config][log] Invalid value '$i$$!@#->qwe' for `var` on line 1 in Unknown on line 0 |
| 15 | 16 | ||
| 16 | Fatal error: [snuffleupagus][0.0.0.0][config] Invalid configuration file in Unknown on line 0 | 17 | Fatal error: [snuffleupagus][0.0.0.0][config][log] Invalid configuration file in Unknown on line 0 |
| 17 | Could not startup. \ No newline at end of file | 18 | Could not startup. |
diff --git a/src/tests/broken_configuration/broken_conf_local_var_16.phpt b/src/tests/broken_configuration/broken_conf_local_var_16.phpt index 38f2030..47c1f17 100644 --- a/src/tests/broken_configuration/broken_conf_local_var_16.phpt +++ b/src/tests/broken_configuration/broken_conf_local_var_16.phpt | |||
| @@ -2,16 +2,17 @@ | |||
| 2 | Broken configuration | 2 | Broken configuration |
| 3 | --SKIPIF-- | 3 | --SKIPIF-- |
| 4 | <?php if (!extension_loaded("snuffleupagus")) print "skip"; ?> | 4 | <?php if (!extension_loaded("snuffleupagus")) print "skip"; ?> |
| 5 | <?php if (PHP_VERSION_ID >= 80000) print "skip"; ?> | ||
| 5 | --INI-- | 6 | --INI-- |
| 6 | sp.configuration_file={PWD}/config/broken_conf_local_var_16.ini | 7 | sp.configuration_file={PWD}/config/broken_conf_local_var_16.ini |
| 7 | --FILE-- | 8 | --FILE-- |
| 8 | --EXPECT-- | 9 | --EXPECT-- |
| 9 | PHP Fatal error: [snuffleupagus][0.0.0.0][config] Missing a closing quote. in Unknown on line 0 | 10 | PHP Fatal error: [snuffleupagus][0.0.0.0][config][log] Missing a closing quote. in Unknown on line 0 |
| 10 | PHP Fatal error: [snuffleupagus][0.0.0.0][config] Invalid value '"' for `var` on line 1 in Unknown on line 0 | 11 | PHP Fatal error: [snuffleupagus][0.0.0.0][config][log] Invalid value '"' for `var` on line 1 in Unknown on line 0 |
| 11 | 12 | ||
| 12 | Fatal error: [snuffleupagus][0.0.0.0][config] Missing a closing quote. in Unknown on line 0 | 13 | Fatal error: [snuffleupagus][0.0.0.0][config][log] Missing a closing quote. in Unknown on line 0 |
| 13 | 14 | ||
| 14 | Fatal error: [snuffleupagus][0.0.0.0][config] Invalid value '"' for `var` on line 1 in Unknown on line 0 | 15 | Fatal error: [snuffleupagus][0.0.0.0][config][log] Invalid value '"' for `var` on line 1 in Unknown on line 0 |
| 15 | 16 | ||
| 16 | Fatal error: [snuffleupagus][0.0.0.0][config] Invalid configuration file in Unknown on line 0 | 17 | Fatal error: [snuffleupagus][0.0.0.0][config][log] Invalid configuration file in Unknown on line 0 |
| 17 | Could not startup. \ No newline at end of file | 18 | Could not startup. |
diff --git a/src/tests/broken_configuration/broken_conf_local_var_2.phpt b/src/tests/broken_configuration/broken_conf_local_var_2.phpt index 64bdaf3..ec7ac2c 100644 --- a/src/tests/broken_configuration/broken_conf_local_var_2.phpt +++ b/src/tests/broken_configuration/broken_conf_local_var_2.phpt | |||
| @@ -2,16 +2,17 @@ | |||
| 2 | Broken configuration | 2 | Broken configuration |
| 3 | --SKIPIF-- | 3 | --SKIPIF-- |
| 4 | <?php if (!extension_loaded("snuffleupagus")) print "skip"; ?> | 4 | <?php if (!extension_loaded("snuffleupagus")) print "skip"; ?> |
| 5 | <?php if (PHP_VERSION_ID >= 80000) print "skip"; ?> | ||
| 5 | --INI-- | 6 | --INI-- |
| 6 | sp.configuration_file={PWD}/config/broken_conf_local_var_2.ini | 7 | sp.configuration_file={PWD}/config/broken_conf_local_var_2.ini |
| 7 | --FILE-- | 8 | --FILE-- |
| 8 | --EXPECT-- | 9 | --EXPECT-- |
| 9 | PHP Fatal error: [snuffleupagus][0.0.0.0][config] Invalid `"` position. in Unknown on line 0 | 10 | PHP Fatal error: [snuffleupagus][0.0.0.0][config][log] Invalid `"` position. in Unknown on line 0 |
| 10 | PHP Fatal error: [snuffleupagus][0.0.0.0][config] Invalid value '""asd' for `var` on line 1 in Unknown on line 0 | 11 | PHP Fatal error: [snuffleupagus][0.0.0.0][config][log] Invalid value '""asd' for `var` on line 1 in Unknown on line 0 |
| 11 | 12 | ||
| 12 | Fatal error: [snuffleupagus][0.0.0.0][config] Invalid `"` position. in Unknown on line 0 | 13 | Fatal error: [snuffleupagus][0.0.0.0][config][log] Invalid `"` position. in Unknown on line 0 |
| 13 | 14 | ||
| 14 | Fatal error: [snuffleupagus][0.0.0.0][config] Invalid value '""asd' for `var` on line 1 in Unknown on line 0 | 15 | Fatal error: [snuffleupagus][0.0.0.0][config][log] Invalid value '""asd' for `var` on line 1 in Unknown on line 0 |
| 15 | 16 | ||
| 16 | Fatal error: [snuffleupagus][0.0.0.0][config] Invalid configuration file in Unknown on line 0 | 17 | Fatal error: [snuffleupagus][0.0.0.0][config][log] Invalid configuration file in Unknown on line 0 |
| 17 | Could not startup. \ No newline at end of file | 18 | Could not startup. |
diff --git a/src/tests/broken_configuration/broken_conf_local_var_3.phpt b/src/tests/broken_configuration/broken_conf_local_var_3.phpt index e041ad5..776cee0 100644 --- a/src/tests/broken_configuration/broken_conf_local_var_3.phpt +++ b/src/tests/broken_configuration/broken_conf_local_var_3.phpt | |||
| @@ -2,16 +2,17 @@ | |||
| 2 | Broken configuration | 2 | Broken configuration |
| 3 | --SKIPIF-- | 3 | --SKIPIF-- |
| 4 | <?php if (!extension_loaded("snuffleupagus")) print "skip"; ?> | 4 | <?php if (!extension_loaded("snuffleupagus")) print "skip"; ?> |
| 5 | <?php if (PHP_VERSION_ID >= 80000) print "skip"; ?> | ||
| 5 | --INI-- | 6 | --INI-- |
| 6 | sp.configuration_file={PWD}/config/broken_conf_local_var_3.ini | 7 | sp.configuration_file={PWD}/config/broken_conf_local_var_3.ini |
| 7 | --FILE-- | 8 | --FILE-- |
| 8 | --EXPECT-- | 9 | --EXPECT-- |
| 9 | PHP Fatal error: [snuffleupagus][0.0.0.0][config] Invalid `->` position. in Unknown on line 0 | 10 | PHP Fatal error: [snuffleupagus][0.0.0.0][config][log] Invalid `->` position. in Unknown on line 0 |
| 10 | PHP Fatal error: [snuffleupagus][0.0.0.0][config] Invalid value '$qwe->::' for `var` on line 1 in Unknown on line 0 | 11 | PHP Fatal error: [snuffleupagus][0.0.0.0][config][log] Invalid value '$qwe->::' for `var` on line 1 in Unknown on line 0 |
| 11 | 12 | ||
| 12 | Fatal error: [snuffleupagus][0.0.0.0][config] Invalid `->` position. in Unknown on line 0 | 13 | Fatal error: [snuffleupagus][0.0.0.0][config][log] Invalid `->` position. in Unknown on line 0 |
| 13 | 14 | ||
| 14 | Fatal error: [snuffleupagus][0.0.0.0][config] Invalid value '$qwe->::' for `var` on line 1 in Unknown on line 0 | 15 | Fatal error: [snuffleupagus][0.0.0.0][config][log] Invalid value '$qwe->::' for `var` on line 1 in Unknown on line 0 |
| 15 | 16 | ||
| 16 | Fatal error: [snuffleupagus][0.0.0.0][config] Invalid configuration file in Unknown on line 0 | 17 | Fatal error: [snuffleupagus][0.0.0.0][config][log] Invalid configuration file in Unknown on line 0 |
| 17 | Could not startup. \ No newline at end of file | 18 | Could not startup. |
diff --git a/src/tests/broken_configuration/broken_conf_local_var_4.phpt b/src/tests/broken_configuration/broken_conf_local_var_4.phpt index 1c3f673..4390640 100644 --- a/src/tests/broken_configuration/broken_conf_local_var_4.phpt +++ b/src/tests/broken_configuration/broken_conf_local_var_4.phpt | |||
| @@ -2,16 +2,17 @@ | |||
| 2 | Broken configuration | 2 | Broken configuration |
| 3 | --SKIPIF-- | 3 | --SKIPIF-- |
| 4 | <?php if (!extension_loaded("snuffleupagus")) print "skip"; ?> | 4 | <?php if (!extension_loaded("snuffleupagus")) print "skip"; ?> |
| 5 | <?php if (PHP_VERSION_ID >= 80000) print "skip"; ?> | ||
| 5 | --INI-- | 6 | --INI-- |
| 6 | sp.configuration_file={PWD}/config/broken_conf_local_var_4.ini | 7 | sp.configuration_file={PWD}/config/broken_conf_local_var_4.ini |
| 7 | --FILE-- | 8 | --FILE-- |
| 8 | --EXPECT-- | 9 | --EXPECT-- |
| 9 | PHP Fatal error: [snuffleupagus][0.0.0.0][config] Invalid `"` position. in Unknown on line 0 | 10 | PHP Fatal error: [snuffleupagus][0.0.0.0][config][log] Invalid `"` position. in Unknown on line 0 |
| 10 | PHP Fatal error: [snuffleupagus][0.0.0.0][config] Invalid value '"asd"asd[]' for `var` on line 1 in Unknown on line 0 | 11 | PHP Fatal error: [snuffleupagus][0.0.0.0][config][log] Invalid value '"asd"asd[]' for `var` on line 1 in Unknown on line 0 |
| 11 | 12 | ||
| 12 | Fatal error: [snuffleupagus][0.0.0.0][config] Invalid `"` position. in Unknown on line 0 | 13 | Fatal error: [snuffleupagus][0.0.0.0][config][log] Invalid `"` position. in Unknown on line 0 |
| 13 | 14 | ||
| 14 | Fatal error: [snuffleupagus][0.0.0.0][config] Invalid value '"asd"asd[]' for `var` on line 1 in Unknown on line 0 | 15 | Fatal error: [snuffleupagus][0.0.0.0][config][log] Invalid value '"asd"asd[]' for `var` on line 1 in Unknown on line 0 |
| 15 | 16 | ||
| 16 | Fatal error: [snuffleupagus][0.0.0.0][config] Invalid configuration file in Unknown on line 0 | 17 | Fatal error: [snuffleupagus][0.0.0.0][config][log] Invalid configuration file in Unknown on line 0 |
| 17 | Could not startup. \ No newline at end of file | 18 | Could not startup. |
diff --git a/src/tests/broken_configuration/broken_conf_local_var_5.phpt b/src/tests/broken_configuration/broken_conf_local_var_5.phpt index 113ab39..a73056e 100644 --- a/src/tests/broken_configuration/broken_conf_local_var_5.phpt +++ b/src/tests/broken_configuration/broken_conf_local_var_5.phpt | |||
| @@ -2,16 +2,17 @@ | |||
| 2 | Broken configuration | 2 | Broken configuration |
| 3 | --SKIPIF-- | 3 | --SKIPIF-- |
| 4 | <?php if (!extension_loaded("snuffleupagus")) print "skip"; ?> | 4 | <?php if (!extension_loaded("snuffleupagus")) print "skip"; ?> |
| 5 | <?php if (PHP_VERSION_ID >= 80000) print "skip"; ?> | ||
| 5 | --INI-- | 6 | --INI-- |
| 6 | sp.configuration_file={PWD}/config/broken_conf_local_var_5.ini | 7 | sp.configuration_file={PWD}/config/broken_conf_local_var_5.ini |
| 7 | --FILE-- | 8 | --FILE-- |
| 8 | --EXPECT-- | 9 | --EXPECT-- |
| 9 | PHP Fatal error: [snuffleupagus][0.0.0.0][config] Invalid `'` position. in Unknown on line 0 | 10 | PHP Fatal error: [snuffleupagus][0.0.0.0][config][log] Invalid `'` position. in Unknown on line 0 |
| 10 | PHP Fatal error: [snuffleupagus][0.0.0.0][config] Invalid value ''asd'asd[]' for `var` on line 1 in Unknown on line 0 | 11 | PHP Fatal error: [snuffleupagus][0.0.0.0][config][log] Invalid value ''asd'asd[]' for `var` on line 1 in Unknown on line 0 |
| 11 | 12 | ||
| 12 | Fatal error: [snuffleupagus][0.0.0.0][config] Invalid `'` position. in Unknown on line 0 | 13 | Fatal error: [snuffleupagus][0.0.0.0][config][log] Invalid `'` position. in Unknown on line 0 |
| 13 | 14 | ||
| 14 | Fatal error: [snuffleupagus][0.0.0.0][config] Invalid value ''asd'asd[]' for `var` on line 1 in Unknown on line 0 | 15 | Fatal error: [snuffleupagus][0.0.0.0][config][log] Invalid value ''asd'asd[]' for `var` on line 1 in Unknown on line 0 |
| 15 | 16 | ||
| 16 | Fatal error: [snuffleupagus][0.0.0.0][config] Invalid configuration file in Unknown on line 0 | 17 | Fatal error: [snuffleupagus][0.0.0.0][config][log] Invalid configuration file in Unknown on line 0 |
| 17 | Could not startup. \ No newline at end of file | 18 | Could not startup. |
diff --git a/src/tests/broken_configuration/broken_conf_local_var_6.phpt b/src/tests/broken_configuration/broken_conf_local_var_6.phpt index 3d06667..19b2915 100644 --- a/src/tests/broken_configuration/broken_conf_local_var_6.phpt +++ b/src/tests/broken_configuration/broken_conf_local_var_6.phpt | |||
| @@ -2,16 +2,17 @@ | |||
| 2 | Broken configuration | 2 | Broken configuration |
| 3 | --SKIPIF-- | 3 | --SKIPIF-- |
| 4 | <?php if (!extension_loaded("snuffleupagus")) print "skip"; ?> | 4 | <?php if (!extension_loaded("snuffleupagus")) print "skip"; ?> |
| 5 | <?php if (PHP_VERSION_ID >= 80000) print "skip"; ?> | ||
| 5 | --INI-- | 6 | --INI-- |
| 6 | sp.configuration_file={PWD}/config/broken_conf_local_var_6.ini | 7 | sp.configuration_file={PWD}/config/broken_conf_local_var_6.ini |
| 7 | --FILE-- | 8 | --FILE-- |
| 8 | --EXPECT-- | 9 | --EXPECT-- |
| 9 | PHP Fatal error: [snuffleupagus][0.0.0.0][config] Invalid `'` position. in Unknown on line 0 | 10 | PHP Fatal error: [snuffleupagus][0.0.0.0][config][log] Invalid `'` position. in Unknown on line 0 |
| 10 | PHP Fatal error: [snuffleupagus][0.0.0.0][config] Invalid value '''asd' for `var` on line 1 in Unknown on line 0 | 11 | PHP Fatal error: [snuffleupagus][0.0.0.0][config][log] Invalid value '''asd' for `var` on line 1 in Unknown on line 0 |
| 11 | 12 | ||
| 12 | Fatal error: [snuffleupagus][0.0.0.0][config] Invalid `'` position. in Unknown on line 0 | 13 | Fatal error: [snuffleupagus][0.0.0.0][config][log] Invalid `'` position. in Unknown on line 0 |
| 13 | 14 | ||
| 14 | Fatal error: [snuffleupagus][0.0.0.0][config] Invalid value '''asd' for `var` on line 1 in Unknown on line 0 | 15 | Fatal error: [snuffleupagus][0.0.0.0][config][log] Invalid value '''asd' for `var` on line 1 in Unknown on line 0 |
| 15 | 16 | ||
| 16 | Fatal error: [snuffleupagus][0.0.0.0][config] Invalid configuration file in Unknown on line 0 | 17 | Fatal error: [snuffleupagus][0.0.0.0][config][log] Invalid configuration file in Unknown on line 0 |
| 17 | Could not startup. \ No newline at end of file | 18 | Could not startup. |
diff --git a/src/tests/broken_configuration/broken_conf_local_var_7.phpt b/src/tests/broken_configuration/broken_conf_local_var_7.phpt index 11c3da9..62e983f 100644 --- a/src/tests/broken_configuration/broken_conf_local_var_7.phpt +++ b/src/tests/broken_configuration/broken_conf_local_var_7.phpt | |||
| @@ -2,16 +2,17 @@ | |||
| 2 | Broken configuration | 2 | Broken configuration |
| 3 | --SKIPIF-- | 3 | --SKIPIF-- |
| 4 | <?php if (!extension_loaded("snuffleupagus")) print "skip"; ?> | 4 | <?php if (!extension_loaded("snuffleupagus")) print "skip"; ?> |
| 5 | <?php if (PHP_VERSION_ID >= 80000) print "skip"; ?> | ||
| 5 | --INI-- | 6 | --INI-- |
| 6 | sp.configuration_file={PWD}/config/broken_conf_local_var_7.ini | 7 | sp.configuration_file={PWD}/config/broken_conf_local_var_7.ini |
| 7 | --FILE-- | 8 | --FILE-- |
| 8 | --EXPECT-- | 9 | --EXPECT-- |
| 9 | PHP Fatal error: [snuffleupagus][0.0.0.0][config] Invalid `->` position. in Unknown on line 0 | 10 | PHP Fatal error: [snuffleupagus][0.0.0.0][config][log] Invalid `->` position. in Unknown on line 0 |
| 10 | PHP Fatal error: [snuffleupagus][0.0.0.0][config] Invalid value 'asd-->' for `var` on line 1 in Unknown on line 0 | 11 | PHP Fatal error: [snuffleupagus][0.0.0.0][config][log] Invalid value 'asd-->' for `var` on line 1 in Unknown on line 0 |
| 11 | 12 | ||
| 12 | Fatal error: [snuffleupagus][0.0.0.0][config] Invalid `->` position. in Unknown on line 0 | 13 | Fatal error: [snuffleupagus][0.0.0.0][config][log] Invalid `->` position. in Unknown on line 0 |
| 13 | 14 | ||
| 14 | Fatal error: [snuffleupagus][0.0.0.0][config] Invalid value 'asd-->' for `var` on line 1 in Unknown on line 0 | 15 | Fatal error: [snuffleupagus][0.0.0.0][config][log] Invalid value 'asd-->' for `var` on line 1 in Unknown on line 0 |
| 15 | 16 | ||
| 16 | Fatal error: [snuffleupagus][0.0.0.0][config] Invalid configuration file in Unknown on line 0 | 17 | Fatal error: [snuffleupagus][0.0.0.0][config][log] Invalid configuration file in Unknown on line 0 |
| 17 | Could not startup. \ No newline at end of file | 18 | Could not startup. |
diff --git a/src/tests/broken_configuration/broken_conf_local_var_8.phpt b/src/tests/broken_configuration/broken_conf_local_var_8.phpt index 2154284..1d170d2 100644 --- a/src/tests/broken_configuration/broken_conf_local_var_8.phpt +++ b/src/tests/broken_configuration/broken_conf_local_var_8.phpt | |||
| @@ -2,16 +2,17 @@ | |||
| 2 | Broken configuration | 2 | Broken configuration |
| 3 | --SKIPIF-- | 3 | --SKIPIF-- |
| 4 | <?php if (!extension_loaded("snuffleupagus")) print "skip"; ?> | 4 | <?php if (!extension_loaded("snuffleupagus")) print "skip"; ?> |
| 5 | <?php if (PHP_VERSION_ID >= 80000) print "skip"; ?> | ||
| 5 | --INI-- | 6 | --INI-- |
| 6 | sp.configuration_file={PWD}/config/broken_conf_local_var_8.ini | 7 | sp.configuration_file={PWD}/config/broken_conf_local_var_8.ini |
| 7 | --FILE-- | 8 | --FILE-- |
| 8 | --EXPECT-- | 9 | --EXPECT-- |
| 9 | PHP Fatal error: [snuffleupagus][0.0.0.0][config] Invalid `]` position. in Unknown on line 0 | 10 | PHP Fatal error: [snuffleupagus][0.0.0.0][config][log] Invalid `]` position. in Unknown on line 0 |
| 10 | PHP Fatal error: [snuffleupagus][0.0.0.0][config] Invalid value 'asd[asd]"asd"' for `var` on line 1 in Unknown on line 0 | 11 | PHP Fatal error: [snuffleupagus][0.0.0.0][config][log] Invalid value 'asd[asd]"asd"' for `var` on line 1 in Unknown on line 0 |
| 11 | 12 | ||
| 12 | Fatal error: [snuffleupagus][0.0.0.0][config] Invalid `]` position. in Unknown on line 0 | 13 | Fatal error: [snuffleupagus][0.0.0.0][config][log] Invalid `]` position. in Unknown on line 0 |
| 13 | 14 | ||
| 14 | Fatal error: [snuffleupagus][0.0.0.0][config] Invalid value 'asd[asd]"asd"' for `var` on line 1 in Unknown on line 0 | 15 | Fatal error: [snuffleupagus][0.0.0.0][config][log] Invalid value 'asd[asd]"asd"' for `var` on line 1 in Unknown on line 0 |
| 15 | 16 | ||
| 16 | Fatal error: [snuffleupagus][0.0.0.0][config] Invalid configuration file in Unknown on line 0 | 17 | Fatal error: [snuffleupagus][0.0.0.0][config][log] Invalid configuration file in Unknown on line 0 |
| 17 | Could not startup. \ No newline at end of file | 18 | Could not startup. |
diff --git a/src/tests/broken_configuration/broken_conf_local_var_9.phpt b/src/tests/broken_configuration/broken_conf_local_var_9.phpt index ab6ae78..5786e02 100644 --- a/src/tests/broken_configuration/broken_conf_local_var_9.phpt +++ b/src/tests/broken_configuration/broken_conf_local_var_9.phpt | |||
| @@ -2,16 +2,17 @@ | |||
| 2 | Broken configuration | 2 | Broken configuration |
| 3 | --SKIPIF-- | 3 | --SKIPIF-- |
| 4 | <?php if (!extension_loaded("snuffleupagus")) print "skip"; ?> | 4 | <?php if (!extension_loaded("snuffleupagus")) print "skip"; ?> |
| 5 | <?php if (PHP_VERSION_ID >= 80000) print "skip"; ?> | ||
| 5 | --INI-- | 6 | --INI-- |
| 6 | sp.configuration_file={PWD}/config/broken_conf_local_var_9.ini | 7 | sp.configuration_file={PWD}/config/broken_conf_local_var_9.ini |
| 7 | --FILE-- | 8 | --FILE-- |
| 8 | --EXPECT-- | 9 | --EXPECT-- |
| 9 | PHP Fatal error: [snuffleupagus][0.0.0.0][config] Invalid `]` position. in Unknown on line 0 | 10 | PHP Fatal error: [snuffleupagus][0.0.0.0][config][log] Invalid `]` position. in Unknown on line 0 |
| 10 | PHP Fatal error: [snuffleupagus][0.0.0.0][config] Invalid value 'asd[asd]'asd'' for `var` on line 1 in Unknown on line 0 | 11 | PHP Fatal error: [snuffleupagus][0.0.0.0][config][log] Invalid value 'asd[asd]'asd'' for `var` on line 1 in Unknown on line 0 |
| 11 | 12 | ||
| 12 | Fatal error: [snuffleupagus][0.0.0.0][config] Invalid `]` position. in Unknown on line 0 | 13 | Fatal error: [snuffleupagus][0.0.0.0][config][log] Invalid `]` position. in Unknown on line 0 |
| 13 | 14 | ||
| 14 | Fatal error: [snuffleupagus][0.0.0.0][config] Invalid value 'asd[asd]'asd'' for `var` on line 1 in Unknown on line 0 | 15 | Fatal error: [snuffleupagus][0.0.0.0][config][log] Invalid value 'asd[asd]'asd'' for `var` on line 1 in Unknown on line 0 |
| 15 | 16 | ||
| 16 | Fatal error: [snuffleupagus][0.0.0.0][config] Invalid configuration file in Unknown on line 0 | 17 | Fatal error: [snuffleupagus][0.0.0.0][config][log] Invalid configuration file in Unknown on line 0 |
| 17 | Could not startup. \ No newline at end of file | 18 | Could not startup. |
diff --git a/src/tests/broken_configuration/broken_conf_lots_of_quotes.phpt b/src/tests/broken_configuration/broken_conf_lots_of_quotes.phpt index e69da0b..bef62b9 100644 --- a/src/tests/broken_configuration/broken_conf_lots_of_quotes.phpt +++ b/src/tests/broken_configuration/broken_conf_lots_of_quotes.phpt | |||
| @@ -2,13 +2,14 @@ | |||
| 2 | Configuration line with too many quotes | 2 | Configuration line with too many quotes |
| 3 | --SKIPIF-- | 3 | --SKIPIF-- |
| 4 | <?php if (!extension_loaded("snuffleupagus")) print "skip"; ?> | 4 | <?php if (!extension_loaded("snuffleupagus")) print "skip"; ?> |
| 5 | <?php if (PHP_VERSION_ID >= 80000) print "skip"; ?> | ||
| 5 | --INI-- | 6 | --INI-- |
| 6 | sp.configuration_file={PWD}/config/broken_conf_lots_of_quotes.ini | 7 | sp.configuration_file={PWD}/config/broken_conf_lots_of_quotes.ini |
| 7 | --FILE-- | 8 | --FILE-- |
| 8 | --EXPECT-- | 9 | --EXPECT-- |
| 9 | PHP Fatal error: [snuffleupagus][0.0.0.0][error] There is an issue with the parsing of '"this\"is a weird\"\"\"cookie\"name"");': it doesn't look like a valid string on line 1 in Unknown on line 0 | 10 | PHP Fatal error: [snuffleupagus][0.0.0.0][error][log] There is an issue with the parsing of '"this\"is a weird\"\"\"cookie\"name"");': it doesn't look like a valid string on line 1 in Unknown on line 0 |
| 10 | 11 | ||
| 11 | Fatal error: [snuffleupagus][0.0.0.0][error] There is an issue with the parsing of '"this\"is a weird\"\"\"cookie\"name"");': it doesn't look like a valid string on line 1 in Unknown on line 0 | 12 | Fatal error: [snuffleupagus][0.0.0.0][error][log] There is an issue with the parsing of '"this\"is a weird\"\"\"cookie\"name"");': it doesn't look like a valid string on line 1 in Unknown on line 0 |
| 12 | 13 | ||
| 13 | Fatal error: [snuffleupagus][0.0.0.0][config] Invalid configuration file in Unknown on line 0 | 14 | Fatal error: [snuffleupagus][0.0.0.0][config][log] Invalid configuration file in Unknown on line 0 |
| 14 | Could not startup. \ No newline at end of file | 15 | Could not startup. |
diff --git a/src/tests/broken_configuration/broken_conf_missing_script.phpt b/src/tests/broken_configuration/broken_conf_missing_script.phpt index 97d3743..9deffc7 100644 --- a/src/tests/broken_configuration/broken_conf_missing_script.phpt +++ b/src/tests/broken_configuration/broken_conf_missing_script.phpt | |||
| @@ -1,5 +1,7 @@ | |||
| 1 | --TEST-- | 1 | --TEST-- |
| 2 | Invalid configuration file for upload | 2 | Invalid configuration file for upload |
| 3 | --SKIPIF-- | ||
| 4 | <?php if (PHP_VERSION_ID >= 80000) print "skip"; ?> | ||
| 3 | --INI-- | 5 | --INI-- |
| 4 | file_uploads=1 | 6 | file_uploads=1 |
| 5 | sp.configuration_file={PWD}/config/broken_conf_missing_script.ini | 7 | sp.configuration_file={PWD}/config/broken_conf_missing_script.ini |
| @@ -8,9 +10,9 @@ sp.configuration_file={PWD}/config/broken_conf_missing_script.ini | |||
| 8 | echo 1; | 10 | echo 1; |
| 9 | ?> | 11 | ?> |
| 10 | --EXPECTF-- | 12 | --EXPECTF-- |
| 11 | PHP Fatal error: [snuffleupagus][0.0.0.0][config] The `script` directive is mandatory in '.enable();' on line 1 in Unknown on line 0 | 13 | PHP Fatal error: [snuffleupagus][0.0.0.0][config][log] The `script` directive is mandatory in '.enable();' on line 1 in Unknown on line 0 |
| 12 | 14 | ||
| 13 | Fatal error: [snuffleupagus][0.0.0.0][config] The `script` directive is mandatory in '.enable();' on line 1 in Unknown on line 0 | 15 | Fatal error: [snuffleupagus][0.0.0.0][config][log] The `script` directive is mandatory in '.enable();' on line 1 in Unknown on line 0 |
| 14 | 16 | ||
| 15 | Fatal error: [snuffleupagus][0.0.0.0][config] Invalid configuration file in Unknown on line 0 | 17 | Fatal error: [snuffleupagus][0.0.0.0][config][log] Invalid configuration file in Unknown on line 0 |
| 16 | Could not startup. | 18 | Could not startup. |
diff --git a/src/tests/broken_configuration/broken_conf_mutually_exclusive.phpt b/src/tests/broken_configuration/broken_conf_mutually_exclusive.phpt index d76798b..a8036d2 100644 --- a/src/tests/broken_configuration/broken_conf_mutually_exclusive.phpt +++ b/src/tests/broken_configuration/broken_conf_mutually_exclusive.phpt | |||
| @@ -2,10 +2,14 @@ | |||
| 2 | Broken configuration | 2 | Broken configuration |
| 3 | --SKIPIF-- | 3 | --SKIPIF-- |
| 4 | <?php if (!extension_loaded("snuffleupagus")) print "skip"; ?> | 4 | <?php if (!extension_loaded("snuffleupagus")) print "skip"; ?> |
| 5 | <?php if (PHP_VERSION_ID >= 80000) print "skip"; ?> | ||
| 5 | --INI-- | 6 | --INI-- |
| 6 | sp.configuration_file={PWD}/config/broken_conf_mutually_exclusive.ini | 7 | sp.configuration_file={PWD}/config/broken_conf_mutually_exclusive.ini |
| 7 | --FILE-- | 8 | --FILE-- |
| 8 | --EXPECT-- | 9 | --EXPECT-- |
| 9 | PHP Fatal error: [snuffleupagus][0.0.0.0][config] Invalid configuration line: 'sp.disabled_functions.function("system").param("id").value("42").value_r("^id$").drop();': '.value' and '.regexp' are mutually exclusive on line 1 in Unknown on line 0 | 10 | PHP Fatal error: [snuffleupagus][0.0.0.0][config][log] Invalid configuration line: 'sp.disabled_functions.function("system").param("id").value("42").value_r("^id$").drop();': '.r_value' and '.value' are mutually exclusive on line 1 in Unknown on line 0 |
| 10 | 11 | ||
| 11 | Fatal error: [snuffleupagus][0.0.0.0][config] Invalid configuration line: 'sp.disabled_functions.function("system").param("id").value("42").value_r("^id$").drop();': '.value' and '.regexp' are mutually exclusive on line 1 in Unknown on line 0 \ No newline at end of file | 12 | Fatal error: [snuffleupagus][0.0.0.0][config][log] Invalid configuration line: 'sp.disabled_functions.function("system").param("id").value("42").value_r("^id$").drop();': '.r_value' and '.value' are mutually exclusive on line 1 in Unknown on line 0 |
| 13 | |||
| 14 | Fatal error: [snuffleupagus][0.0.0.0][config][log] Invalid configuration file in Unknown on line 0 | ||
| 15 | Could not startup. | ||
diff --git a/src/tests/broken_configuration/broken_conf_mutually_exclusive10.phpt b/src/tests/broken_configuration/broken_conf_mutually_exclusive10.phpt index 9ac8881..932f584 100644 --- a/src/tests/broken_configuration/broken_conf_mutually_exclusive10.phpt +++ b/src/tests/broken_configuration/broken_conf_mutually_exclusive10.phpt | |||
| @@ -2,13 +2,14 @@ | |||
| 2 | Broken configuration - enabled/disabled readonly | 2 | Broken configuration - enabled/disabled readonly |
| 3 | --SKIPIF-- | 3 | --SKIPIF-- |
| 4 | <?php if (!extension_loaded("snuffleupagus")) print "skip"; ?> | 4 | <?php if (!extension_loaded("snuffleupagus")) print "skip"; ?> |
| 5 | <?php if (PHP_VERSION_ID >= 80000) print "skip"; ?> | ||
| 5 | --INI-- | 6 | --INI-- |
| 6 | sp.configuration_file={PWD}/config/broken_conf_mutually_exclusive10.ini | 7 | sp.configuration_file={PWD}/config/broken_conf_mutually_exclusive10.ini |
| 7 | --FILE-- | 8 | --FILE-- |
| 8 | --EXPECT-- | 9 | --EXPECT-- |
| 9 | PHP Fatal error: [snuffleupagus][0.0.0.0][config] A rule can't be enabled and disabled on line 1 in Unknown on line 0 | 10 | PHP Fatal error: [snuffleupagus][0.0.0.0][config][log] A rule can't be enabled and disabled on line 1 in Unknown on line 0 |
| 10 | 11 | ||
| 11 | Fatal error: [snuffleupagus][0.0.0.0][config] A rule can't be enabled and disabled on line 1 in Unknown on line 0 | 12 | Fatal error: [snuffleupagus][0.0.0.0][config][log] A rule can't be enabled and disabled on line 1 in Unknown on line 0 |
| 12 | 13 | ||
| 13 | Fatal error: [snuffleupagus][0.0.0.0][config] Invalid configuration file in Unknown on line 0 | 14 | Fatal error: [snuffleupagus][0.0.0.0][config][log] Invalid configuration file in Unknown on line 0 |
| 14 | Could not startup. \ No newline at end of file | 15 | Could not startup. |
diff --git a/src/tests/broken_configuration/broken_conf_mutually_exclusive11.phpt b/src/tests/broken_configuration/broken_conf_mutually_exclusive11.phpt index 69b2e31..62ae64e 100644 --- a/src/tests/broken_configuration/broken_conf_mutually_exclusive11.phpt +++ b/src/tests/broken_configuration/broken_conf_mutually_exclusive11.phpt | |||
| @@ -2,13 +2,14 @@ | |||
| 2 | Broken configuration - ret and var are mutually exclusives | 2 | Broken configuration - ret and var are mutually exclusives |
| 3 | --SKIPIF-- | 3 | --SKIPIF-- |
| 4 | <?php if (!extension_loaded("snuffleupagus")) print "skip"; ?> | 4 | <?php if (!extension_loaded("snuffleupagus")) print "skip"; ?> |
| 5 | <?php if (PHP_VERSION_ID >= 80000) print "skip"; ?> | ||
| 5 | --INI-- | 6 | --INI-- |
| 6 | sp.configuration_file={PWD}/config/broken_conf_mutually_exclusive11.ini | 7 | sp.configuration_file={PWD}/config/broken_conf_mutually_exclusive11.ini |
| 7 | --FILE-- | 8 | --FILE-- |
| 8 | --EXPECT-- | 9 | --EXPECT-- |
| 9 | PHP Fatal error: [snuffleupagus][0.0.0.0][config] Invalid configuration line: 'sp.disabled_functions.function("strcmp").drop().ret("hip").var("hop");':`ret` and `var` are mutually exclusive on line 1 in Unknown on line 0 | 10 | PHP Fatal error: [snuffleupagus][0.0.0.0][config][log] Invalid configuration line: 'sp.disabled_functions.function("strcmp").drop().ret("hip").var("hop");':`ret` and `var` are mutually exclusive on line 1 in Unknown on line 0 |
| 10 | 11 | ||
| 11 | Fatal error: [snuffleupagus][0.0.0.0][config] Invalid configuration line: 'sp.disabled_functions.function("strcmp").drop().ret("hip").var("hop");':`ret` and `var` are mutually exclusive on line 1 in Unknown on line 0 | 12 | Fatal error: [snuffleupagus][0.0.0.0][config][log] Invalid configuration line: 'sp.disabled_functions.function("strcmp").drop().ret("hip").var("hop");':`ret` and `var` are mutually exclusive on line 1 in Unknown on line 0 |
| 12 | 13 | ||
| 13 | Fatal error: [snuffleupagus][0.0.0.0][config] Invalid configuration file in Unknown on line 0 | 14 | Fatal error: [snuffleupagus][0.0.0.0][config][log] Invalid configuration file in Unknown on line 0 |
| 14 | Could not startup. | 15 | Could not startup. |
diff --git a/src/tests/broken_configuration/broken_conf_mutually_exclusive12.phpt b/src/tests/broken_configuration/broken_conf_mutually_exclusive12.phpt index dac0f16..28b0564 100644 --- a/src/tests/broken_configuration/broken_conf_mutually_exclusive12.phpt +++ b/src/tests/broken_configuration/broken_conf_mutually_exclusive12.phpt | |||
| @@ -2,13 +2,14 @@ | |||
| 2 | Broken configuration - ret and value are mutually exclusive | 2 | Broken configuration - ret and value are mutually exclusive |
| 3 | --SKIPIF-- | 3 | --SKIPIF-- |
| 4 | <?php if (!extension_loaded("snuffleupagus")) print "skip"; ?> | 4 | <?php if (!extension_loaded("snuffleupagus")) print "skip"; ?> |
| 5 | <?php if (PHP_VERSION_ID >= 80000) print "skip"; ?> | ||
| 5 | --INI-- | 6 | --INI-- |
| 6 | sp.configuration_file={PWD}/config/broken_conf_mutually_exclusive12.ini | 7 | sp.configuration_file={PWD}/config/broken_conf_mutually_exclusive12.ini |
| 7 | --FILE-- | 8 | --FILE-- |
| 8 | --EXPECT-- | 9 | --EXPECT-- |
| 9 | PHP Fatal error: [snuffleupagus][0.0.0.0][config] Invalid configuration line: 'sp.disabled_functions.function("strcmp").drop().ret("hip").value("hop");':`ret` and `value` are mutually exclusive on line 1 in Unknown on line 0 | 10 | PHP Fatal error: [snuffleupagus][0.0.0.0][config][log] Invalid configuration line: 'sp.disabled_functions.function("strcmp").drop().ret("hip").value("hop");':`ret` and `value` are mutually exclusive on line 1 in Unknown on line 0 |
| 10 | 11 | ||
| 11 | Fatal error: [snuffleupagus][0.0.0.0][config] Invalid configuration line: 'sp.disabled_functions.function("strcmp").drop().ret("hip").value("hop");':`ret` and `value` are mutually exclusive on line 1 in Unknown on line 0 | 12 | Fatal error: [snuffleupagus][0.0.0.0][config][log] Invalid configuration line: 'sp.disabled_functions.function("strcmp").drop().ret("hip").value("hop");':`ret` and `value` are mutually exclusive on line 1 in Unknown on line 0 |
| 12 | 13 | ||
| 13 | Fatal error: [snuffleupagus][0.0.0.0][config] Invalid configuration file in Unknown on line 0 | 14 | Fatal error: [snuffleupagus][0.0.0.0][config][log] Invalid configuration file in Unknown on line 0 |
| 14 | Could not startup. | 15 | Could not startup. |
diff --git a/src/tests/broken_configuration/broken_conf_mutually_exclusive2.phpt b/src/tests/broken_configuration/broken_conf_mutually_exclusive2.phpt index 6e71f83..cc3a951 100644 --- a/src/tests/broken_configuration/broken_conf_mutually_exclusive2.phpt +++ b/src/tests/broken_configuration/broken_conf_mutually_exclusive2.phpt | |||
| @@ -2,10 +2,14 @@ | |||
| 2 | Broken configuration | 2 | Broken configuration |
| 3 | --SKIPIF-- | 3 | --SKIPIF-- |
| 4 | <?php if (!extension_loaded("snuffleupagus")) print "skip"; ?> | 4 | <?php if (!extension_loaded("snuffleupagus")) print "skip"; ?> |
| 5 | <?php if (PHP_VERSION_ID >= 80000) print "skip"; ?> | ||
| 5 | --INI-- | 6 | --INI-- |
| 6 | sp.configuration_file={PWD}/config/broken_conf_mutually_exclusive2.ini | 7 | sp.configuration_file={PWD}/config/broken_conf_mutually_exclusive2.ini |
| 7 | --FILE-- | 8 | --FILE-- |
| 8 | --EXPECT-- | 9 | --EXPECT-- |
| 9 | PHP Fatal error: [snuffleupagus][0.0.0.0][config] Invalid configuration line: 'sp.disabled_functions.function("system").function_r("system").param("id").value("42").drop();': '.r_function' and '.function' are mutually exclusive on line 1 in Unknown on line 0 | 10 | PHP Fatal error: [snuffleupagus][0.0.0.0][config][log] Invalid configuration line: 'sp.disabled_functions.function("system").function_r("system").param("id").value("42").drop();': '.r_function' and '.function' are mutually exclusive on line 1 in Unknown on line 0 |
| 10 | 11 | ||
| 11 | Fatal error: [snuffleupagus][0.0.0.0][config] Invalid configuration line: 'sp.disabled_functions.function("system").function_r("system").param("id").value("42").drop();': '.r_function' and '.function' are mutually exclusive on line 1 in Unknown on line 0 \ No newline at end of file | 12 | Fatal error: [snuffleupagus][0.0.0.0][config][log] Invalid configuration line: 'sp.disabled_functions.function("system").function_r("system").param("id").value("42").drop();': '.r_function' and '.function' are mutually exclusive on line 1 in Unknown on line 0 |
| 13 | |||
| 14 | Fatal error: [snuffleupagus][0.0.0.0][config][log] Invalid configuration file in Unknown on line 0 | ||
| 15 | Could not startup. | ||
diff --git a/src/tests/broken_configuration/broken_conf_mutually_exclusive3.phpt b/src/tests/broken_configuration/broken_conf_mutually_exclusive3.phpt index 46c589b..ab50266 100644 --- a/src/tests/broken_configuration/broken_conf_mutually_exclusive3.phpt +++ b/src/tests/broken_configuration/broken_conf_mutually_exclusive3.phpt | |||
| @@ -2,10 +2,14 @@ | |||
| 2 | Broken configuration | 2 | Broken configuration |
| 3 | --SKIPIF-- | 3 | --SKIPIF-- |
| 4 | <?php if (!extension_loaded("snuffleupagus")) print "skip"; ?> | 4 | <?php if (!extension_loaded("snuffleupagus")) print "skip"; ?> |
| 5 | <?php if (PHP_VERSION_ID >= 80000) print "skip"; ?> | ||
| 5 | --INI-- | 6 | --INI-- |
| 6 | sp.configuration_file={PWD}/config/broken_conf_mutually_exclusive3.ini | 7 | sp.configuration_file={PWD}/config/broken_conf_mutually_exclusive3.ini |
| 7 | --FILE-- | 8 | --FILE-- |
| 8 | --EXPECT-- | 9 | --EXPECT-- |
| 9 | PHP Fatal error: [snuffleupagus][0.0.0.0][config] Invalid configuration line: 'sp.disabled_functions.function("system").param("id").value("42").filename_r("^id$").filename("pouet.txt").drop();': '.r_filename' and '.filename' are mutually exclusive on line 1 in Unknown on line 0 | 10 | PHP Fatal error: [snuffleupagus][0.0.0.0][config][log] Invalid configuration line: 'sp.disabled_functions.function("system").param("id").value("42").filename_r("^id$").filename("pouet.txt").drop();': '.r_filename' and '.filename' are mutually exclusive on line 1 in Unknown on line 0 |
| 10 | 11 | ||
| 11 | Fatal error: [snuffleupagus][0.0.0.0][config] Invalid configuration line: 'sp.disabled_functions.function("system").param("id").value("42").filename_r("^id$").filename("pouet.txt").drop();': '.r_filename' and '.filename' are mutually exclusive on line 1 in Unknown on line 0 \ No newline at end of file | 12 | Fatal error: [snuffleupagus][0.0.0.0][config][log] Invalid configuration line: 'sp.disabled_functions.function("system").param("id").value("42").filename_r("^id$").filename("pouet.txt").drop();': '.r_filename' and '.filename' are mutually exclusive on line 1 in Unknown on line 0 |
| 13 | |||
| 14 | Fatal error: [snuffleupagus][0.0.0.0][config][log] Invalid configuration file in Unknown on line 0 | ||
| 15 | Could not startup. | ||
diff --git a/src/tests/broken_configuration/broken_conf_mutually_exclusive4.phpt b/src/tests/broken_configuration/broken_conf_mutually_exclusive4.phpt index 84c814b..b848d1a 100644 --- a/src/tests/broken_configuration/broken_conf_mutually_exclusive4.phpt +++ b/src/tests/broken_configuration/broken_conf_mutually_exclusive4.phpt | |||
| @@ -2,13 +2,14 @@ | |||
| 2 | Broken configuration | 2 | Broken configuration |
| 3 | --SKIPIF-- | 3 | --SKIPIF-- |
| 4 | <?php if (!extension_loaded("snuffleupagus")) print "skip"; ?> | 4 | <?php if (!extension_loaded("snuffleupagus")) print "skip"; ?> |
| 5 | <?php if (PHP_VERSION_ID >= 80000) print "skip"; ?> | ||
| 5 | --INI-- | 6 | --INI-- |
| 6 | sp.configuration_file={PWD}/config/broken_conf_mutually_exclusive4.ini | 7 | sp.configuration_file={PWD}/config/broken_conf_mutually_exclusive4.ini |
| 7 | --FILE-- | 8 | --FILE-- |
| 8 | --EXPECT-- | 9 | --EXPECT-- |
| 9 | PHP Fatal error: [snuffleupagus][0.0.0.0][config] Invalid configuration line: 'sp.disabled_functions.function("system").param("id").value("42").param_r("^id$").drop();':'.r_param', '.param' and '.pos' are mutually exclusive on line 1 in Unknown on line 0 | 10 | PHP Fatal error: [snuffleupagus][0.0.0.0][config][log] Invalid configuration line: 'sp.disabled_functions.function("system").param("id").value("42").param_r("^id$").drop();':'.r_param', '.param' and '.pos' are mutually exclusive on line 1 in Unknown on line 0 |
| 10 | 11 | ||
| 11 | Fatal error: [snuffleupagus][0.0.0.0][config] Invalid configuration line: 'sp.disabled_functions.function("system").param("id").value("42").param_r("^id$").drop();':'.r_param', '.param' and '.pos' are mutually exclusive on line 1 in Unknown on line 0 | 12 | Fatal error: [snuffleupagus][0.0.0.0][config][log] Invalid configuration line: 'sp.disabled_functions.function("system").param("id").value("42").param_r("^id$").drop();':'.r_param', '.param' and '.pos' are mutually exclusive on line 1 in Unknown on line 0 |
| 12 | 13 | ||
| 13 | Fatal error: [snuffleupagus][0.0.0.0][config] Invalid configuration file in Unknown on line 0 | 14 | Fatal error: [snuffleupagus][0.0.0.0][config][log] Invalid configuration file in Unknown on line 0 |
| 14 | Could not startup. \ No newline at end of file | 15 | Could not startup. |
diff --git a/src/tests/broken_configuration/broken_conf_mutually_exclusive5.phpt b/src/tests/broken_configuration/broken_conf_mutually_exclusive5.phpt index e8c1f75..c668643 100644 --- a/src/tests/broken_configuration/broken_conf_mutually_exclusive5.phpt +++ b/src/tests/broken_configuration/broken_conf_mutually_exclusive5.phpt | |||
| @@ -2,10 +2,14 @@ | |||
| 2 | Broken configuration | 2 | Broken configuration |
| 3 | --SKIPIF-- | 3 | --SKIPIF-- |
| 4 | <?php if (!extension_loaded("snuffleupagus")) print "skip"; ?> | 4 | <?php if (!extension_loaded("snuffleupagus")) print "skip"; ?> |
| 5 | <?php if (PHP_VERSION_ID >= 80000) print "skip"; ?> | ||
| 5 | --INI-- | 6 | --INI-- |
| 6 | sp.configuration_file={PWD}/config/broken_conf_mutually_exclusive5.ini | 7 | sp.configuration_file={PWD}/config/broken_conf_mutually_exclusive5.ini |
| 7 | --FILE-- | 8 | --FILE-- |
| 8 | --EXPECT-- | 9 | --EXPECT-- |
| 9 | PHP Fatal error: [snuffleupagus][0.0.0.0][config] Invalid configuration line: 'sp.disabled_functions.function("system").ret("0").drop().ret_r("^0$");': '.r_ret' and '.ret' are mutually exclusive on line 1 in Unknown on line 0 | 10 | PHP Fatal error: [snuffleupagus][0.0.0.0][config][log] Invalid configuration line: 'sp.disabled_functions.function("system").ret("0").drop().ret_r("^0$");': '.r_ret' and '.ret' are mutually exclusive on line 1 in Unknown on line 0 |
| 10 | 11 | ||
| 11 | Fatal error: [snuffleupagus][0.0.0.0][config] Invalid configuration line: 'sp.disabled_functions.function("system").ret("0").drop().ret_r("^0$");': '.r_ret' and '.ret' are mutually exclusive on line 1 in Unknown on line 0 \ No newline at end of file | 12 | Fatal error: [snuffleupagus][0.0.0.0][config][log] Invalid configuration line: 'sp.disabled_functions.function("system").ret("0").drop().ret_r("^0$");': '.r_ret' and '.ret' are mutually exclusive on line 1 in Unknown on line 0 |
| 13 | |||
| 14 | Fatal error: [snuffleupagus][0.0.0.0][config][log] Invalid configuration file in Unknown on line 0 | ||
| 15 | Could not startup. | ||
diff --git a/src/tests/broken_configuration/broken_conf_mutually_exclusive6.phpt b/src/tests/broken_configuration/broken_conf_mutually_exclusive6.phpt index bbbb179..94ed765 100644 --- a/src/tests/broken_configuration/broken_conf_mutually_exclusive6.phpt +++ b/src/tests/broken_configuration/broken_conf_mutually_exclusive6.phpt | |||
| @@ -2,13 +2,14 @@ | |||
| 2 | Broken configuration | 2 | Broken configuration |
| 3 | --SKIPIF-- | 3 | --SKIPIF-- |
| 4 | <?php if (!extension_loaded("snuffleupagus")) print "skip"; ?> | 4 | <?php if (!extension_loaded("snuffleupagus")) print "skip"; ?> |
| 5 | <?php if (PHP_VERSION_ID >= 80000) print "skip"; ?> | ||
| 5 | --INI-- | 6 | --INI-- |
| 6 | sp.configuration_file={PWD}/config/broken_conf_mutually_exclusive6.ini | 7 | sp.configuration_file={PWD}/config/broken_conf_mutually_exclusive6.ini |
| 7 | --FILE-- | 8 | --FILE-- |
| 8 | --EXPECT-- | 9 | --EXPECT-- |
| 9 | PHP Fatal error: [snuffleupagus][0.0.0.0][config] Invalid configuration line: 'sp.disabled_functions.function("system").param("id").value("42").ret_r("^0$").drop();':`ret` and `param` are mutually exclusive on line 1 in Unknown on line 0 | 10 | PHP Fatal error: [snuffleupagus][0.0.0.0][config][log] Invalid configuration line: 'sp.disabled_functions.function("system").param("id").value("42").ret_r("^0$").drop();':`ret` and `param` are mutually exclusive on line 1 in Unknown on line 0 |
| 10 | 11 | ||
| 11 | Fatal error: [snuffleupagus][0.0.0.0][config] Invalid configuration line: 'sp.disabled_functions.function("system").param("id").value("42").ret_r("^0$").drop();':`ret` and `param` are mutually exclusive on line 1 in Unknown on line 0 | 12 | Fatal error: [snuffleupagus][0.0.0.0][config][log] Invalid configuration line: 'sp.disabled_functions.function("system").param("id").value("42").ret_r("^0$").drop();':`ret` and `param` are mutually exclusive on line 1 in Unknown on line 0 |
| 12 | 13 | ||
| 13 | Fatal error: [snuffleupagus][0.0.0.0][config] Invalid configuration file in Unknown on line 0 | 14 | Fatal error: [snuffleupagus][0.0.0.0][config][log] Invalid configuration file in Unknown on line 0 |
| 14 | Could not startup. \ No newline at end of file | 15 | Could not startup. |
diff --git a/src/tests/broken_configuration/broken_conf_mutually_exclusive7.phpt b/src/tests/broken_configuration/broken_conf_mutually_exclusive7.phpt index ecd39a0..2a16d0c 100644 --- a/src/tests/broken_configuration/broken_conf_mutually_exclusive7.phpt +++ b/src/tests/broken_configuration/broken_conf_mutually_exclusive7.phpt | |||
| @@ -2,13 +2,14 @@ | |||
| 2 | Broken configuration | 2 | Broken configuration |
| 3 | --SKIPIF-- | 3 | --SKIPIF-- |
| 4 | <?php if (!extension_loaded("snuffleupagus")) print "skip"; ?> | 4 | <?php if (!extension_loaded("snuffleupagus")) print "skip"; ?> |
| 5 | <?php if (PHP_VERSION_ID >= 80000) print "skip"; ?> | ||
| 5 | --INI-- | 6 | --INI-- |
| 6 | sp.configuration_file={PWD}/config/broken_conf_mutually_exclusive7.ini | 7 | sp.configuration_file={PWD}/config/broken_conf_mutually_exclusive7.ini |
| 7 | --FILE-- | 8 | --FILE-- |
| 8 | --EXPECT-- | 9 | --EXPECT-- |
| 9 | PHP Fatal error: [snuffleupagus][0.0.0.0][config] Invalid configuration line: 'sp.disabled_functions.function("system").ret("0").drop().allow();': The rule must either be a `drop` or `allow` one on line 1 in Unknown on line 0 | 10 | PHP Fatal error: [snuffleupagus][0.0.0.0][config][log] Invalid configuration line: 'sp.disabled_functions.function("system").ret("0").drop().allow();': The rule must either be a `drop` or `allow` one on line 1 in Unknown on line 0 |
| 10 | 11 | ||
| 11 | Fatal error: [snuffleupagus][0.0.0.0][config] Invalid configuration line: 'sp.disabled_functions.function("system").ret("0").drop().allow();': The rule must either be a `drop` or `allow` one on line 1 in Unknown on line 0 | 12 | Fatal error: [snuffleupagus][0.0.0.0][config][log] Invalid configuration line: 'sp.disabled_functions.function("system").ret("0").drop().allow();': The rule must either be a `drop` or `allow` one on line 1 in Unknown on line 0 |
| 12 | 13 | ||
| 13 | Fatal error: [snuffleupagus][0.0.0.0][config] Invalid configuration file in Unknown on line 0 | 14 | Fatal error: [snuffleupagus][0.0.0.0][config][log] Invalid configuration file in Unknown on line 0 |
| 14 | Could not startup. \ No newline at end of file | 15 | Could not startup. |
diff --git a/src/tests/broken_configuration/broken_conf_mutually_exclusive8.phpt b/src/tests/broken_configuration/broken_conf_mutually_exclusive8.phpt index f9e4692..129707d 100644 --- a/src/tests/broken_configuration/broken_conf_mutually_exclusive8.phpt +++ b/src/tests/broken_configuration/broken_conf_mutually_exclusive8.phpt | |||
| @@ -2,13 +2,14 @@ | |||
| 2 | Broken configuration | 2 | Broken configuration |
| 3 | --SKIPIF-- | 3 | --SKIPIF-- |
| 4 | <?php if (!extension_loaded("snuffleupagus")) print "skip"; ?> | 4 | <?php if (!extension_loaded("snuffleupagus")) print "skip"; ?> |
| 5 | <?php if (PHP_VERSION_ID >= 80000) print "skip"; ?> | ||
| 5 | --INI-- | 6 | --INI-- |
| 6 | sp.configuration_file={PWD}/config/broken_conf_mutually_exclusive8.ini | 7 | sp.configuration_file={PWD}/config/broken_conf_mutually_exclusive8.ini |
| 7 | --FILE-- | 8 | --FILE-- |
| 8 | --EXPECT-- | 9 | --EXPECT-- |
| 9 | PHP Fatal error: [snuffleupagus][0.0.0.0][config] Invalid configuration line: 'sp.disabled_functions.ret("0").drop();': must take a function name on line 1 in Unknown on line 0 | 10 | PHP Fatal error: [snuffleupagus][0.0.0.0][config][log] Invalid configuration line: 'sp.disabled_functions.ret("0").drop();': must take a function name on line 1 in Unknown on line 0 |
| 10 | 11 | ||
| 11 | Fatal error: [snuffleupagus][0.0.0.0][config] Invalid configuration line: 'sp.disabled_functions.ret("0").drop();': must take a function name on line 1 in Unknown on line 0 | 12 | Fatal error: [snuffleupagus][0.0.0.0][config][log] Invalid configuration line: 'sp.disabled_functions.ret("0").drop();': must take a function name on line 1 in Unknown on line 0 |
| 12 | 13 | ||
| 13 | Fatal error: [snuffleupagus][0.0.0.0][config] Invalid configuration file in Unknown on line 0 | 14 | Fatal error: [snuffleupagus][0.0.0.0][config][log] Invalid configuration file in Unknown on line 0 |
| 14 | Could not startup. \ No newline at end of file | 15 | Could not startup. |
diff --git a/src/tests/broken_configuration/broken_conf_mutually_exclusive9.phpt b/src/tests/broken_configuration/broken_conf_mutually_exclusive9.phpt index 0b574eb..b384d77 100644 --- a/src/tests/broken_configuration/broken_conf_mutually_exclusive9.phpt +++ b/src/tests/broken_configuration/broken_conf_mutually_exclusive9.phpt | |||
| @@ -2,13 +2,14 @@ | |||
| 2 | Broken configuration - enabled/disabled unserialize | 2 | Broken configuration - enabled/disabled unserialize |
| 3 | --SKIPIF-- | 3 | --SKIPIF-- |
| 4 | <?php if (!extension_loaded("snuffleupagus")) print "skip"; ?> | 4 | <?php if (!extension_loaded("snuffleupagus")) print "skip"; ?> |
| 5 | <?php if (PHP_VERSION_ID >= 80000) print "skip"; ?> | ||
| 5 | --INI-- | 6 | --INI-- |
| 6 | sp.configuration_file={PWD}/config/broken_conf_mutually_exclusive9.ini | 7 | sp.configuration_file={PWD}/config/broken_conf_mutually_exclusive9.ini |
| 7 | --FILE-- | 8 | --FILE-- |
| 8 | --EXPECT-- | 9 | --EXPECT-- |
| 9 | PHP Fatal error: [snuffleupagus][0.0.0.0][config] A rule can't be enabled and disabled on line 1 in Unknown on line 0 | 10 | PHP Fatal error: [snuffleupagus][0.0.0.0][config][log] A rule can't be enabled and disabled on line 1 in Unknown on line 0 |
| 10 | 11 | ||
| 11 | Fatal error: [snuffleupagus][0.0.0.0][config] A rule can't be enabled and disabled on line 1 in Unknown on line 0 | 12 | Fatal error: [snuffleupagus][0.0.0.0][config][log] A rule can't be enabled and disabled on line 1 in Unknown on line 0 |
| 12 | 13 | ||
| 13 | Fatal error: [snuffleupagus][0.0.0.0][config] Invalid configuration file in Unknown on line 0 | 14 | Fatal error: [snuffleupagus][0.0.0.0][config][log] Invalid configuration file in Unknown on line 0 |
| 14 | Could not startup. \ No newline at end of file | 15 | Could not startup. |
diff --git a/src/tests/broken_configuration/broken_conf_no_cookie_action.phpt b/src/tests/broken_configuration/broken_conf_no_cookie_action.phpt index d2ee961..62831d4 100644 --- a/src/tests/broken_configuration/broken_conf_no_cookie_action.phpt +++ b/src/tests/broken_configuration/broken_conf_no_cookie_action.phpt | |||
| @@ -2,13 +2,14 @@ | |||
| 2 | Bad config, invalid action. | 2 | Bad config, invalid action. |
| 3 | --SKIPIF-- | 3 | --SKIPIF-- |
| 4 | <?php if (!extension_loaded("snuffleupagus")) print "skip"; ?> | 4 | <?php if (!extension_loaded("snuffleupagus")) print "skip"; ?> |
| 5 | <?php if (PHP_VERSION_ID >= 80000) print "skip"; ?> | ||
| 5 | --INI-- | 6 | --INI-- |
| 6 | sp.configuration_file={PWD}/config/broken_conf_cookie_action.ini | 7 | sp.configuration_file={PWD}/config/broken_conf_cookie_action.ini |
| 7 | --FILE-- | 8 | --FILE-- |
| 8 | --EXPECT-- | 9 | --EXPECT-- |
| 9 | PHP Fatal error: [snuffleupagus][0.0.0.0][config] You must specify a at least one action to a cookie on line 1 in Unknown on line 0 | 10 | PHP Fatal error: [snuffleupagus][0.0.0.0][config][log] You must specify a at least one action to a cookie on line 1 in Unknown on line 0 |
| 10 | 11 | ||
| 11 | Fatal error: [snuffleupagus][0.0.0.0][config] You must specify a at least one action to a cookie on line 1 in Unknown on line 0 | 12 | Fatal error: [snuffleupagus][0.0.0.0][config][log] You must specify a at least one action to a cookie on line 1 in Unknown on line 0 |
| 12 | 13 | ||
| 13 | Fatal error: [snuffleupagus][0.0.0.0][config] Invalid configuration file in Unknown on line 0 | 14 | Fatal error: [snuffleupagus][0.0.0.0][config][log] Invalid configuration file in Unknown on line 0 |
| 14 | Could not startup. \ No newline at end of file | 15 | Could not startup. |
diff --git a/src/tests/broken_configuration/broken_conf_no_cookie_name.phpt b/src/tests/broken_configuration/broken_conf_no_cookie_name.phpt index ec82655..51d2980 100644 --- a/src/tests/broken_configuration/broken_conf_no_cookie_name.phpt +++ b/src/tests/broken_configuration/broken_conf_no_cookie_name.phpt | |||
| @@ -1,14 +1,15 @@ | |||
| 1 | --TEST-- | 1 | --TEST-- |
| 2 | Borken configuration - encrypted cookie with no name | 2 | Broken configuration - encrypted cookie with no name |
| 3 | --SKIPIF-- | 3 | --SKIPIF-- |
| 4 | <?php if (!extension_loaded("snuffleupagus")) print "skip"; ?> | 4 | <?php if (!extension_loaded("snuffleupagus")) print "skip"; ?> |
| 5 | <?php if (PHP_VERSION_ID >= 80000) print "skip"; ?> | ||
| 5 | --INI-- | 6 | --INI-- |
| 6 | sp.configuration_file={PWD}/config/config_encrypted_cookies_noname.ini | 7 | sp.configuration_file={PWD}/config/config_encrypted_cookies_noname.ini |
| 7 | --FILE-- | 8 | --FILE-- |
| 8 | --EXPECT-- | 9 | --EXPECT-- |
| 9 | PHP Fatal error: [snuffleupagus][0.0.0.0][config] You must specify a cookie name/regexp on line 2 in Unknown on line 0 | 10 | PHP Fatal error: [snuffleupagus][0.0.0.0][config][log] You must specify a cookie name/regexp on line 2 in Unknown on line 0 |
| 10 | 11 | ||
| 11 | Fatal error: [snuffleupagus][0.0.0.0][config] You must specify a cookie name/regexp on line 2 in Unknown on line 0 | 12 | Fatal error: [snuffleupagus][0.0.0.0][config][log] You must specify a cookie name/regexp on line 2 in Unknown on line 0 |
| 12 | 13 | ||
| 13 | Fatal error: [snuffleupagus][0.0.0.0][config] Invalid configuration file in Unknown on line 0 | 14 | Fatal error: [snuffleupagus][0.0.0.0][config][log] Invalid configuration file in Unknown on line 0 |
| 14 | Could not startup. \ No newline at end of file | 15 | Could not startup. |
diff --git a/src/tests/broken_configuration/broken_conf_no_file_specified.phpt b/src/tests/broken_configuration/broken_conf_no_file_specified.phpt index 98ec80c..cb2d95f 100644 --- a/src/tests/broken_configuration/broken_conf_no_file_specified.phpt +++ b/src/tests/broken_configuration/broken_conf_no_file_specified.phpt | |||
| @@ -6,5 +6,5 @@ Broken configuration - No configuration file specified | |||
| 6 | --FILE-- | 6 | --FILE-- |
| 7 | <?php echo "1\n"; ?> | 7 | <?php echo "1\n"; ?> |
| 8 | --EXPECT-- | 8 | --EXPECT-- |
| 9 | Fatal error: [snuffleupagus][0.0.0.0][config] Invalid configuration file in Unknown on line 0 | 9 | Warning: [snuffleupagus][0.0.0.0][config][log] No configuration specificed via sp.configuration_file in Unknown on line 0 |
| 10 | Could not startup. | 10 | 1 |
diff --git a/src/tests/broken_configuration/broken_conf_nonexisting_script.phpt b/src/tests/broken_configuration/broken_conf_nonexisting_script.phpt index b518295..fa891d8 100644 --- a/src/tests/broken_configuration/broken_conf_nonexisting_script.phpt +++ b/src/tests/broken_configuration/broken_conf_nonexisting_script.phpt | |||
| @@ -1,5 +1,7 @@ | |||
| 1 | --TEST-- | 1 | --TEST-- |
| 2 | Invalid configuration file for upload | 2 | Invalid configuration file for upload |
| 3 | --SKIPIF-- | ||
| 4 | <?php if (PHP_VERSION_ID >= 80000) print "skip"; ?> | ||
| 3 | --INI-- | 5 | --INI-- |
| 4 | file_uploads=1 | 6 | file_uploads=1 |
| 5 | sp.configuration_file={PWD}/config/broken_conf_nonexisting_script.ini | 7 | sp.configuration_file={PWD}/config/broken_conf_nonexisting_script.ini |
| @@ -8,9 +10,9 @@ sp.configuration_file={PWD}/config/broken_conf_nonexisting_script.ini | |||
| 8 | echo 1; | 10 | echo 1; |
| 9 | ?> | 11 | ?> |
| 10 | --EXPECTF-- | 12 | --EXPECTF-- |
| 11 | PHP Fatal error: [snuffleupagus][0.0.0.0][config] The `script` (./non_existing_script.sh) doesn't exist on line 1 in Unknown on line 0 | 13 | PHP Fatal error: [snuffleupagus][0.0.0.0][config][log] The `script` (./non_existing_script.sh) doesn't exist on line 1 in Unknown on line 0 |
| 12 | 14 | ||
| 13 | Fatal error: [snuffleupagus][0.0.0.0][config] The `script` (./non_existing_script.sh) doesn't exist on line 1 in Unknown on line 0 | 15 | Fatal error: [snuffleupagus][0.0.0.0][config][log] The `script` (./non_existing_script.sh) doesn't exist on line 1 in Unknown on line 0 |
| 14 | 16 | ||
| 15 | Fatal error: [snuffleupagus][0.0.0.0][config] Invalid configuration file in Unknown on line 0 | 17 | Fatal error: [snuffleupagus][0.0.0.0][config][log] Invalid configuration file in Unknown on line 0 |
| 16 | Could not startup. | 18 | Could not startup. |
diff --git a/src/tests/broken_configuration/broken_conf_quotes.phpt b/src/tests/broken_configuration/broken_conf_quotes.phpt index 86fac81..5b7b839 100644 --- a/src/tests/broken_configuration/broken_conf_quotes.phpt +++ b/src/tests/broken_configuration/broken_conf_quotes.phpt | |||
| @@ -2,16 +2,17 @@ | |||
| 2 | Broken configuration - missing quote | 2 | Broken configuration - missing quote |
| 3 | --SKIPIF-- | 3 | --SKIPIF-- |
| 4 | <?php if (!extension_loaded("snuffleupagus")) print "skip"; ?> | 4 | <?php if (!extension_loaded("snuffleupagus")) print "skip"; ?> |
| 5 | <?php if (PHP_VERSION_ID >= 80000) print "skip"; ?> | ||
| 5 | --INI-- | 6 | --INI-- |
| 6 | sp.configuration_file={PWD}/config/broken_conf_quotes.ini | 7 | sp.configuration_file={PWD}/config/broken_conf_quotes.ini |
| 7 | --FILE-- | 8 | --FILE-- |
| 8 | --EXPECT-- | 9 | --EXPECT-- |
| 9 | PHP Fatal error: [snuffleupagus][0.0.0.0][config] You forgot to close a bracket. in Unknown on line 0 | 10 | PHP Fatal error: [snuffleupagus][0.0.0.0][config][log] You forgot to close a bracket. in Unknown on line 0 |
| 10 | PHP Fatal error: [snuffleupagus][0.0.0.0][config] Invalid value '_SERVER[PHP_SELF' for `var` on line 1 in Unknown on line 0 | 11 | PHP Fatal error: [snuffleupagus][0.0.0.0][config][log] Invalid value '_SERVER[PHP_SELF' for `var` on line 1 in Unknown on line 0 |
| 11 | 12 | ||
| 12 | Fatal error: [snuffleupagus][0.0.0.0][config] You forgot to close a bracket. in Unknown on line 0 | 13 | Fatal error: [snuffleupagus][0.0.0.0][config][log] You forgot to close a bracket. in Unknown on line 0 |
| 13 | 14 | ||
| 14 | Fatal error: [snuffleupagus][0.0.0.0][config] Invalid value '_SERVER[PHP_SELF' for `var` on line 1 in Unknown on line 0 | 15 | Fatal error: [snuffleupagus][0.0.0.0][config][log] Invalid value '_SERVER[PHP_SELF' for `var` on line 1 in Unknown on line 0 |
| 15 | 16 | ||
| 16 | Fatal error: [snuffleupagus][0.0.0.0][config] Invalid configuration file in Unknown on line 0 | 17 | Fatal error: [snuffleupagus][0.0.0.0][config][log] Invalid configuration file in Unknown on line 0 |
| 17 | Could not startup. \ No newline at end of file | 18 | Could not startup. |
diff --git a/src/tests/broken_configuration/broken_conf_readonly_exec.phpt b/src/tests/broken_configuration/broken_conf_readonly_exec.phpt index ca92aab..78b2b9a 100644 --- a/src/tests/broken_configuration/broken_conf_readonly_exec.phpt +++ b/src/tests/broken_configuration/broken_conf_readonly_exec.phpt | |||
| @@ -1,5 +1,7 @@ | |||
| 1 | --TEST-- | 1 | --TEST-- |
| 2 | Invalid configuration file for readonly_exec | 2 | Invalid configuration file for readonly_exec |
| 3 | --SKIPIF-- | ||
| 4 | <?php if (PHP_VERSION_ID >= 80000) print "skip"; ?> | ||
| 3 | --INI-- | 5 | --INI-- |
| 4 | file_uploads=1 | 6 | file_uploads=1 |
| 5 | sp.configuration_file={PWD}/config/broken_conf_readonly_exec.ini | 7 | sp.configuration_file={PWD}/config/broken_conf_readonly_exec.ini |
| @@ -8,9 +10,9 @@ sp.configuration_file={PWD}/config/broken_conf_readonly_exec.ini | |||
| 8 | echo 1; | 10 | echo 1; |
| 9 | ?> | 11 | ?> |
| 10 | --EXPECTF-- | 12 | --EXPECTF-- |
| 11 | PHP Fatal error: [snuffleupagus][0.0.0.0][config] Trailing chars '234);' at the end of '.enable(1234);' on line 1 in Unknown on line 0 | 13 | PHP Fatal error: [snuffleupagus][0.0.0.0][config][log] Trailing chars '234);' at the end of '.enable(1234);' on line 1 in Unknown on line 0 |
| 12 | 14 | ||
| 13 | Fatal error: [snuffleupagus][0.0.0.0][config] Trailing chars '234);' at the end of '.enable(1234);' on line 1 in Unknown on line 0 | 15 | Fatal error: [snuffleupagus][0.0.0.0][config][log] Trailing chars '234);' at the end of '.enable(1234);' on line 1 in Unknown on line 0 |
| 14 | 16 | ||
| 15 | Fatal error: [snuffleupagus][0.0.0.0][config] Invalid configuration file in Unknown on line 0 | 17 | Fatal error: [snuffleupagus][0.0.0.0][config][log] Invalid configuration file in Unknown on line 0 |
| 16 | Could not startup. | 18 | Could not startup. |
diff --git a/src/tests/broken_configuration/broken_conf_samesite.phpt b/src/tests/broken_configuration/broken_conf_samesite.phpt index f325891..e4940c9 100644 --- a/src/tests/broken_configuration/broken_conf_samesite.phpt +++ b/src/tests/broken_configuration/broken_conf_samesite.phpt | |||
| @@ -2,13 +2,14 @@ | |||
| 2 | Bad config, invalid samesite type. | 2 | Bad config, invalid samesite type. |
| 3 | --SKIPIF-- | 3 | --SKIPIF-- |
| 4 | <?php if (!extension_loaded("snuffleupagus")) print "skip"; ?> | 4 | <?php if (!extension_loaded("snuffleupagus")) print "skip"; ?> |
| 5 | <?php if (PHP_VERSION_ID >= 80000) print "skip"; ?> | ||
| 5 | --INI-- | 6 | --INI-- |
| 6 | sp.configuration_file={PWD}/config/broken_conf_cookie_samesite.ini | 7 | sp.configuration_file={PWD}/config/broken_conf_cookie_samesite.ini |
| 7 | --FILE-- | 8 | --FILE-- |
| 8 | --EXPECT-- | 9 | --EXPECT-- |
| 9 | PHP Fatal error: [snuffleupagus][0.0.0.0][config] nop is an invalid value to samesite (expected Lax or Strict) on line 1 in Unknown on line 0 | 10 | PHP Fatal error: [snuffleupagus][0.0.0.0][config][log] nop is an invalid value to samesite (expected Lax or Strict) on line 1 in Unknown on line 0 |
| 10 | 11 | ||
| 11 | Fatal error: [snuffleupagus][0.0.0.0][config] nop is an invalid value to samesite (expected Lax or Strict) on line 1 in Unknown on line 0 | 12 | Fatal error: [snuffleupagus][0.0.0.0][config][log] nop is an invalid value to samesite (expected Lax or Strict) on line 1 in Unknown on line 0 |
| 12 | 13 | ||
| 13 | Fatal error: [snuffleupagus][0.0.0.0][config] Invalid configuration file in Unknown on line 0 | 14 | Fatal error: [snuffleupagus][0.0.0.0][config][log] Invalid configuration file in Unknown on line 0 |
| 14 | Could not startup. \ No newline at end of file | 15 | Could not startup. |
diff --git a/src/tests/broken_configuration/broken_conf_session_encryption.phpt b/src/tests/broken_configuration/broken_conf_session_encryption.phpt index a010bd1..9dbedc1 100644 --- a/src/tests/broken_configuration/broken_conf_session_encryption.phpt +++ b/src/tests/broken_configuration/broken_conf_session_encryption.phpt | |||
| @@ -2,13 +2,14 @@ | |||
| 2 | Broken config, session encryption | 2 | Broken config, session encryption |
| 3 | --SKIPIF-- | 3 | --SKIPIF-- |
| 4 | <?php if (!extension_loaded("snuffleupagus")) print "skip"; ?> | 4 | <?php if (!extension_loaded("snuffleupagus")) print "skip"; ?> |
| 5 | <?php if (PHP_VERSION_ID >= 80000) print "skip"; ?> | ||
| 5 | --INI-- | 6 | --INI-- |
| 6 | sp.configuration_file={PWD}/config/broken_conf_session_encryption.ini | 7 | sp.configuration_file={PWD}/config/broken_conf_session_encryption.ini |
| 7 | --FILE-- | 8 | --FILE-- |
| 8 | --EXPECT-- | 9 | --EXPECT-- |
| 9 | PHP Fatal error: [snuffleupagus][0.0.0.0][config] Trailing chars 'nvalid value :/);' at the end of '.encrypt(invalid value :/);' on line 1 in Unknown on line 0 | 10 | PHP Fatal error: [snuffleupagus][0.0.0.0][config][log] Trailing chars 'nvalid value :/);' at the end of '.encrypt(invalid value :/);' on line 1 in Unknown on line 0 |
| 10 | 11 | ||
| 11 | Fatal error: [snuffleupagus][0.0.0.0][config] Trailing chars 'nvalid value :/);' at the end of '.encrypt(invalid value :/);' on line 1 in Unknown on line 0 | 12 | Fatal error: [snuffleupagus][0.0.0.0][config][log] Trailing chars 'nvalid value :/);' at the end of '.encrypt(invalid value :/);' on line 1 in Unknown on line 0 |
| 12 | 13 | ||
| 13 | Fatal error: [snuffleupagus][0.0.0.0][config] Invalid configuration file in Unknown on line 0 | 14 | Fatal error: [snuffleupagus][0.0.0.0][config][log] Invalid configuration file in Unknown on line 0 |
| 14 | Could not startup. | 15 | Could not startup. |
diff --git a/src/tests/broken_configuration/broken_conf_session_encryption_without_encryption_key.phpt b/src/tests/broken_configuration/broken_conf_session_encryption_without_encryption_key.phpt index f958595..c638f80 100644 --- a/src/tests/broken_configuration/broken_conf_session_encryption_without_encryption_key.phpt +++ b/src/tests/broken_configuration/broken_conf_session_encryption_without_encryption_key.phpt | |||
| @@ -2,13 +2,14 @@ | |||
| 2 | Broken configuration - encrypted session without encryption key | 2 | Broken configuration - encrypted session without encryption key |
| 3 | --SKIPIF-- | 3 | --SKIPIF-- |
| 4 | <?php if (!extension_loaded("snuffleupagus")) print "skip"; ?> | 4 | <?php if (!extension_loaded("snuffleupagus")) print "skip"; ?> |
| 5 | <?php if (PHP_VERSION_ID >= 80000) print "skip"; ?> | ||
| 5 | --INI-- | 6 | --INI-- |
| 6 | sp.configuration_file={PWD}/config/broken_conf_session_encryption_without_encryption_key.ini | 7 | sp.configuration_file={PWD}/config/broken_conf_session_encryption_without_encryption_key.ini |
| 7 | --FILE-- | 8 | --FILE-- |
| 8 | --EXPECT-- | 9 | --EXPECT-- |
| 9 | PHP Fatal error: [snuffleupagus][0.0.0.0][config] You're trying to use the session cookie encryption feature on line 2 without having set the `.secret_key` option in`sp.global`: please set it first in Unknown on line 0 | 10 | PHP Fatal error: [snuffleupagus][0.0.0.0][config][log] You're trying to use the session cookie encryption feature on line 2 without having set the `.secret_key` option in`sp.global`: please set it first in Unknown on line 0 |
| 10 | 11 | ||
| 11 | Fatal error: [snuffleupagus][0.0.0.0][config] You're trying to use the session cookie encryption feature on line 2 without having set the `.secret_key` option in`sp.global`: please set it first in Unknown on line 0 | 12 | Fatal error: [snuffleupagus][0.0.0.0][config][log] You're trying to use the session cookie encryption feature on line 2 without having set the `.secret_key` option in`sp.global`: please set it first in Unknown on line 0 |
| 12 | 13 | ||
| 13 | Fatal error: [snuffleupagus][0.0.0.0][config] Invalid configuration file in Unknown on line 0 | 14 | Fatal error: [snuffleupagus][0.0.0.0][config][log] Invalid configuration file in Unknown on line 0 |
| 14 | Could not startup. | 15 | Could not startup. |
diff --git a/src/tests/broken_configuration/broken_conf_session_encryption_without_env_var.phpt b/src/tests/broken_configuration/broken_conf_session_encryption_without_env_var.phpt index 0f6f744..d503942 100644 --- a/src/tests/broken_configuration/broken_conf_session_encryption_without_env_var.phpt +++ b/src/tests/broken_configuration/broken_conf_session_encryption_without_env_var.phpt | |||
| @@ -2,13 +2,14 @@ | |||
| 2 | Broken configuration - encrypted session without env var | 2 | Broken configuration - encrypted session without env var |
| 3 | --SKIPIF-- | 3 | --SKIPIF-- |
| 4 | <?php if (!extension_loaded("snuffleupagus")) print "skip"; ?> | 4 | <?php if (!extension_loaded("snuffleupagus")) print "skip"; ?> |
| 5 | <?php if (PHP_VERSION_ID >= 80000) print "skip"; ?> | ||
| 5 | --INI-- | 6 | --INI-- |
| 6 | sp.configuration_file={PWD}/config/broken_conf_session_encryption_without_env_var.ini | 7 | sp.configuration_file={PWD}/config/broken_conf_session_encryption_without_env_var.ini |
| 7 | --FILE-- | 8 | --FILE-- |
| 8 | --EXPECT-- | 9 | --EXPECT-- |
| 9 | PHP Fatal error: [snuffleupagus][0.0.0.0][config] You're trying to use the session cookie encryption feature on line 2 without having set the `.cookie_env_var` option in`sp.global`: please set it first in Unknown on line 0 | 10 | PHP Fatal error: [snuffleupagus][0.0.0.0][config][log] You're trying to use the session cookie encryption feature on line 2 without having set the `.cookie_env_var` option in`sp.global`: please set it first in Unknown on line 0 |
| 10 | 11 | ||
| 11 | Fatal error: [snuffleupagus][0.0.0.0][config] You're trying to use the session cookie encryption feature on line 2 without having set the `.cookie_env_var` option in`sp.global`: please set it first in Unknown on line 0 | 12 | Fatal error: [snuffleupagus][0.0.0.0][config][log] You're trying to use the session cookie encryption feature on line 2 without having set the `.cookie_env_var` option in`sp.global`: please set it first in Unknown on line 0 |
| 12 | 13 | ||
| 13 | Fatal error: [snuffleupagus][0.0.0.0][config] Invalid configuration file in Unknown on line 0 | 14 | Fatal error: [snuffleupagus][0.0.0.0][config][log] Invalid configuration file in Unknown on line 0 |
| 14 | Could not startup. | 15 | Could not startup. |
diff --git a/src/tests/broken_configuration/broken_conf_shown_in_phpinfo.phpt b/src/tests/broken_configuration/broken_conf_shown_in_phpinfo.phpt index c5c26c0..1ad0afb 100644 --- a/src/tests/broken_configuration/broken_conf_shown_in_phpinfo.phpt +++ b/src/tests/broken_configuration/broken_conf_shown_in_phpinfo.phpt | |||
| @@ -2,6 +2,7 @@ | |||
| 2 | Broken configuration | 2 | Broken configuration |
| 3 | --SKIPIF-- | 3 | --SKIPIF-- |
| 4 | <?php if (!extension_loaded("snuffleupagus")) print "skip"; ?> | 4 | <?php if (!extension_loaded("snuffleupagus")) print "skip"; ?> |
| 5 | <?php if (PHP_VERSION_ID >= 80000) print "skip"; ?> | ||
| 5 | --INI-- | 6 | --INI-- |
| 6 | sp.configuration_file={PWD}/config/broken_config_regexp.ini | 7 | sp.configuration_file={PWD}/config/broken_config_regexp.ini |
| 7 | --FILE-- | 8 | --FILE-- |
| @@ -17,12 +18,12 @@ if (strstr($info, 'Valid config => no') !== FALSE) { | |||
| 17 | } | 18 | } |
| 18 | ?> | 19 | ?> |
| 19 | --EXPECTF-- | 20 | --EXPECTF-- |
| 20 | PHP Fatal error: [snuffleupagus][0.0.0.0][config] Failed to compile '*.': %s on line 1. in Unknown on line 0 | 21 | PHP Fatal error: [snuffleupagus][0.0.0.0][config][log] Failed to compile '*.': %s on line 1. in Unknown on line 0 |
| 21 | PHP Fatal error: [snuffleupagus][0.0.0.0][config] '.filename_r()' is expecting a valid regexp, and not '"*."' on line 1 in Unknown on line 0 | 22 | PHP Fatal error: [snuffleupagus][0.0.0.0][config][log] '.filename_r()' is expecting a valid regexp, and not '"*."' on line 1 in Unknown on line 0 |
| 22 | 23 | ||
| 23 | Fatal error: [snuffleupagus][0.0.0.0][config] Failed to compile '*.': %s on line 1. in Unknown on line 0 | 24 | Fatal error: [snuffleupagus][0.0.0.0][config][log] Failed to compile '*.': %s on line 1. in Unknown on line 0 |
| 24 | 25 | ||
| 25 | Fatal error: [snuffleupagus][0.0.0.0][config] '.filename_r()' is expecting a valid regexp, and not '"*."' on line 1 in Unknown on line 0 | 26 | Fatal error: [snuffleupagus][0.0.0.0][config][log] '.filename_r()' is expecting a valid regexp, and not '"*."' on line 1 in Unknown on line 0 |
| 26 | 27 | ||
| 27 | Fatal error: [snuffleupagus][0.0.0.0][config] Invalid configuration file in Unknown on line 0 | 28 | Fatal error: [snuffleupagus][0.0.0.0][config][log] Invalid configuration file in Unknown on line 0 |
| 28 | Could not startup. | 29 | Could not startup. |
diff --git a/src/tests/broken_configuration/broken_conf_truncated.phpt b/src/tests/broken_configuration/broken_conf_truncated.phpt index ac0cbb3..6deff87 100644 --- a/src/tests/broken_configuration/broken_conf_truncated.phpt +++ b/src/tests/broken_configuration/broken_conf_truncated.phpt | |||
| @@ -1,14 +1,15 @@ | |||
| 1 | --TEST-- | 1 | --TEST-- |
| 2 | Bad boolean value in configuration | 2 | Bad boolean value in configuration |
| 3 | --SKIPIF-- | 3 | --SKIPIF-- |
| 4 | <?php if (PHP_VERSION_ID >= 80000) print "skip"; ?> | ||
| 4 | <?php if (!extension_loaded("snuffleupagus")) print "skip"; ?> | 5 | <?php if (!extension_loaded("snuffleupagus")) print "skip"; ?> |
| 5 | --INI-- | 6 | --INI-- |
| 6 | sp.configuration_file={PWD}/config/config_broken_conf_truncated.ini | 7 | sp.configuration_file={PWD}/config/config_broken_conf_truncated.ini |
| 7 | --FILE-- | 8 | --FILE-- |
| 8 | --EXPECT-- | 9 | --EXPECT-- |
| 9 | PHP Fatal error: [snuffleupagus][0.0.0.0][error] A valid string as parameter is expected on line 1 in Unknown on line 0 | 10 | PHP Fatal error: [snuffleupagus][0.0.0.0][error][log] A valid string as parameter is expected on line 1 in Unknown on line 0 |
| 10 | 11 | ||
| 11 | Fatal error: [snuffleupagus][0.0.0.0][error] A valid string as parameter is expected on line 1 in Unknown on line 0 | 12 | Fatal error: [snuffleupagus][0.0.0.0][error][log] A valid string as parameter is expected on line 1 in Unknown on line 0 |
| 12 | 13 | ||
| 13 | Fatal error: [snuffleupagus][0.0.0.0][config] Invalid configuration file in Unknown on line 0 | 14 | Fatal error: [snuffleupagus][0.0.0.0][config][log] Invalid configuration file in Unknown on line 0 |
| 14 | Could not startup. \ No newline at end of file | 15 | Could not startup. |
diff --git a/src/tests/broken_configuration/broken_conf_unserialize.phpt b/src/tests/broken_configuration/broken_conf_unserialize.phpt index b1c26a3..a42d8a1 100644 --- a/src/tests/broken_configuration/broken_conf_unserialize.phpt +++ b/src/tests/broken_configuration/broken_conf_unserialize.phpt | |||
| @@ -1,5 +1,7 @@ | |||
| 1 | --TEST-- | 1 | --TEST-- |
| 2 | Invalid configuration file for unserialize | 2 | Invalid configuration file for unserialize |
| 3 | --SKIPIF-- | ||
| 4 | <?php if (PHP_VERSION_ID >= 80000) print "skip"; ?> | ||
| 3 | --INI-- | 5 | --INI-- |
| 4 | file_uploads=1 | 6 | file_uploads=1 |
| 5 | sp.configuration_file={PWD}/config/broken_conf_unserialize.ini | 7 | sp.configuration_file={PWD}/config/broken_conf_unserialize.ini |
| @@ -8,9 +10,9 @@ sp.configuration_file={PWD}/config/broken_conf_unserialize.ini | |||
| 8 | echo 1; | 10 | echo 1; |
| 9 | ?> | 11 | ?> |
| 10 | --EXPECTF-- | 12 | --EXPECTF-- |
| 11 | PHP Fatal error: [snuffleupagus][0.0.0.0][config] Trailing chars '234);' at the end of '.enable(1234);' on line 1 in Unknown on line 0 | 13 | PHP Fatal error: [snuffleupagus][0.0.0.0][config][log] Trailing chars '234);' at the end of '.enable(1234);' on line 1 in Unknown on line 0 |
| 12 | 14 | ||
| 13 | Fatal error: [snuffleupagus][0.0.0.0][config] Trailing chars '234);' at the end of '.enable(1234);' on line 1 in Unknown on line 0 | 15 | Fatal error: [snuffleupagus][0.0.0.0][config][log] Trailing chars '234);' at the end of '.enable(1234);' on line 1 in Unknown on line 0 |
| 14 | 16 | ||
| 15 | Fatal error: [snuffleupagus][0.0.0.0][config] Invalid configuration file in Unknown on line 0 | 17 | Fatal error: [snuffleupagus][0.0.0.0][config][log] Invalid configuration file in Unknown on line 0 |
| 16 | Could not startup. | 18 | Could not startup. |
diff --git a/src/tests/broken_configuration/broken_conf_upload_validation.phpt b/src/tests/broken_configuration/broken_conf_upload_validation.phpt index 47a2dd0..4b65339 100644 --- a/src/tests/broken_configuration/broken_conf_upload_validation.phpt +++ b/src/tests/broken_configuration/broken_conf_upload_validation.phpt | |||
| @@ -1,5 +1,7 @@ | |||
| 1 | --TEST-- | 1 | --TEST-- |
| 2 | Invalid configuration file for upload validation | 2 | Invalid configuration file for upload validation |
| 3 | --SKIPIF-- | ||
| 4 | <?php if (PHP_VERSION_ID >= 80000) print "skip"; ?> | ||
| 3 | --INI-- | 5 | --INI-- |
| 4 | file_uploads=1 | 6 | file_uploads=1 |
| 5 | sp.configuration_file={PWD}/config/borken_conf_upload_validation.ini | 7 | sp.configuration_file={PWD}/config/borken_conf_upload_validation.ini |
| @@ -8,9 +10,9 @@ sp.configuration_file={PWD}/config/borken_conf_upload_validation.ini | |||
| 8 | echo 1; | 10 | echo 1; |
| 9 | ?> | 11 | ?> |
| 10 | --EXPECTF-- | 12 | --EXPECTF-- |
| 11 | PHP Fatal error: [snuffleupagus][0.0.0.0][error] A valid string as parameter is expected on line 1 in Unknown on line 0 | 13 | PHP Fatal error: [snuffleupagus][0.0.0.0][error][log] A valid string as parameter is expected on line 1 in Unknown on line 0 |
| 12 | 14 | ||
| 13 | Fatal error: [snuffleupagus][0.0.0.0][error] A valid string as parameter is expected on line 1 in Unknown on line 0 | 15 | Fatal error: [snuffleupagus][0.0.0.0][error][log] A valid string as parameter is expected on line 1 in Unknown on line 0 |
| 14 | 16 | ||
| 15 | Fatal error: [snuffleupagus][0.0.0.0][config] Invalid configuration file in Unknown on line 0 | 17 | Fatal error: [snuffleupagus][0.0.0.0][config][log] Invalid configuration file in Unknown on line 0 |
| 16 | Could not startup. | 18 | Could not startup. |
diff --git a/src/tests/broken_configuration/broken_conf_weird_keyword.phpt b/src/tests/broken_configuration/broken_conf_weird_keyword.phpt index e560c21..ce568af 100644 --- a/src/tests/broken_configuration/broken_conf_weird_keyword.phpt +++ b/src/tests/broken_configuration/broken_conf_weird_keyword.phpt | |||
| @@ -2,13 +2,14 @@ | |||
| 2 | Bad config, unknown keyword | 2 | Bad config, unknown keyword |
| 3 | --SKIPIF-- | 3 | --SKIPIF-- |
| 4 | <?php if (!extension_loaded("snuffleupagus")) print "skip"; ?> | 4 | <?php if (!extension_loaded("snuffleupagus")) print "skip"; ?> |
| 5 | <?php if (PHP_VERSION_ID >= 80000) print "skip"; ?> | ||
| 5 | --INI-- | 6 | --INI-- |
| 6 | sp.configuration_file={PWD}/config/broken_conf_weird_keyword.ini | 7 | sp.configuration_file={PWD}/config/broken_conf_weird_keyword.ini |
| 7 | --FILE-- | 8 | --FILE-- |
| 8 | --EXPECT-- | 9 | --EXPECT-- |
| 9 | PHP Fatal error: [snuffleupagus][0.0.0.0][config] Trailing chars '.not_a_valid_keyword("test");' at the end of '.enable().not_a_valid_keyword("test");' on line 1 in Unknown on line 0 | 10 | PHP Fatal error: [snuffleupagus][0.0.0.0][config][log] Trailing chars '.not_a_valid_keyword("test");' at the end of '.enable().not_a_valid_keyword("test");' on line 1 in Unknown on line 0 |
| 10 | 11 | ||
| 11 | Fatal error: [snuffleupagus][0.0.0.0][config] Trailing chars '.not_a_valid_keyword("test");' at the end of '.enable().not_a_valid_keyword("test");' on line 1 in Unknown on line 0 | 12 | Fatal error: [snuffleupagus][0.0.0.0][config][log] Trailing chars '.not_a_valid_keyword("test");' at the end of '.enable().not_a_valid_keyword("test");' on line 1 in Unknown on line 0 |
| 12 | 13 | ||
| 13 | Fatal error: [snuffleupagus][0.0.0.0][config] Invalid configuration file in Unknown on line 0 | 14 | Fatal error: [snuffleupagus][0.0.0.0][config][log] Invalid configuration file in Unknown on line 0 |
| 14 | Could not startup. \ No newline at end of file | 15 | Could not startup. |
diff --git a/src/tests/broken_configuration/broken_conf_wrapper_whitelist.phpt b/src/tests/broken_configuration/broken_conf_wrapper_whitelist.phpt index d0b7427..2d1feeb 100644 --- a/src/tests/broken_configuration/broken_conf_wrapper_whitelist.phpt +++ b/src/tests/broken_configuration/broken_conf_wrapper_whitelist.phpt | |||
| @@ -2,6 +2,7 @@ | |||
| 2 | Broken configuration with invalid token for wrapper whitelist | 2 | Broken configuration with invalid token for wrapper whitelist |
| 3 | --SKIPIF-- | 3 | --SKIPIF-- |
| 4 | <?php if (!extension_loaded("snuffleupagus")) print "skip"; ?> | 4 | <?php if (!extension_loaded("snuffleupagus")) print "skip"; ?> |
| 5 | <?php if (PHP_VERSION_ID >= 80000) print "skip"; ?> | ||
| 5 | --INI-- | 6 | --INI-- |
| 6 | sp.configuration_file={PWD}/config/broken_conf_wrapper_whitelist.ini | 7 | sp.configuration_file={PWD}/config/broken_conf_wrapper_whitelist.ini |
| 7 | sp.allow_broken_configuration=Off | 8 | sp.allow_broken_configuration=Off |
| @@ -10,9 +11,9 @@ sp.allow_broken_configuration=Off | |||
| 10 | echo 1337; | 11 | echo 1337; |
| 11 | ?> | 12 | ?> |
| 12 | --EXPECT-- | 13 | --EXPECT-- |
| 13 | PHP Fatal error: [snuffleupagus][0.0.0.0][config] Trailing chars '.invalid_param();' at the end of '.invalid_param();' on line 1 in Unknown on line 0 | 14 | PHP Fatal error: [snuffleupagus][0.0.0.0][config][log] Trailing chars '.invalid_param();' at the end of '.invalid_param();' on line 1 in Unknown on line 0 |
| 14 | 15 | ||
| 15 | Fatal error: [snuffleupagus][0.0.0.0][config] Trailing chars '.invalid_param();' at the end of '.invalid_param();' on line 1 in Unknown on line 0 | 16 | Fatal error: [snuffleupagus][0.0.0.0][config][log] Trailing chars '.invalid_param();' at the end of '.invalid_param();' on line 1 in Unknown on line 0 |
| 16 | 17 | ||
| 17 | Fatal error: [snuffleupagus][0.0.0.0][config] Invalid configuration file in Unknown on line 0 | 18 | Fatal error: [snuffleupagus][0.0.0.0][config][log] Invalid configuration file in Unknown on line 0 |
| 18 | Could not startup. | 19 | Could not startup. |
diff --git a/src/tests/broken_configuration/broken_conf_wrong_quotes.phpt b/src/tests/broken_configuration/broken_conf_wrong_quotes.phpt index 52ea8d7..3753989 100644 --- a/src/tests/broken_configuration/broken_conf_wrong_quotes.phpt +++ b/src/tests/broken_configuration/broken_conf_wrong_quotes.phpt | |||
| @@ -2,13 +2,14 @@ | |||
| 2 | Configuration line with too many quotes | 2 | Configuration line with too many quotes |
| 3 | --SKIPIF-- | 3 | --SKIPIF-- |
| 4 | <?php if (!extension_loaded("snuffleupagus")) print "skip"; ?> | 4 | <?php if (!extension_loaded("snuffleupagus")) print "skip"; ?> |
| 5 | <?php if (PHP_VERSION_ID >= 80000) print "skip"; ?> | ||
| 5 | --INI-- | 6 | --INI-- |
| 6 | sp.configuration_file={PWD}/config/broken_conf_wrong_quotes.ini | 7 | sp.configuration_file={PWD}/config/broken_conf_wrong_quotes.ini |
| 7 | --FILE-- | 8 | --FILE-- |
| 8 | --EXPECT-- | 9 | --EXPECT-- |
| 9 | PHP Fatal error: [snuffleupagus][0.0.0.0][error] There is an issue with the parsing of '"\)': it doesn't look like a valid string on line 1 in Unknown on line 0 | 10 | PHP Fatal error: [snuffleupagus][0.0.0.0][error][log] There is an issue with the parsing of '"\)': it doesn't look like a valid string on line 1 in Unknown on line 0 |
| 10 | 11 | ||
| 11 | Fatal error: [snuffleupagus][0.0.0.0][error] There is an issue with the parsing of '"\)': it doesn't look like a valid string on line 1 in Unknown on line 0 | 12 | Fatal error: [snuffleupagus][0.0.0.0][error][log] There is an issue with the parsing of '"\)': it doesn't look like a valid string on line 1 in Unknown on line 0 |
| 12 | 13 | ||
| 13 | Fatal error: [snuffleupagus][0.0.0.0][config] Invalid configuration file in Unknown on line 0 | 14 | Fatal error: [snuffleupagus][0.0.0.0][config][log] Invalid configuration file in Unknown on line 0 |
| 14 | Could not startup. \ No newline at end of file | 15 | Could not startup. |
diff --git a/src/tests/broken_configuration/broken_conf_wrong_type.phpt b/src/tests/broken_configuration/broken_conf_wrong_type.phpt index 60dde56..b204968 100644 --- a/src/tests/broken_configuration/broken_conf_wrong_type.phpt +++ b/src/tests/broken_configuration/broken_conf_wrong_type.phpt | |||
| @@ -1,14 +1,15 @@ | |||
| 1 | --TEST-- | 1 | --TEST-- |
| 2 | Broken conf with wrong type | 2 | Broken conf with wrong type |
| 3 | --SKIPIF-- | 3 | --SKIPIF-- |
| 4 | <?php if (!extension_loaded("snuffleupagus")) die "skip"; ?> | 4 | <?php if (!extension_loaded("snuffleupagus")) print "skip"; ?> |
| 5 | <?php if (PHP_VERSION_ID >= 80000) print "skip"; ?> | ||
| 5 | --INI-- | 6 | --INI-- |
| 6 | sp.configuration_file={PWD}/config/broken_conf_wrong_type.ini | 7 | sp.configuration_file={PWD}/config/broken_conf_wrong_type.ini |
| 7 | --FILE-- | 8 | --FILE-- |
| 8 | --EXPECTF-- | 9 | --EXPECTF-- |
| 9 | PHP Fatal error: [snuffleupagus][0.0.0.0][error] .ret_type() is expecting a valid php type ('false', 'true', 'array'. 'object', 'long', 'double', 'null', 'resource', 'reference', 'undef') on line 5 in Unknown on line 0 | 10 | PHP Fatal error: [snuffleupagus][0.0.0.0][error][log] .ret_type() is expecting a valid php type ('false', 'true', 'array'. 'object', 'long', 'double', 'null', 'resource', 'reference', 'undef') on line 5 in Unknown on line 0 |
| 10 | 11 | ||
| 11 | Fatal error: [snuffleupagus][0.0.0.0][error] .ret_type() is expecting a valid php type ('false', 'true', 'array'. 'object', 'long', 'double', 'null', 'resource', 'reference', 'undef') on line 5 in Unknown on line 0 | 12 | Fatal error: [snuffleupagus][0.0.0.0][error][log] .ret_type() is expecting a valid php type ('false', 'true', 'array'. 'object', 'long', 'double', 'null', 'resource', 'reference', 'undef') on line 5 in Unknown on line 0 |
| 12 | 13 | ||
| 13 | Fatal error: [snuffleupagus][0.0.0.0][config] Invalid configuration file in Unknown on line 0 | 14 | Fatal error: [snuffleupagus][0.0.0.0][config][log] Invalid configuration file in Unknown on line 0 |
| 14 | Could not startup. \ No newline at end of file | 15 | Could not startup. |
diff --git a/src/tests/broken_configuration/broken_invalid_client_ip4.phpt b/src/tests/broken_configuration/broken_invalid_client_ip4.phpt index 8e445e7..a96b059 100644 --- a/src/tests/broken_configuration/broken_invalid_client_ip4.phpt +++ b/src/tests/broken_configuration/broken_invalid_client_ip4.phpt | |||
| @@ -1,7 +1,7 @@ | |||
| 1 | --TEST-- | 1 | --TEST-- |
| 2 | Invalid client IP | 2 | Invalid client IP |
| 3 | --SKIPIF-- | 3 | --SKIPIF-- |
| 4 | <?php if (!extension_loaded("snuffleupagus")) die "skip"; ?> | 4 | <?php if (!extension_loaded("snuffleupagus")) print "skip"; ?> |
| 5 | --ENV-- | 5 | --ENV-- |
| 6 | return <<<EOF | 6 | return <<<EOF |
| 7 | REMOTE_ADDR=xyz | 7 | REMOTE_ADDR=xyz |
| @@ -13,4 +13,4 @@ sp.configuration_file={PWD}/config/disabled_functions_cidr.ini | |||
| 13 | strpos("1337", "1"); | 13 | strpos("1337", "1"); |
| 14 | ?> | 14 | ?> |
| 15 | --EXPECTF-- | 15 | --EXPECTF-- |
| 16 | Fatal error: [snuffleupagus][xyz][cidr_match] Weird ip (xyz) family in %a/broken_invalid_client_ip4.php on line 2 \ No newline at end of file | 16 | Fatal error: [snuffleupagus][xyz][cidr_match][log] Weird ip (xyz) family in %a/broken_invalid_client_ip4.php on line 2 \ No newline at end of file |
diff --git a/src/tests/broken_configuration/broken_regexp.phpt b/src/tests/broken_configuration/broken_regexp.phpt index 28d803e..83c7103 100644 --- a/src/tests/broken_configuration/broken_regexp.phpt +++ b/src/tests/broken_configuration/broken_regexp.phpt | |||
| @@ -1,17 +1,18 @@ | |||
| 1 | --TEST-- | 1 | --TEST-- |
| 2 | Broken regexp | 2 | Broken regexp |
| 3 | --SKIPIF-- | 3 | --SKIPIF-- |
| 4 | <?php if (!extension_loaded("snuffleupagus")) die "skip"; ?> | 4 | <?php if (!extension_loaded("snuffleupagus")) print "skip"; ?> |
| 5 | <?php if (PHP_VERSION_ID >= 80000) print "skip"; ?> | ||
| 5 | --INI-- | 6 | --INI-- |
| 6 | sp.configuration_file={PWD}/config/broken_regexp.ini | 7 | sp.configuration_file={PWD}/config/broken_regexp.ini |
| 7 | --FILE-- | 8 | --FILE-- |
| 8 | --EXPECTF-- | 9 | --EXPECTF-- |
| 9 | PHP Fatal error: [snuffleupagus][0.0.0.0][config] Failed to compile '^$[': missing terminating ] for character class on line 1. in Unknown on line 0 | 10 | PHP Fatal error: [snuffleupagus][0.0.0.0][config][log] Failed to compile '^$[': missing terminating ] for character class on line 1. in Unknown on line 0 |
| 10 | PHP Fatal error: [snuffleupagus][0.0.0.0][config] '.value_r()' is expecting a valid regexp, and not '"^$["' on line 1 in Unknown on line 0 | 11 | PHP Fatal error: [snuffleupagus][0.0.0.0][config][log] '.value_r()' is expecting a valid regexp, and not '"^$["' on line 1 in Unknown on line 0 |
| 11 | 12 | ||
| 12 | Fatal error: [snuffleupagus][0.0.0.0][config] Failed to compile '^$[': missing terminating ] for character class on line 1. in Unknown on line 0 | 13 | Fatal error: [snuffleupagus][0.0.0.0][config][log] Failed to compile '^$[': missing terminating ] for character class on line 1. in Unknown on line 0 |
| 13 | 14 | ||
| 14 | Fatal error: [snuffleupagus][0.0.0.0][config] '.value_r()' is expecting a valid regexp, and not '"^$["' on line 1 in Unknown on line 0 | 15 | Fatal error: [snuffleupagus][0.0.0.0][config][log] '.value_r()' is expecting a valid regexp, and not '"^$["' on line 1 in Unknown on line 0 |
| 15 | 16 | ||
| 16 | Fatal error: [snuffleupagus][0.0.0.0][config] Invalid configuration file in Unknown on line 0 | 17 | Fatal error: [snuffleupagus][0.0.0.0][config][log] Invalid configuration file in Unknown on line 0 |
| 17 | Could not startup. \ No newline at end of file | 18 | Could not startup. |
diff --git a/src/tests/broken_configuration/broken_unmatching_brackets.phpt b/src/tests/broken_configuration/broken_unmatching_brackets.phpt index 6c63303..ba14ff3 100644 --- a/src/tests/broken_configuration/broken_unmatching_brackets.phpt +++ b/src/tests/broken_configuration/broken_unmatching_brackets.phpt | |||
| @@ -1,17 +1,18 @@ | |||
| 1 | --TEST-- | 1 | --TEST-- |
| 2 | Broken configuration - unmatching brackets | 2 | Broken configuration - unmatching brackets |
| 3 | --SKIPIF-- | 3 | --SKIPIF-- |
| 4 | <?php if (!extension_loaded("snuffleupagus")) die "skip"; ?> | 4 | <?php if (!extension_loaded("snuffleupagus")) print "skip"; ?> |
| 5 | <?php if (PHP_VERSION_ID >= 80000) print "skip"; ?> | ||
| 5 | --INI-- | 6 | --INI-- |
| 6 | sp.configuration_file={PWD}/config/config_unmatching_brackets.ini | 7 | sp.configuration_file={PWD}/config/config_unmatching_brackets.ini |
| 7 | --FILE-- | 8 | --FILE-- |
| 8 | --EXPECTF-- | 9 | --EXPECTF-- |
| 9 | PHP Fatal error: [snuffleupagus][0.0.0.0][config] Invalid `]` position. in Unknown on line 0 | 10 | PHP Fatal error: [snuffleupagus][0.0.0.0][config][log] Invalid `]` position. in Unknown on line 0 |
| 10 | PHP Fatal error: [snuffleupagus][0.0.0.0][config] Invalid value 'arr[b]]]]]' for `param` on line 1 in Unknown on line 0 | 11 | PHP Fatal error: [snuffleupagus][0.0.0.0][config][log] Invalid value 'arr[b]]]]]' for `param` on line 1 in Unknown on line 0 |
| 11 | 12 | ||
| 12 | Fatal error: [snuffleupagus][0.0.0.0][config] Invalid `]` position. in Unknown on line 0 | 13 | Fatal error: [snuffleupagus][0.0.0.0][config][log] Invalid `]` position. in Unknown on line 0 |
| 13 | 14 | ||
| 14 | Fatal error: [snuffleupagus][0.0.0.0][config] Invalid value 'arr[b]]]]]' for `param` on line 1 in Unknown on line 0 | 15 | Fatal error: [snuffleupagus][0.0.0.0][config][log] Invalid value 'arr[b]]]]]' for `param` on line 1 in Unknown on line 0 |
| 15 | 16 | ||
| 16 | Fatal error: [snuffleupagus][0.0.0.0][config] Invalid configuration file in Unknown on line 0 | 17 | Fatal error: [snuffleupagus][0.0.0.0][config][log] Invalid configuration file in Unknown on line 0 |
| 17 | Could not startup. \ No newline at end of file | 18 | Could not startup. |
diff --git a/src/tests/broken_configuration/config/broken_conf_config_invalid_param.ini b/src/tests/broken_configuration/config/broken_conf_config_invalid_param.ini new file mode 100644 index 0000000..22894c8 --- /dev/null +++ b/src/tests/broken_configuration/config/broken_conf_config_invalid_param.ini | |||
| @@ -0,0 +1 @@ | |||
| sp.disable_function.function("foo").param("qwe").value("abc").drop() | |||
diff --git a/src/tests/broken_configuration/encrypt_regexp_cookies_bad_regexp.phpt b/src/tests/broken_configuration/encrypt_regexp_cookies_bad_regexp.phpt index c0fe5e4..7a8c909 100644 --- a/src/tests/broken_configuration/encrypt_regexp_cookies_bad_regexp.phpt +++ b/src/tests/broken_configuration/encrypt_regexp_cookies_bad_regexp.phpt | |||
| @@ -1,7 +1,7 @@ | |||
| 1 | --TEST-- | 1 | --TEST-- |
| 2 | Cookie decryption in ipv4 | 2 | Cookie decryption in ipv4 |
| 3 | --SKIPIF-- | 3 | --SKIPIF-- |
| 4 | <?php if (!extension_loaded("snuffleupagus")) die "skip"; ?> | 4 | <?php if (!extension_loaded("snuffleupagus")) print "skip"; ?> |
| 5 | --INI-- | 5 | --INI-- |
| 6 | sp.configuration_file={PWD}/config/config_encrypted_regexp_cookies_bad_regexp.ini | 6 | sp.configuration_file={PWD}/config/config_encrypted_regexp_cookies_bad_regexp.ini |
| 7 | error_reporting=1 | 7 | error_reporting=1 |
| @@ -15,8 +15,8 @@ EOF; | |||
| 15 | --FILE-- | 15 | --FILE-- |
| 16 | <?php var_dump($_COOKIE); ?> | 16 | <?php var_dump($_COOKIE); ?> |
| 17 | --EXPECT-- | 17 | --EXPECT-- |
| 18 | Fatal error: [snuffleupagus][127.0.0.1][config] Invalid configuration file in Unknown on line 0 | 18 | Fatal error: [snuffleupagus][127.0.0.1][config][log] Invalid configuration file in Unknown on line 0 |
| 19 | 19 | ||
| 20 | Fatal error: [snuffleupagus][127.0.0.1][config] Failed to compile '^super_co[a-z+$': missing terminating ] for character class on line 2. in Unknown on line 0 | 20 | Fatal error: [snuffleupagus][127.0.0.1][config][log] Failed to compile '^super_co[a-z+$': missing terminating ] for character class on line 2. in Unknown on line 0 |
| 21 | 21 | ||
| 22 | Fatal error: [snuffleupagus][127.0.0.1][config] '.name_r()' is expecting a valid regexp, and not '"^super_co[a-z+$"' on line 2 in Unknown on line 0 | 22 | Fatal error: [snuffleupagus][127.0.0.1][config][log] '.name_r()' is expecting a valid regexp, and not '"^super_co[a-z+$"' on line 2 in Unknown on line 0 |
diff --git a/src/tests/broken_configuration_php8/broken_conf.phpt b/src/tests/broken_configuration_php8/broken_conf.phpt new file mode 100644 index 0000000..7dde7d6 --- /dev/null +++ b/src/tests/broken_configuration_php8/broken_conf.phpt | |||
| @@ -0,0 +1,14 @@ | |||
| 1 | --TEST-- | ||
| 2 | Broken configuration | ||
| 3 | --SKIPIF-- | ||
| 4 | <?php if (!extension_loaded("snuffleupagus")) print "skip"; ?> | ||
| 5 | <?php if (PHP_VERSION_ID < 80000) print "skip"; ?> | ||
| 6 | --INI-- | ||
| 7 | sp.configuration_file={PWD}/config/broken_conf.ini | ||
| 8 | --FILE-- | ||
| 9 | --EXPECT-- | ||
| 10 | |||
| 11 | Fatal error: [snuffleupagus][0.0.0.0][config][log] Invalid configuration prefix for 'this is a broken line' on line 1 in Unknown on line 0 | ||
| 12 | |||
| 13 | Fatal error: [snuffleupagus][0.0.0.0][config][log] Invalid configuration file in Unknown on line 0 | ||
| 14 | Could not startup. | ||
diff --git a/src/tests/broken_configuration_php8/broken_conf2.phpt b/src/tests/broken_configuration_php8/broken_conf2.phpt new file mode 100644 index 0000000..bf337b4 --- /dev/null +++ b/src/tests/broken_configuration_php8/broken_conf2.phpt | |||
| @@ -0,0 +1,14 @@ | |||
| 1 | --TEST-- | ||
| 2 | Broken configuration | ||
| 3 | --SKIPIF-- | ||
| 4 | <?php if (!extension_loaded("snuffleupagus")) print "skip"; ?> | ||
| 5 | <?php if (PHP_VERSION_ID < 80000) print "skip"; ?> | ||
| 6 | --INI-- | ||
| 7 | sp.configuration_file={PWD}/config/broken_conf2.ini | ||
| 8 | --FILE-- | ||
| 9 | --EXPECT-- | ||
| 10 | |||
| 11 | Fatal error: [snuffleupagus][0.0.0.0][config][log] Invalid configuration section 'sp.wrong' on line 1 in Unknown on line 0 | ||
| 12 | |||
| 13 | Fatal error: [snuffleupagus][0.0.0.0][config][log] Invalid configuration file in Unknown on line 0 | ||
| 14 | Could not startup. | ||
diff --git a/src/tests/broken_configuration_php8/broken_conf_allow_broken_disabled.phpt b/src/tests/broken_configuration_php8/broken_conf_allow_broken_disabled.phpt new file mode 100644 index 0000000..9dd0c66 --- /dev/null +++ b/src/tests/broken_configuration_php8/broken_conf_allow_broken_disabled.phpt | |||
| @@ -0,0 +1,18 @@ | |||
| 1 | --TEST-- | ||
| 2 | Broken configuration with allow broken turned off | ||
| 3 | --SKIPIF-- | ||
| 4 | <?php if (!extension_loaded("snuffleupagus")) print "skip"; ?> | ||
| 5 | <?php if (PHP_VERSION_ID < 80000) print "skip"; ?> | ||
| 6 | --INI-- | ||
| 7 | sp.configuration_file={PWD}/config/broken_conf.ini | ||
| 8 | sp.allow_broken_configuration=Off | ||
| 9 | --FILE-- | ||
| 10 | <?php | ||
| 11 | echo 1337; | ||
| 12 | ?> | ||
| 13 | --EXPECT-- | ||
| 14 | |||
| 15 | Fatal error: [snuffleupagus][0.0.0.0][config][log] Invalid configuration prefix for 'this is a broken line' on line 1 in Unknown on line 0 | ||
| 16 | |||
| 17 | Fatal error: [snuffleupagus][0.0.0.0][config][log] Invalid configuration file in Unknown on line 0 | ||
| 18 | Could not startup. | ||
diff --git a/src/tests/broken_configuration_php8/broken_conf_allow_broken_enabled.phpt b/src/tests/broken_configuration_php8/broken_conf_allow_broken_enabled.phpt new file mode 100644 index 0000000..eccc8a8 --- /dev/null +++ b/src/tests/broken_configuration_php8/broken_conf_allow_broken_enabled.phpt | |||
| @@ -0,0 +1,16 @@ | |||
| 1 | --TEST-- | ||
| 2 | Broken configuration with allow broken turned on | ||
| 3 | --SKIPIF-- | ||
| 4 | <?php if (!extension_loaded("snuffleupagus")) print "skip"; ?> | ||
| 5 | <?php if (PHP_VERSION_ID < 80000) print "skip"; ?> | ||
| 6 | --INI-- | ||
| 7 | sp.configuration_file={PWD}/config/broken_conf.ini | ||
| 8 | sp.allow_broken_configuration=On | ||
| 9 | --FILE-- | ||
| 10 | <?php | ||
| 11 | echo 1337; | ||
| 12 | ?> | ||
| 13 | --EXPECT-- | ||
| 14 | |||
| 15 | Fatal error: [snuffleupagus][0.0.0.0][config][log] Invalid configuration prefix for 'this is a broken line' on line 1 in Unknown on line 0 | ||
| 16 | 1337 | ||
diff --git a/src/tests/broken_configuration_php8/broken_conf_config_regexp.phpt b/src/tests/broken_configuration_php8/broken_conf_config_regexp.phpt new file mode 100644 index 0000000..76ef208 --- /dev/null +++ b/src/tests/broken_configuration_php8/broken_conf_config_regexp.phpt | |||
| @@ -0,0 +1,16 @@ | |||
| 1 | --TEST-- | ||
| 2 | Broken configuration | ||
| 3 | --SKIPIF-- | ||
| 4 | <?php if (!extension_loaded("snuffleupagus")) print "skip"; ?> | ||
| 5 | <?php if (PHP_VERSION_ID < 80000) print "skip"; ?> | ||
| 6 | --INI-- | ||
| 7 | sp.configuration_file={PWD}/config/broken_config_regexp.ini | ||
| 8 | --FILE-- | ||
| 9 | --EXPECTF-- | ||
| 10 | |||
| 11 | Fatal error: [snuffleupagus][0.0.0.0][config][log] Failed to compile '*.': %s on line 1. in Unknown on line 0 | ||
| 12 | |||
| 13 | Fatal error: [snuffleupagus][0.0.0.0][config][log] '.filename_r()' is expecting a valid regexp, and not '"*."' on line 1 in Unknown on line 0 | ||
| 14 | |||
| 15 | Fatal error: [snuffleupagus][0.0.0.0][config][log] Invalid configuration file in Unknown on line 0 | ||
| 16 | Could not startup. | ||
diff --git a/src/tests/broken_configuration_php8/broken_conf_config_regexp_no_closing_paren.phpt b/src/tests/broken_configuration_php8/broken_conf_config_regexp_no_closing_paren.phpt new file mode 100644 index 0000000..5bdca06 --- /dev/null +++ b/src/tests/broken_configuration_php8/broken_conf_config_regexp_no_closing_paren.phpt | |||
| @@ -0,0 +1,16 @@ | |||
| 1 | --TEST-- | ||
| 2 | Broken configuration - regexp without a closing parenthesis | ||
| 3 | --SKIPIF-- | ||
| 4 | <?php if (!extension_loaded("snuffleupagus")) print "skip"; ?> | ||
| 5 | <?php if (PHP_VERSION_ID < 80000) print "skip"; ?> | ||
| 6 | --INI-- | ||
| 7 | sp.configuration_file={PWD}/config/broken_config_regexp_no_closing_paren.ini | ||
| 8 | --FILE-- | ||
| 9 | --EXPECT-- | ||
| 10 | |||
| 11 | Fatal error: [snuffleupagus][0.0.0.0][error][log] There is an issue with the parsing of '"*."': it doesn't look like a valid string on line 1 in Unknown on line 0 | ||
| 12 | |||
| 13 | Fatal error: [snuffleupagus][0.0.0.0][config][log] '.filename_r()' is expecting a valid regexp, and not '"*."' on line 1 in Unknown on line 0 | ||
| 14 | |||
| 15 | Fatal error: [snuffleupagus][0.0.0.0][config][log] Invalid configuration file in Unknown on line 0 | ||
| 16 | Could not startup. | ||
diff --git a/src/tests/broken_configuration_php8/broken_conf_cookie_encryption_without_encryption_key.phpt b/src/tests/broken_configuration_php8/broken_conf_cookie_encryption_without_encryption_key.phpt new file mode 100644 index 0000000..0447320 --- /dev/null +++ b/src/tests/broken_configuration_php8/broken_conf_cookie_encryption_without_encryption_key.phpt | |||
| @@ -0,0 +1,14 @@ | |||
| 1 | --TEST-- | ||
| 2 | Broken configuration - encrypted cookie without encryption key | ||
| 3 | --SKIPIF-- | ||
| 4 | <?php if (!extension_loaded("snuffleupagus")) print "skip"; ?> | ||
| 5 | <?php if (PHP_VERSION_ID < 80000) print "skip"; ?> | ||
| 6 | --INI-- | ||
| 7 | sp.configuration_file={PWD}/config/broken_conf_cookie_encryption_without_encryption_key.ini | ||
| 8 | --FILE-- | ||
| 9 | --EXPECT-- | ||
| 10 | |||
| 11 | Fatal error: [snuffleupagus][0.0.0.0][config][log] You're trying to use the cookie encryption featureon line 2 without having set the `.encryption_key` option in`sp.global`: please set it first in Unknown on line 0 | ||
| 12 | |||
| 13 | Fatal error: [snuffleupagus][0.0.0.0][config][log] Invalid configuration file in Unknown on line 0 | ||
| 14 | Could not startup. | ||
diff --git a/src/tests/broken_configuration_php8/broken_conf_cookie_encryption_without_env_var.phpt b/src/tests/broken_configuration_php8/broken_conf_cookie_encryption_without_env_var.phpt new file mode 100644 index 0000000..204430d --- /dev/null +++ b/src/tests/broken_configuration_php8/broken_conf_cookie_encryption_without_env_var.phpt | |||
| @@ -0,0 +1,14 @@ | |||
| 1 | --TEST-- | ||
| 2 | Broken configuration - encrypted cookie with without cookie env var | ||
| 3 | --SKIPIF-- | ||
| 4 | <?php if (!extension_loaded("snuffleupagus")) print "skip"; ?> | ||
| 5 | <?php if (PHP_VERSION_ID < 80000) print "skip"; ?> | ||
| 6 | --INI-- | ||
| 7 | sp.configuration_file={PWD}/config/broken_conf_cookie_encryption_without_env_var.ini | ||
| 8 | --FILE-- | ||
| 9 | --EXPECT-- | ||
| 10 | |||
| 11 | Fatal error: [snuffleupagus][0.0.0.0][config][log] You're trying to use the cookie encryption featureon line 2 without having set the `.cookie_env_var` option in`sp.global`: please set it first in Unknown on line 0 | ||
| 12 | |||
| 13 | Fatal error: [snuffleupagus][0.0.0.0][config][log] Invalid configuration file in Unknown on line 0 | ||
| 14 | Could not startup. | ||
diff --git a/src/tests/broken_configuration_php8/broken_conf_cookie_name_and_regexp.phpt b/src/tests/broken_configuration_php8/broken_conf_cookie_name_and_regexp.phpt new file mode 100644 index 0000000..8648b4f --- /dev/null +++ b/src/tests/broken_configuration_php8/broken_conf_cookie_name_and_regexp.phpt | |||
| @@ -0,0 +1,14 @@ | |||
| 1 | --TEST-- | ||
| 2 | Broken configuration - encrypted cookie with name and regexp | ||
| 3 | --SKIPIF-- | ||
| 4 | <?php if (!extension_loaded("snuffleupagus")) print "skip"; ?> | ||
| 5 | <?php if (PHP_VERSION_ID < 80000) print "skip"; ?> | ||
| 6 | --INI-- | ||
| 7 | sp.configuration_file={PWD}/config/broken_conf_cookie_name_and_regexp.ini | ||
| 8 | --FILE-- | ||
| 9 | --EXPECT-- | ||
| 10 | |||
| 11 | Fatal error: [snuffleupagus][0.0.0.0][config][log] name and name_r are mutually exclusive on line 2 in Unknown on line 0 | ||
| 12 | |||
| 13 | Fatal error: [snuffleupagus][0.0.0.0][config][log] Invalid configuration file in Unknown on line 0 | ||
| 14 | Could not startup. | ||
diff --git a/src/tests/broken_configuration_php8/broken_conf_enable_disable.phpt b/src/tests/broken_configuration_php8/broken_conf_enable_disable.phpt new file mode 100644 index 0000000..54e4d32 --- /dev/null +++ b/src/tests/broken_configuration_php8/broken_conf_enable_disable.phpt | |||
| @@ -0,0 +1,14 @@ | |||
| 1 | --TEST-- | ||
| 2 | Global strict mode | ||
| 3 | --SKIPIF-- | ||
| 4 | <?php if (!extension_loaded("snuffleupagus")) print "skip"; ?> | ||
| 5 | <?php if (PHP_VERSION_ID < 80000) print "skip"; ?> | ||
| 6 | --INI-- | ||
| 7 | sp.configuration_file={PWD}/config/borken_conf_enable_disable.ini | ||
| 8 | --FILE-- | ||
| 9 | --EXPECTF-- | ||
| 10 | |||
| 11 | Fatal error: [snuffleupagus][0.0.0.0][config][log] A rule can't be enabled and disabled on line 1 in Unknown on line 0 | ||
| 12 | |||
| 13 | Fatal error: [snuffleupagus][0.0.0.0][config][log] Invalid configuration file in Unknown on line 0 | ||
| 14 | Could not startup. | ||
diff --git a/src/tests/broken_configuration_php8/broken_conf_eval.phpt b/src/tests/broken_configuration_php8/broken_conf_eval.phpt new file mode 100644 index 0000000..1a6ad4d --- /dev/null +++ b/src/tests/broken_configuration_php8/broken_conf_eval.phpt | |||
| @@ -0,0 +1,14 @@ | |||
| 1 | --TEST-- | ||
| 2 | Broken configuration for eval | ||
| 3 | --SKIPIF-- | ||
| 4 | <?php if (!extension_loaded("snuffleupagus")) print "skip"; ?> | ||
| 5 | <?php if (PHP_VERSION_ID < 80000) print "skip"; ?> | ||
| 6 | --INI-- | ||
| 7 | sp.configuration_file={PWD}/config/broken_conf_eval.ini | ||
| 8 | --FILE-- | ||
| 9 | --EXPECT-- | ||
| 10 | |||
| 11 | Fatal error: [snuffleupagus][0.0.0.0][error][log] There is an issue with the parsing of '"cos,sin': it doesn't look like a valid string on line 1 in Unknown on line 0 | ||
| 12 | |||
| 13 | Fatal error: [snuffleupagus][0.0.0.0][config][log] Invalid configuration file in Unknown on line 0 | ||
| 14 | Could not startup. | ||
diff --git a/src/tests/broken_configuration_php8/broken_conf_expecting_bool.phpt b/src/tests/broken_configuration_php8/broken_conf_expecting_bool.phpt new file mode 100644 index 0000000..682a4f5 --- /dev/null +++ b/src/tests/broken_configuration_php8/broken_conf_expecting_bool.phpt | |||
| @@ -0,0 +1,14 @@ | |||
| 1 | --TEST-- | ||
| 2 | Bad boolean value in configuration | ||
| 3 | --SKIPIF-- | ||
| 4 | <?php if (!extension_loaded("snuffleupagus")) print "skip"; ?> | ||
| 5 | <?php if (PHP_VERSION_ID < 80000) print "skip"; ?> | ||
| 6 | --INI-- | ||
| 7 | sp.configuration_file={PWD}/config/broken_conf_expecting_bool.ini | ||
| 8 | --FILE-- | ||
| 9 | --EXPECT-- | ||
| 10 | |||
| 11 | Fatal error: [snuffleupagus][0.0.0.0][config][log] Trailing chars '337);' at the end of '.enable(1337);' on line 5 in Unknown on line 0 | ||
| 12 | |||
| 13 | Fatal error: [snuffleupagus][0.0.0.0][config][log] Invalid configuration file in Unknown on line 0 | ||
| 14 | Could not startup. | ||
diff --git a/src/tests/broken_configuration_php8/broken_conf_invalid_cidr.phpt b/src/tests/broken_configuration_php8/broken_conf_invalid_cidr.phpt new file mode 100644 index 0000000..f66d8b6 --- /dev/null +++ b/src/tests/broken_configuration_php8/broken_conf_invalid_cidr.phpt | |||
| @@ -0,0 +1,14 @@ | |||
| 1 | --TEST-- | ||
| 2 | Broken configuration | ||
| 3 | --SKIPIF-- | ||
| 4 | <?php if (!extension_loaded("snuffleupagus")) print "skip"; ?> | ||
| 5 | <?php if (PHP_VERSION_ID < 80000) print "skip"; ?> | ||
| 6 | --INI-- | ||
| 7 | sp.configuration_file={PWD}/config/broken_conf_invalid_cidr.ini | ||
| 8 | --FILE-- | ||
| 9 | --EXPECT-- | ||
| 10 | |||
| 11 | Fatal error: [snuffleupagus][0.0.0.0][config][log] '42' isn't a valid ipv4 mask. in Unknown on line 0 | ||
| 12 | |||
| 13 | Fatal error: [snuffleupagus][0.0.0.0][config][log] Invalid configuration file in Unknown on line 0 | ||
| 14 | Could not startup. | ||
diff --git a/src/tests/broken_configuration_php8/broken_conf_invalid_cidr6.phpt b/src/tests/broken_configuration_php8/broken_conf_invalid_cidr6.phpt new file mode 100644 index 0000000..91bd4a2 --- /dev/null +++ b/src/tests/broken_configuration_php8/broken_conf_invalid_cidr6.phpt | |||
| @@ -0,0 +1,14 @@ | |||
| 1 | --TEST-- | ||
| 2 | Broken configuration | ||
| 3 | --SKIPIF-- | ||
| 4 | <?php if (!extension_loaded("snuffleupagus")) print "skip"; ?> | ||
| 5 | <?php if (PHP_VERSION_ID < 80000) print "skip"; ?> | ||
| 6 | --INI-- | ||
| 7 | sp.configuration_file={PWD}/config/broken_conf_invalid_cidr6.ini | ||
| 8 | --FILE-- | ||
| 9 | --EXPECT-- | ||
| 10 | |||
| 11 | Fatal error: [snuffleupagus][0.0.0.0][config][log] 'ZZZ' isn't a valid network mask. in Unknown on line 0 | ||
| 12 | |||
| 13 | Fatal error: [snuffleupagus][0.0.0.0][config][log] Invalid configuration file in Unknown on line 0 | ||
| 14 | Could not startup. | ||
diff --git a/src/tests/broken_configuration_php8/broken_conf_invalid_cidr6_no_slash.phpt b/src/tests/broken_configuration_php8/broken_conf_invalid_cidr6_no_slash.phpt new file mode 100644 index 0000000..c6c8231 --- /dev/null +++ b/src/tests/broken_configuration_php8/broken_conf_invalid_cidr6_no_slash.phpt | |||
| @@ -0,0 +1,14 @@ | |||
| 1 | --TEST-- | ||
| 2 | Broken configuration, invalid cidr for ipv6 because there is no `/` in it | ||
| 3 | --SKIPIF-- | ||
| 4 | <?php if (!extension_loaded("snuffleupagus")) print "skip"; ?> | ||
| 5 | <?php if (PHP_VERSION_ID < 80000) print "skip"; ?> | ||
| 6 | --INI-- | ||
| 7 | sp.configuration_file={PWD}/config/broken_conf_invalid_cidr6_no_slash.ini | ||
| 8 | --FILE-- | ||
| 9 | --EXPECT-- | ||
| 10 | |||
| 11 | Fatal error: [snuffleupagus][0.0.0.0][config][log] '2001:0db8:0000:0000:0000:ff00:0042:8329' isn't a valid network mask, it seems that you forgot a '/'. in Unknown on line 0 | ||
| 12 | |||
| 13 | Fatal error: [snuffleupagus][0.0.0.0][config][log] Invalid configuration file in Unknown on line 0 | ||
| 14 | Could not startup. | ||
diff --git a/src/tests/broken_configuration_php8/broken_conf_invalid_cidr6_too_big.phpt b/src/tests/broken_configuration_php8/broken_conf_invalid_cidr6_too_big.phpt new file mode 100644 index 0000000..47d4a5d --- /dev/null +++ b/src/tests/broken_configuration_php8/broken_conf_invalid_cidr6_too_big.phpt | |||
| @@ -0,0 +1,9 @@ | |||
| 1 | --TEST-- | ||
| 2 | Broken configuration, cidr for ipv6 is too big, that will `mod` to 25. | ||
| 3 | (13337%128 = 25) | ||
| 4 | --SKIPIF-- | ||
| 5 | <?php if (!extension_loaded("snuffleupagus")) print "skip"; ?> | ||
| 6 | --INI-- | ||
| 7 | sp.configuration_file={PWD}/config/broken_conf_invalid_cidr6_too_big.ini | ||
| 8 | --FILE-- | ||
| 9 | --EXPECT-- | ||
diff --git a/src/tests/broken_configuration_php8/broken_conf_invalid_cidr_value.phpt b/src/tests/broken_configuration_php8/broken_conf_invalid_cidr_value.phpt new file mode 100644 index 0000000..dbe5414 --- /dev/null +++ b/src/tests/broken_configuration_php8/broken_conf_invalid_cidr_value.phpt | |||
| @@ -0,0 +1,17 @@ | |||
| 1 | --TEST-- | ||
| 2 | Broken configuration, invalid cidr value | ||
| 3 | (13337%128 = 25) | ||
| 4 | --SKIPIF-- | ||
| 5 | <?php if (!extension_loaded("snuffleupagus")) print "skip"; ?> | ||
| 6 | <?php if (PHP_VERSION_ID < 80000) print "skip"; ?> | ||
| 7 | --INI-- | ||
| 8 | sp.configuration_file={PWD}/config/broken_conf_invalid_cidr_value.ini | ||
| 9 | --FILE-- | ||
| 10 | --EXPECT-- | ||
| 11 | |||
| 12 | Fatal error: [snuffleupagus][0.0.0.0][error][log] A valid string as parameter is expected on line 1 in Unknown on line 0 | ||
| 13 | |||
| 14 | Fatal error: [snuffleupagus][0.0.0.0][config][log] " doesn't contain a valid cidr on line 1 in Unknown on line 0 | ||
| 15 | |||
| 16 | Fatal error: [snuffleupagus][0.0.0.0][config][log] Invalid configuration file in Unknown on line 0 | ||
| 17 | Could not startup. | ||
diff --git a/src/tests/broken_configuration_php8/broken_conf_invalid_filename.phpt b/src/tests/broken_configuration_php8/broken_conf_invalid_filename.phpt new file mode 100644 index 0000000..cb78f85 --- /dev/null +++ b/src/tests/broken_configuration_php8/broken_conf_invalid_filename.phpt | |||
| @@ -0,0 +1,14 @@ | |||
| 1 | --TEST-- | ||
| 2 | Broken configuration filename without absolute path | ||
| 3 | --SKIPIF-- | ||
| 4 | <?php if (!extension_loaded("snuffleupagus")) print "skip"; ?> | ||
| 5 | <?php if (PHP_VERSION_ID < 80000) print "skip"; ?> | ||
| 6 | --INI-- | ||
| 7 | sp.configuration_file={PWD}/config/broken_conf_invalid_filename.ini | ||
| 8 | --FILE-- | ||
| 9 | --EXPECTF-- | ||
| 10 | |||
| 11 | Fatal error: [snuffleupagus][0.0.0.0][config][log] Invalid configuration line: 'sp.disabled_functions.function("sprintf").filename("wrong file name").drop();':'.filename' must be an absolute path or a phar archive on line 1 in Unknown on line 0 | ||
| 12 | |||
| 13 | Fatal error: [snuffleupagus][0.0.0.0][config][log] Invalid configuration file in Unknown on line 0 | ||
| 14 | Could not startup. | ||
diff --git a/src/tests/broken_configuration_php8/broken_conf_invalid_log_media.phpt b/src/tests/broken_configuration_php8/broken_conf_invalid_log_media.phpt new file mode 100644 index 0000000..68581b6 --- /dev/null +++ b/src/tests/broken_configuration_php8/broken_conf_invalid_log_media.phpt | |||
| @@ -0,0 +1,14 @@ | |||
| 1 | --TEST-- | ||
| 2 | Broken configuration filename with improper log media | ||
| 3 | --SKIPIF-- | ||
| 4 | <?php if (!extension_loaded("snuffleupagus")) print "skip"; ?> | ||
| 5 | <?php if (PHP_VERSION_ID < 80000) print "skip"; ?> | ||
| 6 | --INI-- | ||
| 7 | sp.configuration_file={PWD}/config/broken_conf_invalid_log_media.ini | ||
| 8 | --FILE-- | ||
| 9 | --EXPECTF-- | ||
| 10 | |||
| 11 | Fatal error: [snuffleupagus][0.0.0.0][config][log] .log_media() only supports 'syslog' or 'php', on line 1 in Unknown on line 0 | ||
| 12 | |||
| 13 | Fatal error: [snuffleupagus][0.0.0.0][config][log] Invalid configuration file in Unknown on line 0 | ||
| 14 | Could not startup. | ||
diff --git a/src/tests/broken_configuration_php8/broken_conf_invalid_type.phpt b/src/tests/broken_configuration_php8/broken_conf_invalid_type.phpt new file mode 100644 index 0000000..188d610 --- /dev/null +++ b/src/tests/broken_configuration_php8/broken_conf_invalid_type.phpt | |||
| @@ -0,0 +1,14 @@ | |||
| 1 | --TEST-- | ||
| 2 | Broken conf with wrong type | ||
| 3 | --SKIPIF-- | ||
| 4 | <?php if (!extension_loaded("snuffleupagus")) print "skip"; ?> | ||
| 5 | <?php if (PHP_VERSION_ID < 80000) print "skip"; ?> | ||
| 6 | --INI-- | ||
| 7 | sp.configuration_file={PWD}/config/broken_conf_invalid_type.ini | ||
| 8 | --FILE-- | ||
| 9 | --EXPECTF-- | ||
| 10 | |||
| 11 | Fatal error: [snuffleupagus][0.0.0.0][error][log] There is an issue with the parsing of '"totally_wrong"_type")': it doesn't look like a valid string on line 1 in Unknown on line 0 | ||
| 12 | |||
| 13 | Fatal error: [snuffleupagus][0.0.0.0][config][log] Invalid configuration file in Unknown on line 0 | ||
| 14 | Could not startup. | ||
diff --git a/src/tests/broken_configuration_php8/broken_conf_key_value.phpt b/src/tests/broken_configuration_php8/broken_conf_key_value.phpt new file mode 100644 index 0000000..1b51bd7 --- /dev/null +++ b/src/tests/broken_configuration_php8/broken_conf_key_value.phpt | |||
| @@ -0,0 +1,14 @@ | |||
| 1 | --TEST-- | ||
| 2 | Broken configuration | ||
| 3 | --SKIPIF-- | ||
| 4 | <?php if (!extension_loaded("snuffleupagus")) print "skip"; ?> | ||
| 5 | <?php if (PHP_VERSION_ID < 80000) print "skip"; ?> | ||
| 6 | --INI-- | ||
| 7 | sp.configuration_file={PWD}/config/broken_conf_key_value.ini | ||
| 8 | --FILE-- | ||
| 9 | --EXPECT-- | ||
| 10 | |||
| 11 | Fatal error: [snuffleupagus][0.0.0.0][config][log] Invalid configuration line: 'sp.disabled_functions.function("system").var("").value("").key("").drop();':`key` and `value` are mutually exclusive on line 1 in Unknown on line 0 | ||
| 12 | |||
| 13 | Fatal error: [snuffleupagus][0.0.0.0][config][log] Invalid configuration file in Unknown on line 0 | ||
| 14 | Could not startup. | ||
diff --git a/src/tests/broken_configuration_php8/broken_conf_line_empty_string.phpt b/src/tests/broken_configuration_php8/broken_conf_line_empty_string.phpt new file mode 100644 index 0000000..2d370ac --- /dev/null +++ b/src/tests/broken_configuration_php8/broken_conf_line_empty_string.phpt | |||
| @@ -0,0 +1,14 @@ | |||
| 1 | --TEST-- | ||
| 2 | Configuration line with an empty string | ||
| 3 | --SKIPIF-- | ||
| 4 | <?php if (!extension_loaded("snuffleupagus")) print "skip"; ?> | ||
| 5 | <?php if (PHP_VERSION_ID < 80000) print "skip"; ?> | ||
| 6 | --INI-- | ||
| 7 | sp.configuration_file={PWD}/config/broken_conf_line_empty_string.ini | ||
| 8 | --FILE-- | ||
| 9 | --EXPECT-- | ||
| 10 | |||
| 11 | Fatal error: [snuffleupagus][0.0.0.0][error][log] A valid string as parameter is expected on line 1 in Unknown on line 0 | ||
| 12 | |||
| 13 | Fatal error: [snuffleupagus][0.0.0.0][config][log] Invalid configuration file in Unknown on line 0 | ||
| 14 | Could not startup. | ||
diff --git a/src/tests/broken_configuration_php8/broken_conf_line_no_closing.phpt b/src/tests/broken_configuration_php8/broken_conf_line_no_closing.phpt new file mode 100644 index 0000000..d3c826f --- /dev/null +++ b/src/tests/broken_configuration_php8/broken_conf_line_no_closing.phpt | |||
| @@ -0,0 +1,14 @@ | |||
| 1 | --TEST-- | ||
| 2 | Configuration line without closing parenthese | ||
| 3 | --SKIPIF-- | ||
| 4 | <?php if (!extension_loaded("snuffleupagus")) print "skip"; ?> | ||
| 5 | <?php if (PHP_VERSION_ID < 80000) print "skip"; ?> | ||
| 6 | --INI-- | ||
| 7 | sp.configuration_file={PWD}/config/broken_conf_line_no_closing.ini | ||
| 8 | --FILE-- | ||
| 9 | --EXPECT-- | ||
| 10 | |||
| 11 | Fatal error: [snuffleupagus][0.0.0.0][error][log] There is an issue with the parsing of '"123"': it doesn't look like a valid string on line 1 in Unknown on line 0 | ||
| 12 | |||
| 13 | Fatal error: [snuffleupagus][0.0.0.0][config][log] Invalid configuration file in Unknown on line 0 | ||
| 14 | Could not startup. | ||
diff --git a/src/tests/broken_configuration_php8/broken_conf_local_var_1.phpt b/src/tests/broken_configuration_php8/broken_conf_local_var_1.phpt new file mode 100644 index 0000000..52cd962 --- /dev/null +++ b/src/tests/broken_configuration_php8/broken_conf_local_var_1.phpt | |||
| @@ -0,0 +1,16 @@ | |||
| 1 | --TEST-- | ||
| 2 | Broken configuration | ||
| 3 | --SKIPIF-- | ||
| 4 | <?php if (!extension_loaded("snuffleupagus")) print "skip"; ?> | ||
| 5 | <?php if (PHP_VERSION_ID < 80000) print "skip"; ?> | ||
| 6 | --INI-- | ||
| 7 | sp.configuration_file={PWD}/config/broken_conf_local_var_1.ini | ||
| 8 | --FILE-- | ||
| 9 | --EXPECT-- | ||
| 10 | |||
| 11 | Fatal error: [snuffleupagus][0.0.0.0][config][log] Invalid `]` position. in Unknown on line 0 | ||
| 12 | |||
| 13 | Fatal error: [snuffleupagus][0.0.0.0][config][log] Invalid value ']' for `var` on line 1 in Unknown on line 0 | ||
| 14 | |||
| 15 | Fatal error: [snuffleupagus][0.0.0.0][config][log] Invalid configuration file in Unknown on line 0 | ||
| 16 | Could not startup. | ||
diff --git a/src/tests/broken_configuration_php8/broken_conf_local_var_10.phpt b/src/tests/broken_configuration_php8/broken_conf_local_var_10.phpt new file mode 100644 index 0000000..7817a19 --- /dev/null +++ b/src/tests/broken_configuration_php8/broken_conf_local_var_10.phpt | |||
| @@ -0,0 +1,16 @@ | |||
| 1 | --TEST-- | ||
| 2 | Broken configuration | ||
| 3 | --SKIPIF-- | ||
| 4 | <?php if (!extension_loaded("snuffleupagus")) print "skip"; ?> | ||
| 5 | <?php if (PHP_VERSION_ID < 80000) print "skip"; ?> | ||
| 6 | --INI-- | ||
| 7 | sp.configuration_file={PWD}/config/broken_conf_local_var_10.ini | ||
| 8 | --FILE-- | ||
| 9 | --EXPECT-- | ||
| 10 | |||
| 11 | Fatal error: [snuffleupagus][0.0.0.0][config][log] Invalid `]` position. in Unknown on line 0 | ||
| 12 | |||
| 13 | Fatal error: [snuffleupagus][0.0.0.0][config][log] Invalid value 'asd[asd]asd' for `var` on line 1 in Unknown on line 0 | ||
| 14 | |||
| 15 | Fatal error: [snuffleupagus][0.0.0.0][config][log] Invalid configuration file in Unknown on line 0 | ||
| 16 | Could not startup. | ||
diff --git a/src/tests/broken_configuration_php8/broken_conf_local_var_11.phpt b/src/tests/broken_configuration_php8/broken_conf_local_var_11.phpt new file mode 100644 index 0000000..06099a5 --- /dev/null +++ b/src/tests/broken_configuration_php8/broken_conf_local_var_11.phpt | |||
| @@ -0,0 +1,16 @@ | |||
| 1 | --TEST-- | ||
| 2 | Broken configuration | ||
| 3 | --SKIPIF-- | ||
| 4 | <?php if (!extension_loaded("snuffleupagus")) print "skip"; ?> | ||
| 5 | <?php if (PHP_VERSION_ID < 80000) print "skip"; ?> | ||
| 6 | --INI-- | ||
| 7 | sp.configuration_file={PWD}/config/broken_conf_local_var_11.ini | ||
| 8 | --FILE-- | ||
| 9 | --EXPECT-- | ||
| 10 | |||
| 11 | Fatal error: [snuffleupagus][0.0.0.0][config][log] Invalid `::` position. in Unknown on line 0 | ||
| 12 | |||
| 13 | Fatal error: [snuffleupagus][0.0.0.0][config][log] Invalid value 'asd::' for `param` on line 1 in Unknown on line 0 | ||
| 14 | |||
| 15 | Fatal error: [snuffleupagus][0.0.0.0][config][log] Invalid configuration file in Unknown on line 0 | ||
| 16 | Could not startup. | ||
diff --git a/src/tests/broken_configuration_php8/broken_conf_local_var_12.phpt b/src/tests/broken_configuration_php8/broken_conf_local_var_12.phpt new file mode 100644 index 0000000..df753df --- /dev/null +++ b/src/tests/broken_configuration_php8/broken_conf_local_var_12.phpt | |||
| @@ -0,0 +1,14 @@ | |||
| 1 | --TEST-- | ||
| 2 | Broken configuration | ||
| 3 | --SKIPIF-- | ||
| 4 | <?php if (!extension_loaded("snuffleupagus")) print "skip"; ?> | ||
| 5 | <?php if (PHP_VERSION_ID < 80000) print "skip"; ?> | ||
| 6 | --INI-- | ||
| 7 | sp.configuration_file={PWD}/config/broken_conf_local_var_12.ini | ||
| 8 | --FILE-- | ||
| 9 | --EXPECT-- | ||
| 10 | |||
| 11 | Fatal error: [snuffleupagus][0.0.0.0][config][log] Empty value in `var` on line 1 in Unknown on line 0 | ||
| 12 | |||
| 13 | Fatal error: [snuffleupagus][0.0.0.0][config][log] Invalid configuration file in Unknown on line 0 | ||
| 14 | Could not startup. | ||
diff --git a/src/tests/broken_configuration_php8/broken_conf_local_var_13.phpt b/src/tests/broken_configuration_php8/broken_conf_local_var_13.phpt new file mode 100644 index 0000000..80bc068 --- /dev/null +++ b/src/tests/broken_configuration_php8/broken_conf_local_var_13.phpt | |||
| @@ -0,0 +1,16 @@ | |||
| 1 | --TEST-- | ||
| 2 | Broken configuration | ||
| 3 | --SKIPIF-- | ||
| 4 | <?php if (!extension_loaded("snuffleupagus")) print "skip"; ?> | ||
| 5 | <?php if (PHP_VERSION_ID < 80000) print "skip"; ?> | ||
| 6 | --INI-- | ||
| 7 | sp.configuration_file={PWD}/config/broken_conf_local_var_13.ini | ||
| 8 | --FILE-- | ||
| 9 | --EXPECT-- | ||
| 10 | |||
| 11 | Fatal error: [snuffleupagus][0.0.0.0][config][log] Invalid `->` position. in Unknown on line 0 | ||
| 12 | |||
| 13 | Fatal error: [snuffleupagus][0.0.0.0][config][log] Invalid value 'asd->asd' for `var` on line 1 in Unknown on line 0 | ||
| 14 | |||
| 15 | Fatal error: [snuffleupagus][0.0.0.0][config][log] Invalid configuration file in Unknown on line 0 | ||
| 16 | Could not startup. | ||
diff --git a/src/tests/broken_configuration_php8/broken_conf_local_var_14.phpt b/src/tests/broken_configuration_php8/broken_conf_local_var_14.phpt new file mode 100644 index 0000000..749c317 --- /dev/null +++ b/src/tests/broken_configuration_php8/broken_conf_local_var_14.phpt | |||
| @@ -0,0 +1,16 @@ | |||
| 1 | --TEST-- | ||
| 2 | Broken configuration | ||
| 3 | --SKIPIF-- | ||
| 4 | <?php if (!extension_loaded("snuffleupagus")) print "skip"; ?> | ||
| 5 | <?php if (PHP_VERSION_ID < 80000) print "skip"; ?> | ||
| 6 | --INI-- | ||
| 7 | sp.configuration_file={PWD}/config/broken_conf_local_var_14.ini | ||
| 8 | --FILE-- | ||
| 9 | --EXPECT-- | ||
| 10 | |||
| 11 | Fatal error: [snuffleupagus][0.0.0.0][config][log] Invalid var name: $i+valid var name . in Unknown on line 0 | ||
| 12 | |||
| 13 | Fatal error: [snuffleupagus][0.0.0.0][config][log] Invalid value '$i+valid var name ' for `var` on line 1 in Unknown on line 0 | ||
| 14 | |||
| 15 | Fatal error: [snuffleupagus][0.0.0.0][config][log] Invalid configuration file in Unknown on line 0 | ||
| 16 | Could not startup. | ||
diff --git a/src/tests/broken_configuration_php8/broken_conf_local_var_15.phpt b/src/tests/broken_configuration_php8/broken_conf_local_var_15.phpt new file mode 100644 index 0000000..97eab54 --- /dev/null +++ b/src/tests/broken_configuration_php8/broken_conf_local_var_15.phpt | |||
| @@ -0,0 +1,16 @@ | |||
| 1 | --TEST-- | ||
| 2 | Broken configuration | ||
| 3 | --SKIPIF-- | ||
| 4 | <?php if (!extension_loaded("snuffleupagus")) print "skip"; ?> | ||
| 5 | <?php if (PHP_VERSION_ID < 80000) print "skip"; ?> | ||
| 6 | --INI-- | ||
| 7 | sp.configuration_file={PWD}/config/broken_conf_local_var_15.ini | ||
| 8 | --FILE-- | ||
| 9 | --EXPECT-- | ||
| 10 | |||
| 11 | Fatal error: [snuffleupagus][0.0.0.0][config][log] Invalid var name: $i$$!@#. in Unknown on line 0 | ||
| 12 | |||
| 13 | Fatal error: [snuffleupagus][0.0.0.0][config][log] Invalid value '$i$$!@#->qwe' for `var` on line 1 in Unknown on line 0 | ||
| 14 | |||
| 15 | Fatal error: [snuffleupagus][0.0.0.0][config][log] Invalid configuration file in Unknown on line 0 | ||
| 16 | Could not startup. | ||
diff --git a/src/tests/broken_configuration_php8/broken_conf_local_var_16.phpt b/src/tests/broken_configuration_php8/broken_conf_local_var_16.phpt new file mode 100644 index 0000000..c643144 --- /dev/null +++ b/src/tests/broken_configuration_php8/broken_conf_local_var_16.phpt | |||
| @@ -0,0 +1,16 @@ | |||
| 1 | --TEST-- | ||
| 2 | Broken configuration | ||
| 3 | --SKIPIF-- | ||
| 4 | <?php if (!extension_loaded("snuffleupagus")) print "skip"; ?> | ||
| 5 | <?php if (PHP_VERSION_ID < 80000) print "skip"; ?> | ||
| 6 | --INI-- | ||
| 7 | sp.configuration_file={PWD}/config/broken_conf_local_var_16.ini | ||
| 8 | --FILE-- | ||
| 9 | --EXPECT-- | ||
| 10 | |||
| 11 | Fatal error: [snuffleupagus][0.0.0.0][config][log] Missing a closing quote. in Unknown on line 0 | ||
| 12 | |||
| 13 | Fatal error: [snuffleupagus][0.0.0.0][config][log] Invalid value '"' for `var` on line 1 in Unknown on line 0 | ||
| 14 | |||
| 15 | Fatal error: [snuffleupagus][0.0.0.0][config][log] Invalid configuration file in Unknown on line 0 | ||
| 16 | Could not startup. | ||
diff --git a/src/tests/broken_configuration_php8/broken_conf_local_var_2.phpt b/src/tests/broken_configuration_php8/broken_conf_local_var_2.phpt new file mode 100644 index 0000000..8b769af --- /dev/null +++ b/src/tests/broken_configuration_php8/broken_conf_local_var_2.phpt | |||
| @@ -0,0 +1,16 @@ | |||
| 1 | --TEST-- | ||
| 2 | Broken configuration | ||
| 3 | --SKIPIF-- | ||
| 4 | <?php if (!extension_loaded("snuffleupagus")) print "skip"; ?> | ||
| 5 | <?php if (PHP_VERSION_ID < 80000) print "skip"; ?> | ||
| 6 | --INI-- | ||
| 7 | sp.configuration_file={PWD}/config/broken_conf_local_var_2.ini | ||
| 8 | --FILE-- | ||
| 9 | --EXPECT-- | ||
| 10 | |||
| 11 | Fatal error: [snuffleupagus][0.0.0.0][config][log] Invalid `"` position. in Unknown on line 0 | ||
| 12 | |||
| 13 | Fatal error: [snuffleupagus][0.0.0.0][config][log] Invalid value '""asd' for `var` on line 1 in Unknown on line 0 | ||
| 14 | |||
| 15 | Fatal error: [snuffleupagus][0.0.0.0][config][log] Invalid configuration file in Unknown on line 0 | ||
| 16 | Could not startup. | ||
diff --git a/src/tests/broken_configuration_php8/broken_conf_local_var_3.phpt b/src/tests/broken_configuration_php8/broken_conf_local_var_3.phpt new file mode 100644 index 0000000..850a977 --- /dev/null +++ b/src/tests/broken_configuration_php8/broken_conf_local_var_3.phpt | |||
| @@ -0,0 +1,16 @@ | |||
| 1 | --TEST-- | ||
| 2 | Broken configuration | ||
| 3 | --SKIPIF-- | ||
| 4 | <?php if (!extension_loaded("snuffleupagus")) print "skip"; ?> | ||
| 5 | <?php if (PHP_VERSION_ID < 80000) print "skip"; ?> | ||
| 6 | --INI-- | ||
| 7 | sp.configuration_file={PWD}/config/broken_conf_local_var_3.ini | ||
| 8 | --FILE-- | ||
| 9 | --EXPECT-- | ||
| 10 | |||
| 11 | Fatal error: [snuffleupagus][0.0.0.0][config][log] Invalid `->` position. in Unknown on line 0 | ||
| 12 | |||
| 13 | Fatal error: [snuffleupagus][0.0.0.0][config][log] Invalid value '$qwe->::' for `var` on line 1 in Unknown on line 0 | ||
| 14 | |||
| 15 | Fatal error: [snuffleupagus][0.0.0.0][config][log] Invalid configuration file in Unknown on line 0 | ||
| 16 | Could not startup. | ||
diff --git a/src/tests/broken_configuration_php8/broken_conf_local_var_4.phpt b/src/tests/broken_configuration_php8/broken_conf_local_var_4.phpt new file mode 100644 index 0000000..5146590 --- /dev/null +++ b/src/tests/broken_configuration_php8/broken_conf_local_var_4.phpt | |||
| @@ -0,0 +1,16 @@ | |||
| 1 | --TEST-- | ||
| 2 | Broken configuration | ||
| 3 | --SKIPIF-- | ||
| 4 | <?php if (!extension_loaded("snuffleupagus")) print "skip"; ?> | ||
| 5 | <?php if (PHP_VERSION_ID < 80000) print "skip"; ?> | ||
| 6 | --INI-- | ||
| 7 | sp.configuration_file={PWD}/config/broken_conf_local_var_4.ini | ||
| 8 | --FILE-- | ||
| 9 | --EXPECT-- | ||
| 10 | |||
| 11 | Fatal error: [snuffleupagus][0.0.0.0][config][log] Invalid `"` position. in Unknown on line 0 | ||
| 12 | |||
| 13 | Fatal error: [snuffleupagus][0.0.0.0][config][log] Invalid value '"asd"asd[]' for `var` on line 1 in Unknown on line 0 | ||
| 14 | |||
| 15 | Fatal error: [snuffleupagus][0.0.0.0][config][log] Invalid configuration file in Unknown on line 0 | ||
| 16 | Could not startup. | ||
diff --git a/src/tests/broken_configuration_php8/broken_conf_local_var_5.phpt b/src/tests/broken_configuration_php8/broken_conf_local_var_5.phpt new file mode 100644 index 0000000..a7f8183 --- /dev/null +++ b/src/tests/broken_configuration_php8/broken_conf_local_var_5.phpt | |||
| @@ -0,0 +1,16 @@ | |||
| 1 | --TEST-- | ||
| 2 | Broken configuration | ||
| 3 | --SKIPIF-- | ||
| 4 | <?php if (!extension_loaded("snuffleupagus")) print "skip"; ?> | ||
| 5 | <?php if (PHP_VERSION_ID < 80000) print "skip"; ?> | ||
| 6 | --INI-- | ||
| 7 | sp.configuration_file={PWD}/config/broken_conf_local_var_5.ini | ||
| 8 | --FILE-- | ||
| 9 | --EXPECT-- | ||
| 10 | |||
| 11 | Fatal error: [snuffleupagus][0.0.0.0][config][log] Invalid `'` position. in Unknown on line 0 | ||
| 12 | |||
| 13 | Fatal error: [snuffleupagus][0.0.0.0][config][log] Invalid value ''asd'asd[]' for `var` on line 1 in Unknown on line 0 | ||
| 14 | |||
| 15 | Fatal error: [snuffleupagus][0.0.0.0][config][log] Invalid configuration file in Unknown on line 0 | ||
| 16 | Could not startup. | ||
diff --git a/src/tests/broken_configuration_php8/broken_conf_local_var_6.phpt b/src/tests/broken_configuration_php8/broken_conf_local_var_6.phpt new file mode 100644 index 0000000..283cb41 --- /dev/null +++ b/src/tests/broken_configuration_php8/broken_conf_local_var_6.phpt | |||
| @@ -0,0 +1,16 @@ | |||
| 1 | --TEST-- | ||
| 2 | Broken configuration | ||
| 3 | --SKIPIF-- | ||
| 4 | <?php if (!extension_loaded("snuffleupagus")) print "skip"; ?> | ||
| 5 | <?php if (PHP_VERSION_ID < 80000) print "skip"; ?> | ||
| 6 | --INI-- | ||
| 7 | sp.configuration_file={PWD}/config/broken_conf_local_var_6.ini | ||
| 8 | --FILE-- | ||
| 9 | --EXPECT-- | ||
| 10 | |||
| 11 | Fatal error: [snuffleupagus][0.0.0.0][config][log] Invalid `'` position. in Unknown on line 0 | ||
| 12 | |||
| 13 | Fatal error: [snuffleupagus][0.0.0.0][config][log] Invalid value '''asd' for `var` on line 1 in Unknown on line 0 | ||
| 14 | |||
| 15 | Fatal error: [snuffleupagus][0.0.0.0][config][log] Invalid configuration file in Unknown on line 0 | ||
| 16 | Could not startup. | ||
diff --git a/src/tests/broken_configuration_php8/broken_conf_local_var_7.phpt b/src/tests/broken_configuration_php8/broken_conf_local_var_7.phpt new file mode 100644 index 0000000..223e599 --- /dev/null +++ b/src/tests/broken_configuration_php8/broken_conf_local_var_7.phpt | |||
| @@ -0,0 +1,16 @@ | |||
| 1 | --TEST-- | ||
| 2 | Broken configuration | ||
| 3 | --SKIPIF-- | ||
| 4 | <?php if (!extension_loaded("snuffleupagus")) print "skip"; ?> | ||
| 5 | <?php if (PHP_VERSION_ID < 80000) print "skip"; ?> | ||
| 6 | --INI-- | ||
| 7 | sp.configuration_file={PWD}/config/broken_conf_local_var_7.ini | ||
| 8 | --FILE-- | ||
| 9 | --EXPECT-- | ||
| 10 | |||
| 11 | Fatal error: [snuffleupagus][0.0.0.0][config][log] Invalid `->` position. in Unknown on line 0 | ||
| 12 | |||
| 13 | Fatal error: [snuffleupagus][0.0.0.0][config][log] Invalid value 'asd-->' for `var` on line 1 in Unknown on line 0 | ||
| 14 | |||
| 15 | Fatal error: [snuffleupagus][0.0.0.0][config][log] Invalid configuration file in Unknown on line 0 | ||
| 16 | Could not startup. | ||
diff --git a/src/tests/broken_configuration_php8/broken_conf_local_var_8.phpt b/src/tests/broken_configuration_php8/broken_conf_local_var_8.phpt new file mode 100644 index 0000000..058b5dd --- /dev/null +++ b/src/tests/broken_configuration_php8/broken_conf_local_var_8.phpt | |||
| @@ -0,0 +1,16 @@ | |||
| 1 | --TEST-- | ||
| 2 | Broken configuration | ||
| 3 | --SKIPIF-- | ||
| 4 | <?php if (!extension_loaded("snuffleupagus")) print "skip"; ?> | ||
| 5 | <?php if (PHP_VERSION_ID < 80000) print "skip"; ?> | ||
| 6 | --INI-- | ||
| 7 | sp.configuration_file={PWD}/config/broken_conf_local_var_8.ini | ||
| 8 | --FILE-- | ||
| 9 | --EXPECT-- | ||
| 10 | |||
| 11 | Fatal error: [snuffleupagus][0.0.0.0][config][log] Invalid `]` position. in Unknown on line 0 | ||
| 12 | |||
| 13 | Fatal error: [snuffleupagus][0.0.0.0][config][log] Invalid value 'asd[asd]"asd"' for `var` on line 1 in Unknown on line 0 | ||
| 14 | |||
| 15 | Fatal error: [snuffleupagus][0.0.0.0][config][log] Invalid configuration file in Unknown on line 0 | ||
| 16 | Could not startup. | ||
diff --git a/src/tests/broken_configuration_php8/broken_conf_local_var_9.phpt b/src/tests/broken_configuration_php8/broken_conf_local_var_9.phpt new file mode 100644 index 0000000..c1eeae6 --- /dev/null +++ b/src/tests/broken_configuration_php8/broken_conf_local_var_9.phpt | |||
| @@ -0,0 +1,16 @@ | |||
| 1 | --TEST-- | ||
| 2 | Broken configuration | ||
| 3 | --SKIPIF-- | ||
| 4 | <?php if (!extension_loaded("snuffleupagus")) print "skip"; ?> | ||
| 5 | <?php if (PHP_VERSION_ID < 80000) print "skip"; ?> | ||
| 6 | --INI-- | ||
| 7 | sp.configuration_file={PWD}/config/broken_conf_local_var_9.ini | ||
| 8 | --FILE-- | ||
| 9 | --EXPECT-- | ||
| 10 | |||
| 11 | Fatal error: [snuffleupagus][0.0.0.0][config][log] Invalid `]` position. in Unknown on line 0 | ||
| 12 | |||
| 13 | Fatal error: [snuffleupagus][0.0.0.0][config][log] Invalid value 'asd[asd]'asd'' for `var` on line 1 in Unknown on line 0 | ||
| 14 | |||
| 15 | Fatal error: [snuffleupagus][0.0.0.0][config][log] Invalid configuration file in Unknown on line 0 | ||
| 16 | Could not startup. | ||
diff --git a/src/tests/broken_configuration_php8/broken_conf_lots_of_quotes.phpt b/src/tests/broken_configuration_php8/broken_conf_lots_of_quotes.phpt new file mode 100644 index 0000000..e599e62 --- /dev/null +++ b/src/tests/broken_configuration_php8/broken_conf_lots_of_quotes.phpt | |||
| @@ -0,0 +1,14 @@ | |||
| 1 | --TEST-- | ||
| 2 | Configuration line with too many quotes | ||
| 3 | --SKIPIF-- | ||
| 4 | <?php if (!extension_loaded("snuffleupagus")) print "skip"; ?> | ||
| 5 | <?php if (PHP_VERSION_ID < 80000) print "skip"; ?> | ||
| 6 | --INI-- | ||
| 7 | sp.configuration_file={PWD}/config/broken_conf_lots_of_quotes.ini | ||
| 8 | --FILE-- | ||
| 9 | --EXPECT-- | ||
| 10 | |||
| 11 | Fatal error: [snuffleupagus][0.0.0.0][error][log] There is an issue with the parsing of '"this\"is a weird\"\"\"cookie\"name"");': it doesn't look like a valid string on line 1 in Unknown on line 0 | ||
| 12 | |||
| 13 | Fatal error: [snuffleupagus][0.0.0.0][config][log] Invalid configuration file in Unknown on line 0 | ||
| 14 | Could not startup. | ||
diff --git a/src/tests/broken_configuration_php8/broken_conf_missing_script.phpt b/src/tests/broken_configuration_php8/broken_conf_missing_script.phpt new file mode 100644 index 0000000..2ddb70f --- /dev/null +++ b/src/tests/broken_configuration_php8/broken_conf_missing_script.phpt | |||
| @@ -0,0 +1,17 @@ | |||
| 1 | --TEST-- | ||
| 2 | Invalid configuration file for upload | ||
| 3 | --SKIPIF-- | ||
| 4 | <?php if (PHP_VERSION_ID < 80000) print "skip"; ?> | ||
| 5 | --INI-- | ||
| 6 | file_uploads=1 | ||
| 7 | sp.configuration_file={PWD}/config/broken_conf_missing_script.ini | ||
| 8 | --FILE-- | ||
| 9 | <?php | ||
| 10 | echo 1; | ||
| 11 | ?> | ||
| 12 | --EXPECTF-- | ||
| 13 | |||
| 14 | Fatal error: [snuffleupagus][0.0.0.0][config][log] The `script` directive is mandatory in '.enable();' on line 1 in Unknown on line 0 | ||
| 15 | |||
| 16 | Fatal error: [snuffleupagus][0.0.0.0][config][log] Invalid configuration file in Unknown on line 0 | ||
| 17 | Could not startup. | ||
diff --git a/src/tests/broken_configuration_php8/broken_conf_mutually_exclusive.phpt b/src/tests/broken_configuration_php8/broken_conf_mutually_exclusive.phpt new file mode 100644 index 0000000..800cffa --- /dev/null +++ b/src/tests/broken_configuration_php8/broken_conf_mutually_exclusive.phpt | |||
| @@ -0,0 +1,14 @@ | |||
| 1 | --TEST-- | ||
| 2 | Broken configuration | ||
| 3 | --SKIPIF-- | ||
| 4 | <?php if (!extension_loaded("snuffleupagus")) print "skip"; ?> | ||
| 5 | <?php if (PHP_VERSION_ID < 80000) print "skip"; ?> | ||
| 6 | --INI-- | ||
| 7 | sp.configuration_file={PWD}/config/broken_conf_mutually_exclusive.ini | ||
| 8 | --FILE-- | ||
| 9 | --EXPECT-- | ||
| 10 | |||
| 11 | Fatal error: [snuffleupagus][0.0.0.0][config][log] Invalid configuration line: 'sp.disabled_functions.function("system").param("id").value("42").value_r("^id$").drop();': '.r_value' and '.value' are mutually exclusive on line 1 in Unknown on line 0 | ||
| 12 | |||
| 13 | Fatal error: [snuffleupagus][0.0.0.0][config][log] Invalid configuration file in Unknown on line 0 | ||
| 14 | Could not startup. | ||
diff --git a/src/tests/broken_configuration_php8/broken_conf_mutually_exclusive10.phpt b/src/tests/broken_configuration_php8/broken_conf_mutually_exclusive10.phpt new file mode 100644 index 0000000..c863bf9 --- /dev/null +++ b/src/tests/broken_configuration_php8/broken_conf_mutually_exclusive10.phpt | |||
| @@ -0,0 +1,14 @@ | |||
| 1 | --TEST-- | ||
| 2 | Broken configuration - enabled/disabled readonly | ||
| 3 | --SKIPIF-- | ||
| 4 | <?php if (!extension_loaded("snuffleupagus")) print "skip"; ?> | ||
| 5 | <?php if (PHP_VERSION_ID < 80000) print "skip"; ?> | ||
| 6 | --INI-- | ||
| 7 | sp.configuration_file={PWD}/config/broken_conf_mutually_exclusive10.ini | ||
| 8 | --FILE-- | ||
| 9 | --EXPECT-- | ||
| 10 | |||
| 11 | Fatal error: [snuffleupagus][0.0.0.0][config][log] A rule can't be enabled and disabled on line 1 in Unknown on line 0 | ||
| 12 | |||
| 13 | Fatal error: [snuffleupagus][0.0.0.0][config][log] Invalid configuration file in Unknown on line 0 | ||
| 14 | Could not startup. | ||
diff --git a/src/tests/broken_configuration_php8/broken_conf_mutually_exclusive11.phpt b/src/tests/broken_configuration_php8/broken_conf_mutually_exclusive11.phpt new file mode 100644 index 0000000..6bdb959 --- /dev/null +++ b/src/tests/broken_configuration_php8/broken_conf_mutually_exclusive11.phpt | |||
| @@ -0,0 +1,14 @@ | |||
| 1 | --TEST-- | ||
| 2 | Broken configuration - ret and var are mutually exclusives | ||
| 3 | --SKIPIF-- | ||
| 4 | <?php if (!extension_loaded("snuffleupagus")) print "skip"; ?> | ||
| 5 | <?php if (PHP_VERSION_ID < 80000) print "skip"; ?> | ||
| 6 | --INI-- | ||
| 7 | sp.configuration_file={PWD}/config/broken_conf_mutually_exclusive11.ini | ||
| 8 | --FILE-- | ||
| 9 | --EXPECT-- | ||
| 10 | |||
| 11 | Fatal error: [snuffleupagus][0.0.0.0][config][log] Invalid configuration line: 'sp.disabled_functions.function("strcmp").drop().ret("hip").var("hop");':`ret` and `var` are mutually exclusive on line 1 in Unknown on line 0 | ||
| 12 | |||
| 13 | Fatal error: [snuffleupagus][0.0.0.0][config][log] Invalid configuration file in Unknown on line 0 | ||
| 14 | Could not startup. | ||
diff --git a/src/tests/broken_configuration_php8/broken_conf_mutually_exclusive12.phpt b/src/tests/broken_configuration_php8/broken_conf_mutually_exclusive12.phpt new file mode 100644 index 0000000..1855fca --- /dev/null +++ b/src/tests/broken_configuration_php8/broken_conf_mutually_exclusive12.phpt | |||
| @@ -0,0 +1,14 @@ | |||
| 1 | --TEST-- | ||
| 2 | Broken configuration - ret and value are mutually exclusive | ||
| 3 | --SKIPIF-- | ||
| 4 | <?php if (!extension_loaded("snuffleupagus")) print "skip"; ?> | ||
| 5 | <?php if (PHP_VERSION_ID < 80000) print "skip"; ?> | ||
| 6 | --INI-- | ||
| 7 | sp.configuration_file={PWD}/config/broken_conf_mutually_exclusive12.ini | ||
| 8 | --FILE-- | ||
| 9 | --EXPECT-- | ||
| 10 | |||
| 11 | Fatal error: [snuffleupagus][0.0.0.0][config][log] Invalid configuration line: 'sp.disabled_functions.function("strcmp").drop().ret("hip").value("hop");':`ret` and `value` are mutually exclusive on line 1 in Unknown on line 0 | ||
| 12 | |||
| 13 | Fatal error: [snuffleupagus][0.0.0.0][config][log] Invalid configuration file in Unknown on line 0 | ||
| 14 | Could not startup. | ||
diff --git a/src/tests/broken_configuration_php8/broken_conf_mutually_exclusive2.phpt b/src/tests/broken_configuration_php8/broken_conf_mutually_exclusive2.phpt new file mode 100644 index 0000000..286ea04 --- /dev/null +++ b/src/tests/broken_configuration_php8/broken_conf_mutually_exclusive2.phpt | |||
| @@ -0,0 +1,14 @@ | |||
| 1 | --TEST-- | ||
| 2 | Broken configuration | ||
| 3 | --SKIPIF-- | ||
| 4 | <?php if (!extension_loaded("snuffleupagus")) print "skip"; ?> | ||
| 5 | <?php if (PHP_VERSION_ID < 80000) print "skip"; ?> | ||
| 6 | --INI-- | ||
| 7 | sp.configuration_file={PWD}/config/broken_conf_mutually_exclusive2.ini | ||
| 8 | --FILE-- | ||
| 9 | --EXPECT-- | ||
| 10 | |||
| 11 | Fatal error: [snuffleupagus][0.0.0.0][config][log] Invalid configuration line: 'sp.disabled_functions.function("system").function_r("system").param("id").value("42").drop();': '.r_function' and '.function' are mutually exclusive on line 1 in Unknown on line 0 | ||
| 12 | |||
| 13 | Fatal error: [snuffleupagus][0.0.0.0][config][log] Invalid configuration file in Unknown on line 0 | ||
| 14 | Could not startup. | ||
diff --git a/src/tests/broken_configuration_php8/broken_conf_mutually_exclusive3.phpt b/src/tests/broken_configuration_php8/broken_conf_mutually_exclusive3.phpt new file mode 100644 index 0000000..b377179 --- /dev/null +++ b/src/tests/broken_configuration_php8/broken_conf_mutually_exclusive3.phpt | |||
| @@ -0,0 +1,14 @@ | |||
| 1 | --TEST-- | ||
| 2 | Broken configuration | ||
| 3 | --SKIPIF-- | ||
| 4 | <?php if (!extension_loaded("snuffleupagus")) print "skip"; ?> | ||
| 5 | <?php if (PHP_VERSION_ID < 80000) print "skip"; ?> | ||
| 6 | --INI-- | ||
| 7 | sp.configuration_file={PWD}/config/broken_conf_mutually_exclusive3.ini | ||
| 8 | --FILE-- | ||
| 9 | --EXPECT-- | ||
| 10 | |||
| 11 | Fatal error: [snuffleupagus][0.0.0.0][config][log] Invalid configuration line: 'sp.disabled_functions.function("system").param("id").value("42").filename_r("^id$").filename("pouet.txt").drop();': '.r_filename' and '.filename' are mutually exclusive on line 1 in Unknown on line 0 | ||
| 12 | |||
| 13 | Fatal error: [snuffleupagus][0.0.0.0][config][log] Invalid configuration file in Unknown on line 0 | ||
| 14 | Could not startup. | ||
diff --git a/src/tests/broken_configuration_php8/broken_conf_mutually_exclusive4.phpt b/src/tests/broken_configuration_php8/broken_conf_mutually_exclusive4.phpt new file mode 100644 index 0000000..5f22a47 --- /dev/null +++ b/src/tests/broken_configuration_php8/broken_conf_mutually_exclusive4.phpt | |||
| @@ -0,0 +1,14 @@ | |||
| 1 | --TEST-- | ||
| 2 | Broken configuration | ||
| 3 | --SKIPIF-- | ||
| 4 | <?php if (!extension_loaded("snuffleupagus")) print "skip"; ?> | ||
| 5 | <?php if (PHP_VERSION_ID < 80000) print "skip"; ?> | ||
| 6 | --INI-- | ||
| 7 | sp.configuration_file={PWD}/config/broken_conf_mutually_exclusive4.ini | ||
| 8 | --FILE-- | ||
| 9 | --EXPECT-- | ||
| 10 | |||
| 11 | Fatal error: [snuffleupagus][0.0.0.0][config][log] Invalid configuration line: 'sp.disabled_functions.function("system").param("id").value("42").param_r("^id$").drop();':'.r_param', '.param' and '.pos' are mutually exclusive on line 1 in Unknown on line 0 | ||
| 12 | |||
| 13 | Fatal error: [snuffleupagus][0.0.0.0][config][log] Invalid configuration file in Unknown on line 0 | ||
| 14 | Could not startup. | ||
diff --git a/src/tests/broken_configuration_php8/broken_conf_mutually_exclusive5.phpt b/src/tests/broken_configuration_php8/broken_conf_mutually_exclusive5.phpt new file mode 100644 index 0000000..55d0eda --- /dev/null +++ b/src/tests/broken_configuration_php8/broken_conf_mutually_exclusive5.phpt | |||
| @@ -0,0 +1,14 @@ | |||
| 1 | --TEST-- | ||
| 2 | Broken configuration | ||
| 3 | --SKIPIF-- | ||
| 4 | <?php if (!extension_loaded("snuffleupagus")) print "skip"; ?> | ||
| 5 | <?php if (PHP_VERSION_ID < 80000) print "skip"; ?> | ||
| 6 | --INI-- | ||
| 7 | sp.configuration_file={PWD}/config/broken_conf_mutually_exclusive5.ini | ||
| 8 | --FILE-- | ||
| 9 | --EXPECT-- | ||
| 10 | |||
| 11 | Fatal error: [snuffleupagus][0.0.0.0][config][log] Invalid configuration line: 'sp.disabled_functions.function("system").ret("0").drop().ret_r("^0$");': '.r_ret' and '.ret' are mutually exclusive on line 1 in Unknown on line 0 | ||
| 12 | |||
| 13 | Fatal error: [snuffleupagus][0.0.0.0][config][log] Invalid configuration file in Unknown on line 0 | ||
| 14 | Could not startup. | ||
diff --git a/src/tests/broken_configuration_php8/broken_conf_mutually_exclusive6.phpt b/src/tests/broken_configuration_php8/broken_conf_mutually_exclusive6.phpt new file mode 100644 index 0000000..7dc6985 --- /dev/null +++ b/src/tests/broken_configuration_php8/broken_conf_mutually_exclusive6.phpt | |||
| @@ -0,0 +1,14 @@ | |||
| 1 | --TEST-- | ||
| 2 | Broken configuration | ||
| 3 | --SKIPIF-- | ||
| 4 | <?php if (!extension_loaded("snuffleupagus")) print "skip"; ?> | ||
| 5 | <?php if (PHP_VERSION_ID < 80000) print "skip"; ?> | ||
| 6 | --INI-- | ||
| 7 | sp.configuration_file={PWD}/config/broken_conf_mutually_exclusive6.ini | ||
| 8 | --FILE-- | ||
| 9 | --EXPECT-- | ||
| 10 | |||
| 11 | Fatal error: [snuffleupagus][0.0.0.0][config][log] Invalid configuration line: 'sp.disabled_functions.function("system").param("id").value("42").ret_r("^0$").drop();':`ret` and `param` are mutually exclusive on line 1 in Unknown on line 0 | ||
| 12 | |||
| 13 | Fatal error: [snuffleupagus][0.0.0.0][config][log] Invalid configuration file in Unknown on line 0 | ||
| 14 | Could not startup. | ||
diff --git a/src/tests/broken_configuration_php8/broken_conf_mutually_exclusive7.phpt b/src/tests/broken_configuration_php8/broken_conf_mutually_exclusive7.phpt new file mode 100644 index 0000000..ff7f415 --- /dev/null +++ b/src/tests/broken_configuration_php8/broken_conf_mutually_exclusive7.phpt | |||
| @@ -0,0 +1,14 @@ | |||
| 1 | --TEST-- | ||
| 2 | Broken configuration | ||
| 3 | --SKIPIF-- | ||
| 4 | <?php if (!extension_loaded("snuffleupagus")) print "skip"; ?> | ||
| 5 | <?php if (PHP_VERSION_ID < 80000) print "skip"; ?> | ||
| 6 | --INI-- | ||
| 7 | sp.configuration_file={PWD}/config/broken_conf_mutually_exclusive7.ini | ||
| 8 | --FILE-- | ||
| 9 | --EXPECT-- | ||
| 10 | |||
| 11 | Fatal error: [snuffleupagus][0.0.0.0][config][log] Invalid configuration line: 'sp.disabled_functions.function("system").ret("0").drop().allow();': The rule must either be a `drop` or `allow` one on line 1 in Unknown on line 0 | ||
| 12 | |||
| 13 | Fatal error: [snuffleupagus][0.0.0.0][config][log] Invalid configuration file in Unknown on line 0 | ||
| 14 | Could not startup. | ||
diff --git a/src/tests/broken_configuration_php8/broken_conf_mutually_exclusive8.phpt b/src/tests/broken_configuration_php8/broken_conf_mutually_exclusive8.phpt new file mode 100644 index 0000000..6ccd508 --- /dev/null +++ b/src/tests/broken_configuration_php8/broken_conf_mutually_exclusive8.phpt | |||
| @@ -0,0 +1,14 @@ | |||
| 1 | --TEST-- | ||
| 2 | Broken configuration | ||
| 3 | --SKIPIF-- | ||
| 4 | <?php if (!extension_loaded("snuffleupagus")) print "skip"; ?> | ||
| 5 | <?php if (PHP_VERSION_ID < 80000) print "skip"; ?> | ||
| 6 | --INI-- | ||
| 7 | sp.configuration_file={PWD}/config/broken_conf_mutually_exclusive8.ini | ||
| 8 | --FILE-- | ||
| 9 | --EXPECT-- | ||
| 10 | |||
| 11 | Fatal error: [snuffleupagus][0.0.0.0][config][log] Invalid configuration line: 'sp.disabled_functions.ret("0").drop();': must take a function name on line 1 in Unknown on line 0 | ||
| 12 | |||
| 13 | Fatal error: [snuffleupagus][0.0.0.0][config][log] Invalid configuration file in Unknown on line 0 | ||
| 14 | Could not startup. | ||
diff --git a/src/tests/broken_configuration_php8/broken_conf_mutually_exclusive9.phpt b/src/tests/broken_configuration_php8/broken_conf_mutually_exclusive9.phpt new file mode 100644 index 0000000..e4a2d6f --- /dev/null +++ b/src/tests/broken_configuration_php8/broken_conf_mutually_exclusive9.phpt | |||
| @@ -0,0 +1,14 @@ | |||
| 1 | --TEST-- | ||
| 2 | Broken configuration - enabled/disabled unserialize | ||
| 3 | --SKIPIF-- | ||
| 4 | <?php if (!extension_loaded("snuffleupagus")) print "skip"; ?> | ||
| 5 | <?php if (PHP_VERSION_ID < 80000) print "skip"; ?> | ||
| 6 | --INI-- | ||
| 7 | sp.configuration_file={PWD}/config/broken_conf_mutually_exclusive9.ini | ||
| 8 | --FILE-- | ||
| 9 | --EXPECT-- | ||
| 10 | |||
| 11 | Fatal error: [snuffleupagus][0.0.0.0][config][log] A rule can't be enabled and disabled on line 1 in Unknown on line 0 | ||
| 12 | |||
| 13 | Fatal error: [snuffleupagus][0.0.0.0][config][log] Invalid configuration file in Unknown on line 0 | ||
| 14 | Could not startup. | ||
diff --git a/src/tests/broken_configuration_php8/broken_conf_no_cookie_action.phpt b/src/tests/broken_configuration_php8/broken_conf_no_cookie_action.phpt new file mode 100644 index 0000000..5fb3f0b --- /dev/null +++ b/src/tests/broken_configuration_php8/broken_conf_no_cookie_action.phpt | |||
| @@ -0,0 +1,14 @@ | |||
| 1 | --TEST-- | ||
| 2 | Bad config, invalid action. | ||
| 3 | --SKIPIF-- | ||
| 4 | <?php if (!extension_loaded("snuffleupagus")) print "skip"; ?> | ||
| 5 | <?php if (PHP_VERSION_ID < 80000) print "skip"; ?> | ||
| 6 | --INI-- | ||
| 7 | sp.configuration_file={PWD}/config/broken_conf_cookie_action.ini | ||
| 8 | --FILE-- | ||
| 9 | --EXPECT-- | ||
| 10 | |||
| 11 | Fatal error: [snuffleupagus][0.0.0.0][config][log] You must specify a at least one action to a cookie on line 1 in Unknown on line 0 | ||
| 12 | |||
| 13 | Fatal error: [snuffleupagus][0.0.0.0][config][log] Invalid configuration file in Unknown on line 0 | ||
| 14 | Could not startup. | ||
diff --git a/src/tests/broken_configuration_php8/broken_conf_no_cookie_name.phpt b/src/tests/broken_configuration_php8/broken_conf_no_cookie_name.phpt new file mode 100644 index 0000000..1b2922b --- /dev/null +++ b/src/tests/broken_configuration_php8/broken_conf_no_cookie_name.phpt | |||
| @@ -0,0 +1,14 @@ | |||
| 1 | --TEST-- | ||
| 2 | Broken configuration - encrypted cookie with no name | ||
| 3 | --SKIPIF-- | ||
| 4 | <?php if (!extension_loaded("snuffleupagus")) print "skip"; ?> | ||
| 5 | <?php if (PHP_VERSION_ID < 80000) print "skip"; ?> | ||
| 6 | --INI-- | ||
| 7 | sp.configuration_file={PWD}/config/config_encrypted_cookies_noname.ini | ||
| 8 | --FILE-- | ||
| 9 | --EXPECT-- | ||
| 10 | |||
| 11 | Fatal error: [snuffleupagus][0.0.0.0][config][log] You must specify a cookie name/regexp on line 2 in Unknown on line 0 | ||
| 12 | |||
| 13 | Fatal error: [snuffleupagus][0.0.0.0][config][log] Invalid configuration file in Unknown on line 0 | ||
| 14 | Could not startup. | ||
diff --git a/src/tests/broken_configuration_php8/broken_conf_no_file_specified.phpt b/src/tests/broken_configuration_php8/broken_conf_no_file_specified.phpt new file mode 100644 index 0000000..cb2d95f --- /dev/null +++ b/src/tests/broken_configuration_php8/broken_conf_no_file_specified.phpt | |||
| @@ -0,0 +1,10 @@ | |||
| 1 | --TEST-- | ||
| 2 | Broken configuration - No configuration file specified | ||
| 3 | --INI-- | ||
| 4 | --SKIPIF-- | ||
| 5 | <?php if (!extension_loaded("snuffleupagus")) print "skip"; ?> | ||
| 6 | --FILE-- | ||
| 7 | <?php echo "1\n"; ?> | ||
| 8 | --EXPECT-- | ||
| 9 | Warning: [snuffleupagus][0.0.0.0][config][log] No configuration specificed via sp.configuration_file in Unknown on line 0 | ||
| 10 | 1 | ||
diff --git a/src/tests/broken_configuration_php8/broken_conf_nonexisting_script.phpt b/src/tests/broken_configuration_php8/broken_conf_nonexisting_script.phpt new file mode 100644 index 0000000..21717a8 --- /dev/null +++ b/src/tests/broken_configuration_php8/broken_conf_nonexisting_script.phpt | |||
| @@ -0,0 +1,17 @@ | |||
| 1 | --TEST-- | ||
| 2 | Invalid configuration file for upload | ||
| 3 | --SKIPIF-- | ||
| 4 | <?php if (PHP_VERSION_ID < 80000) print "skip"; ?> | ||
| 5 | --INI-- | ||
| 6 | file_uploads=1 | ||
| 7 | sp.configuration_file={PWD}/config/broken_conf_nonexisting_script.ini | ||
| 8 | --FILE-- | ||
| 9 | <?php | ||
| 10 | echo 1; | ||
| 11 | ?> | ||
| 12 | --EXPECTF-- | ||
| 13 | |||
| 14 | Fatal error: [snuffleupagus][0.0.0.0][config][log] The `script` (./non_existing_script.sh) doesn't exist on line 1 in Unknown on line 0 | ||
| 15 | |||
| 16 | Fatal error: [snuffleupagus][0.0.0.0][config][log] Invalid configuration file in Unknown on line 0 | ||
| 17 | Could not startup. | ||
diff --git a/src/tests/broken_configuration_php8/broken_conf_quotes.phpt b/src/tests/broken_configuration_php8/broken_conf_quotes.phpt new file mode 100644 index 0000000..d437669 --- /dev/null +++ b/src/tests/broken_configuration_php8/broken_conf_quotes.phpt | |||
| @@ -0,0 +1,16 @@ | |||
| 1 | --TEST-- | ||
| 2 | Broken configuration - missing quote | ||
| 3 | --SKIPIF-- | ||
| 4 | <?php if (!extension_loaded("snuffleupagus")) print "skip"; ?> | ||
| 5 | <?php if (PHP_VERSION_ID < 80000) print "skip"; ?> | ||
| 6 | --INI-- | ||
| 7 | sp.configuration_file={PWD}/config/broken_conf_quotes.ini | ||
| 8 | --FILE-- | ||
| 9 | --EXPECT-- | ||
| 10 | |||
| 11 | Fatal error: [snuffleupagus][0.0.0.0][config][log] You forgot to close a bracket. in Unknown on line 0 | ||
| 12 | |||
| 13 | Fatal error: [snuffleupagus][0.0.0.0][config][log] Invalid value '_SERVER[PHP_SELF' for `var` on line 1 in Unknown on line 0 | ||
| 14 | |||
| 15 | Fatal error: [snuffleupagus][0.0.0.0][config][log] Invalid configuration file in Unknown on line 0 | ||
| 16 | Could not startup. | ||
diff --git a/src/tests/broken_configuration_php8/broken_conf_readonly_exec.phpt b/src/tests/broken_configuration_php8/broken_conf_readonly_exec.phpt new file mode 100644 index 0000000..7e74683 --- /dev/null +++ b/src/tests/broken_configuration_php8/broken_conf_readonly_exec.phpt | |||
| @@ -0,0 +1,17 @@ | |||
| 1 | --TEST-- | ||
| 2 | Invalid configuration file for readonly_exec | ||
| 3 | --SKIPIF-- | ||
| 4 | <?php if (PHP_VERSION_ID < 80000) print "skip"; ?> | ||
| 5 | --INI-- | ||
| 6 | file_uploads=1 | ||
| 7 | sp.configuration_file={PWD}/config/broken_conf_readonly_exec.ini | ||
| 8 | --FILE-- | ||
| 9 | <?php | ||
| 10 | echo 1; | ||
| 11 | ?> | ||
| 12 | --EXPECTF-- | ||
| 13 | |||
| 14 | Fatal error: [snuffleupagus][0.0.0.0][config][log] Trailing chars '234);' at the end of '.enable(1234);' on line 1 in Unknown on line 0 | ||
| 15 | |||
| 16 | Fatal error: [snuffleupagus][0.0.0.0][config][log] Invalid configuration file in Unknown on line 0 | ||
| 17 | Could not startup. | ||
diff --git a/src/tests/broken_configuration_php8/broken_conf_samesite.phpt b/src/tests/broken_configuration_php8/broken_conf_samesite.phpt new file mode 100644 index 0000000..c905fd8 --- /dev/null +++ b/src/tests/broken_configuration_php8/broken_conf_samesite.phpt | |||
| @@ -0,0 +1,14 @@ | |||
| 1 | --TEST-- | ||
| 2 | Bad config, invalid samesite type. | ||
| 3 | --SKIPIF-- | ||
| 4 | <?php if (!extension_loaded("snuffleupagus")) print "skip"; ?> | ||
| 5 | <?php if (PHP_VERSION_ID < 80000) print "skip"; ?> | ||
| 6 | --INI-- | ||
| 7 | sp.configuration_file={PWD}/config/broken_conf_cookie_samesite.ini | ||
| 8 | --FILE-- | ||
| 9 | --EXPECT-- | ||
| 10 | |||
| 11 | Fatal error: [snuffleupagus][0.0.0.0][config][log] nop is an invalid value to samesite (expected Lax or Strict) on line 1 in Unknown on line 0 | ||
| 12 | |||
| 13 | Fatal error: [snuffleupagus][0.0.0.0][config][log] Invalid configuration file in Unknown on line 0 | ||
| 14 | Could not startup. | ||
diff --git a/src/tests/broken_configuration_php8/broken_conf_session_encryption.phpt b/src/tests/broken_configuration_php8/broken_conf_session_encryption.phpt new file mode 100644 index 0000000..886eb13 --- /dev/null +++ b/src/tests/broken_configuration_php8/broken_conf_session_encryption.phpt | |||
| @@ -0,0 +1,14 @@ | |||
| 1 | --TEST-- | ||
| 2 | Broken config, session encryption | ||
| 3 | --SKIPIF-- | ||
| 4 | <?php if (!extension_loaded("snuffleupagus")) print "skip"; ?> | ||
| 5 | <?php if (PHP_VERSION_ID < 80000) print "skip"; ?> | ||
| 6 | --INI-- | ||
| 7 | sp.configuration_file={PWD}/config/broken_conf_session_encryption.ini | ||
| 8 | --FILE-- | ||
| 9 | --EXPECT-- | ||
| 10 | |||
| 11 | Fatal error: [snuffleupagus][0.0.0.0][config][log] Trailing chars 'nvalid value :/);' at the end of '.encrypt(invalid value :/);' on line 1 in Unknown on line 0 | ||
| 12 | |||
| 13 | Fatal error: [snuffleupagus][0.0.0.0][config][log] Invalid configuration file in Unknown on line 0 | ||
| 14 | Could not startup. | ||
diff --git a/src/tests/broken_configuration_php8/broken_conf_session_encryption_without_encryption_key.phpt b/src/tests/broken_configuration_php8/broken_conf_session_encryption_without_encryption_key.phpt new file mode 100644 index 0000000..046dc7d --- /dev/null +++ b/src/tests/broken_configuration_php8/broken_conf_session_encryption_without_encryption_key.phpt | |||
| @@ -0,0 +1,14 @@ | |||
| 1 | --TEST-- | ||
| 2 | Broken configuration - encrypted session without encryption key | ||
| 3 | --SKIPIF-- | ||
| 4 | <?php if (!extension_loaded("snuffleupagus")) print "skip"; ?> | ||
| 5 | <?php if (PHP_VERSION_ID < 80000) print "skip"; ?> | ||
| 6 | --INI-- | ||
| 7 | sp.configuration_file={PWD}/config/broken_conf_session_encryption_without_encryption_key.ini | ||
| 8 | --FILE-- | ||
| 9 | --EXPECT-- | ||
| 10 | |||
| 11 | Fatal error: [snuffleupagus][0.0.0.0][config][log] You're trying to use the session cookie encryption feature on line 2 without having set the `.secret_key` option in`sp.global`: please set it first in Unknown on line 0 | ||
| 12 | |||
| 13 | Fatal error: [snuffleupagus][0.0.0.0][config][log] Invalid configuration file in Unknown on line 0 | ||
| 14 | Could not startup. | ||
diff --git a/src/tests/broken_configuration_php8/broken_conf_session_encryption_without_env_var.phpt b/src/tests/broken_configuration_php8/broken_conf_session_encryption_without_env_var.phpt new file mode 100644 index 0000000..bb0f212 --- /dev/null +++ b/src/tests/broken_configuration_php8/broken_conf_session_encryption_without_env_var.phpt | |||
| @@ -0,0 +1,14 @@ | |||
| 1 | --TEST-- | ||
| 2 | Broken configuration - encrypted session without env var | ||
| 3 | --SKIPIF-- | ||
| 4 | <?php if (!extension_loaded("snuffleupagus")) print "skip"; ?> | ||
| 5 | <?php if (PHP_VERSION_ID < 80000) print "skip"; ?> | ||
| 6 | --INI-- | ||
| 7 | sp.configuration_file={PWD}/config/broken_conf_session_encryption_without_env_var.ini | ||
| 8 | --FILE-- | ||
| 9 | --EXPECT-- | ||
| 10 | |||
| 11 | Fatal error: [snuffleupagus][0.0.0.0][config][log] You're trying to use the session cookie encryption feature on line 2 without having set the `.cookie_env_var` option in`sp.global`: please set it first in Unknown on line 0 | ||
| 12 | |||
| 13 | Fatal error: [snuffleupagus][0.0.0.0][config][log] Invalid configuration file in Unknown on line 0 | ||
| 14 | Could not startup. | ||
diff --git a/src/tests/broken_configuration_php8/broken_conf_shown_in_phpinfo.phpt b/src/tests/broken_configuration_php8/broken_conf_shown_in_phpinfo.phpt new file mode 100644 index 0000000..2503943 --- /dev/null +++ b/src/tests/broken_configuration_php8/broken_conf_shown_in_phpinfo.phpt | |||
| @@ -0,0 +1,27 @@ | |||
| 1 | --TEST-- | ||
| 2 | Broken configuration | ||
| 3 | --SKIPIF-- | ||
| 4 | <?php if (!extension_loaded("snuffleupagus")) print "skip"; ?> | ||
| 5 | <?php if (PHP_VERSION_ID < 80000) print "skip"; ?> | ||
| 6 | --INI-- | ||
| 7 | sp.configuration_file={PWD}/config/broken_config_regexp.ini | ||
| 8 | --FILE-- | ||
| 9 | <?php | ||
| 10 | ob_start(); | ||
| 11 | phpinfo(); | ||
| 12 | $info = ob_get_clean(); | ||
| 13 | ob_get_clean(); | ||
| 14 | if (strstr($info, 'Valid config => no') !== FALSE) { | ||
| 15 | echo "win"; | ||
| 16 | } else { | ||
| 17 | echo "lose"; | ||
| 18 | } | ||
| 19 | ?> | ||
| 20 | --EXPECTF-- | ||
| 21 | |||
| 22 | Fatal error: [snuffleupagus][0.0.0.0][config][log] Failed to compile '*.': %s on line 1. in Unknown on line 0 | ||
| 23 | |||
| 24 | Fatal error: [snuffleupagus][0.0.0.0][config][log] '.filename_r()' is expecting a valid regexp, and not '"*."' on line 1 in Unknown on line 0 | ||
| 25 | |||
| 26 | Fatal error: [snuffleupagus][0.0.0.0][config][log] Invalid configuration file in Unknown on line 0 | ||
| 27 | Could not startup. | ||
diff --git a/src/tests/broken_configuration_php8/broken_conf_truncated.phpt b/src/tests/broken_configuration_php8/broken_conf_truncated.phpt new file mode 100644 index 0000000..059dcac --- /dev/null +++ b/src/tests/broken_configuration_php8/broken_conf_truncated.phpt | |||
| @@ -0,0 +1,14 @@ | |||
| 1 | --TEST-- | ||
| 2 | Bad boolean value in configuration | ||
| 3 | --SKIPIF-- | ||
| 4 | <?php if (PHP_VERSION_ID < 80000) print "skip"; ?> | ||
| 5 | <?php if (!extension_loaded("snuffleupagus")) print "skip"; ?> | ||
| 6 | --INI-- | ||
| 7 | sp.configuration_file={PWD}/config/config_broken_conf_truncated.ini | ||
| 8 | --FILE-- | ||
| 9 | --EXPECT-- | ||
| 10 | |||
| 11 | Fatal error: [snuffleupagus][0.0.0.0][error][log] A valid string as parameter is expected on line 1 in Unknown on line 0 | ||
| 12 | |||
| 13 | Fatal error: [snuffleupagus][0.0.0.0][config][log] Invalid configuration file in Unknown on line 0 | ||
| 14 | Could not startup. | ||
diff --git a/src/tests/broken_configuration_php8/broken_conf_unserialize.phpt b/src/tests/broken_configuration_php8/broken_conf_unserialize.phpt new file mode 100644 index 0000000..327b622 --- /dev/null +++ b/src/tests/broken_configuration_php8/broken_conf_unserialize.phpt | |||
| @@ -0,0 +1,17 @@ | |||
| 1 | --TEST-- | ||
| 2 | Invalid configuration file for unserialize | ||
| 3 | --SKIPIF-- | ||
| 4 | <?php if (PHP_VERSION_ID < 80000) print "skip"; ?> | ||
| 5 | --INI-- | ||
| 6 | file_uploads=1 | ||
| 7 | sp.configuration_file={PWD}/config/broken_conf_unserialize.ini | ||
| 8 | --FILE-- | ||
| 9 | <?php | ||
| 10 | echo 1; | ||
| 11 | ?> | ||
| 12 | --EXPECTF-- | ||
| 13 | |||
| 14 | Fatal error: [snuffleupagus][0.0.0.0][config][log] Trailing chars '234);' at the end of '.enable(1234);' on line 1 in Unknown on line 0 | ||
| 15 | |||
| 16 | Fatal error: [snuffleupagus][0.0.0.0][config][log] Invalid configuration file in Unknown on line 0 | ||
| 17 | Could not startup. | ||
diff --git a/src/tests/broken_configuration_php8/broken_conf_upload_validation.phpt b/src/tests/broken_configuration_php8/broken_conf_upload_validation.phpt new file mode 100644 index 0000000..9edede6 --- /dev/null +++ b/src/tests/broken_configuration_php8/broken_conf_upload_validation.phpt | |||
| @@ -0,0 +1,17 @@ | |||
| 1 | --TEST-- | ||
| 2 | Invalid configuration file for upload validation | ||
| 3 | --SKIPIF-- | ||
| 4 | <?php if (PHP_VERSION_ID < 80000) print "skip"; ?> | ||
| 5 | --INI-- | ||
| 6 | file_uploads=1 | ||
| 7 | sp.configuration_file={PWD}/config/borken_conf_upload_validation.ini | ||
| 8 | --FILE-- | ||
| 9 | <?php | ||
| 10 | echo 1; | ||
| 11 | ?> | ||
| 12 | --EXPECTF-- | ||
| 13 | |||
| 14 | Fatal error: [snuffleupagus][0.0.0.0][error][log] A valid string as parameter is expected on line 1 in Unknown on line 0 | ||
| 15 | |||
| 16 | Fatal error: [snuffleupagus][0.0.0.0][config][log] Invalid configuration file in Unknown on line 0 | ||
| 17 | Could not startup. | ||
diff --git a/src/tests/broken_configuration_php8/broken_conf_weird_keyword.phpt b/src/tests/broken_configuration_php8/broken_conf_weird_keyword.phpt new file mode 100644 index 0000000..75c2e0e --- /dev/null +++ b/src/tests/broken_configuration_php8/broken_conf_weird_keyword.phpt | |||
| @@ -0,0 +1,14 @@ | |||
| 1 | --TEST-- | ||
| 2 | Bad config, unknown keyword | ||
| 3 | --SKIPIF-- | ||
| 4 | <?php if (!extension_loaded("snuffleupagus")) print "skip"; ?> | ||
| 5 | <?php if (PHP_VERSION_ID < 80000) print "skip"; ?> | ||
| 6 | --INI-- | ||
| 7 | sp.configuration_file={PWD}/config/broken_conf_weird_keyword.ini | ||
| 8 | --FILE-- | ||
| 9 | --EXPECT-- | ||
| 10 | |||
| 11 | Fatal error: [snuffleupagus][0.0.0.0][config][log] Trailing chars '.not_a_valid_keyword("test");' at the end of '.enable().not_a_valid_keyword("test");' on line 1 in Unknown on line 0 | ||
| 12 | |||
| 13 | Fatal error: [snuffleupagus][0.0.0.0][config][log] Invalid configuration file in Unknown on line 0 | ||
| 14 | Could not startup. | ||
diff --git a/src/tests/broken_configuration_php8/broken_conf_wrapper_whitelist.phpt b/src/tests/broken_configuration_php8/broken_conf_wrapper_whitelist.phpt new file mode 100644 index 0000000..0011a6e --- /dev/null +++ b/src/tests/broken_configuration_php8/broken_conf_wrapper_whitelist.phpt | |||
| @@ -0,0 +1,18 @@ | |||
| 1 | --TEST-- | ||
| 2 | Broken configuration with invalid token for wrapper whitelist | ||
| 3 | --SKIPIF-- | ||
| 4 | <?php if (!extension_loaded("snuffleupagus")) print "skip"; ?> | ||
| 5 | <?php if (PHP_VERSION_ID < 80000) print "skip"; ?> | ||
| 6 | --INI-- | ||
| 7 | sp.configuration_file={PWD}/config/broken_conf_wrapper_whitelist.ini | ||
| 8 | sp.allow_broken_configuration=Off | ||
| 9 | --FILE-- | ||
| 10 | <?php | ||
| 11 | echo 1337; | ||
| 12 | ?> | ||
| 13 | --EXPECT-- | ||
| 14 | |||
| 15 | Fatal error: [snuffleupagus][0.0.0.0][config][log] Trailing chars '.invalid_param();' at the end of '.invalid_param();' on line 1 in Unknown on line 0 | ||
| 16 | |||
| 17 | Fatal error: [snuffleupagus][0.0.0.0][config][log] Invalid configuration file in Unknown on line 0 | ||
| 18 | Could not startup. | ||
diff --git a/src/tests/broken_configuration_php8/broken_conf_wrong_quotes.phpt b/src/tests/broken_configuration_php8/broken_conf_wrong_quotes.phpt new file mode 100644 index 0000000..b073369 --- /dev/null +++ b/src/tests/broken_configuration_php8/broken_conf_wrong_quotes.phpt | |||
| @@ -0,0 +1,14 @@ | |||
| 1 | --TEST-- | ||
| 2 | Configuration line with too many quotes | ||
| 3 | --SKIPIF-- | ||
| 4 | <?php if (!extension_loaded("snuffleupagus")) print "skip"; ?> | ||
| 5 | <?php if (PHP_VERSION_ID < 80000) print "skip"; ?> | ||
| 6 | --INI-- | ||
| 7 | sp.configuration_file={PWD}/config/broken_conf_wrong_quotes.ini | ||
| 8 | --FILE-- | ||
| 9 | --EXPECT-- | ||
| 10 | |||
| 11 | Fatal error: [snuffleupagus][0.0.0.0][error][log] There is an issue with the parsing of '"\)': it doesn't look like a valid string on line 1 in Unknown on line 0 | ||
| 12 | |||
| 13 | Fatal error: [snuffleupagus][0.0.0.0][config][log] Invalid configuration file in Unknown on line 0 | ||
| 14 | Could not startup. | ||
diff --git a/src/tests/broken_configuration_php8/broken_conf_wrong_type.phpt b/src/tests/broken_configuration_php8/broken_conf_wrong_type.phpt new file mode 100644 index 0000000..1f1cead --- /dev/null +++ b/src/tests/broken_configuration_php8/broken_conf_wrong_type.phpt | |||
| @@ -0,0 +1,14 @@ | |||
| 1 | --TEST-- | ||
| 2 | Broken conf with wrong type | ||
| 3 | --SKIPIF-- | ||
| 4 | <?php if (!extension_loaded("snuffleupagus")) print "skip"; ?> | ||
| 5 | <?php if (PHP_VERSION_ID < 80000) print "skip"; ?> | ||
| 6 | --INI-- | ||
| 7 | sp.configuration_file={PWD}/config/broken_conf_wrong_type.ini | ||
| 8 | --FILE-- | ||
| 9 | --EXPECTF-- | ||
| 10 | |||
| 11 | Fatal error: [snuffleupagus][0.0.0.0][error][log] .ret_type() is expecting a valid php type ('false', 'true', 'array'. 'object', 'long', 'double', 'null', 'resource', 'reference', 'undef') on line 5 in Unknown on line 0 | ||
| 12 | |||
| 13 | Fatal error: [snuffleupagus][0.0.0.0][config][log] Invalid configuration file in Unknown on line 0 | ||
| 14 | Could not startup. | ||
diff --git a/src/tests/broken_configuration_php8/broken_invalid_client_ip4.phpt b/src/tests/broken_configuration_php8/broken_invalid_client_ip4.phpt new file mode 100644 index 0000000..a96b059 --- /dev/null +++ b/src/tests/broken_configuration_php8/broken_invalid_client_ip4.phpt | |||
| @@ -0,0 +1,16 @@ | |||
| 1 | --TEST-- | ||
| 2 | Invalid client IP | ||
| 3 | --SKIPIF-- | ||
| 4 | <?php if (!extension_loaded("snuffleupagus")) print "skip"; ?> | ||
| 5 | --ENV-- | ||
| 6 | return <<<EOF | ||
| 7 | REMOTE_ADDR=xyz | ||
| 8 | EOF; | ||
| 9 | --INI-- | ||
| 10 | sp.configuration_file={PWD}/config/disabled_functions_cidr.ini | ||
| 11 | --FILE-- | ||
| 12 | <?php | ||
| 13 | strpos("1337", "1"); | ||
| 14 | ?> | ||
| 15 | --EXPECTF-- | ||
| 16 | Fatal error: [snuffleupagus][xyz][cidr_match][log] Weird ip (xyz) family in %a/broken_invalid_client_ip4.php on line 2 \ No newline at end of file | ||
diff --git a/src/tests/broken_configuration_php8/broken_regexp.phpt b/src/tests/broken_configuration_php8/broken_regexp.phpt new file mode 100644 index 0000000..877f801 --- /dev/null +++ b/src/tests/broken_configuration_php8/broken_regexp.phpt | |||
| @@ -0,0 +1,16 @@ | |||
| 1 | --TEST-- | ||
| 2 | Broken regexp | ||
| 3 | --SKIPIF-- | ||
| 4 | <?php if (!extension_loaded("snuffleupagus")) print "skip"; ?> | ||
| 5 | <?php if (PHP_VERSION_ID < 80000) print "skip"; ?> | ||
| 6 | --INI-- | ||
| 7 | sp.configuration_file={PWD}/config/broken_regexp.ini | ||
| 8 | --FILE-- | ||
| 9 | --EXPECTF-- | ||
| 10 | |||
| 11 | Fatal error: [snuffleupagus][0.0.0.0][config][log] Failed to compile '^$[': missing terminating ] for character class on line 1. in Unknown on line 0 | ||
| 12 | |||
| 13 | Fatal error: [snuffleupagus][0.0.0.0][config][log] '.value_r()' is expecting a valid regexp, and not '"^$["' on line 1 in Unknown on line 0 | ||
| 14 | |||
| 15 | Fatal error: [snuffleupagus][0.0.0.0][config][log] Invalid configuration file in Unknown on line 0 | ||
| 16 | Could not startup. | ||
diff --git a/src/tests/broken_configuration_php8/broken_unmatching_brackets.phpt b/src/tests/broken_configuration_php8/broken_unmatching_brackets.phpt new file mode 100644 index 0000000..d143cbd --- /dev/null +++ b/src/tests/broken_configuration_php8/broken_unmatching_brackets.phpt | |||
| @@ -0,0 +1,16 @@ | |||
| 1 | --TEST-- | ||
| 2 | Broken configuration - unmatching brackets | ||
| 3 | --SKIPIF-- | ||
| 4 | <?php if (!extension_loaded("snuffleupagus")) print "skip"; ?> | ||
| 5 | <?php if (PHP_VERSION_ID < 80000) print "skip"; ?> | ||
| 6 | --INI-- | ||
| 7 | sp.configuration_file={PWD}/config/config_unmatching_brackets.ini | ||
| 8 | --FILE-- | ||
| 9 | --EXPECTF-- | ||
| 10 | |||
| 11 | Fatal error: [snuffleupagus][0.0.0.0][config][log] Invalid `]` position. in Unknown on line 0 | ||
| 12 | |||
| 13 | Fatal error: [snuffleupagus][0.0.0.0][config][log] Invalid value 'arr[b]]]]]' for `param` on line 1 in Unknown on line 0 | ||
| 14 | |||
| 15 | Fatal error: [snuffleupagus][0.0.0.0][config][log] Invalid configuration file in Unknown on line 0 | ||
| 16 | Could not startup. | ||
diff --git a/src/tests/broken_configuration_php8/config/borken_conf_enable_disable.ini b/src/tests/broken_configuration_php8/config/borken_conf_enable_disable.ini new file mode 100644 index 0000000..4e95294 --- /dev/null +++ b/src/tests/broken_configuration_php8/config/borken_conf_enable_disable.ini | |||
| @@ -0,0 +1 @@ | |||
| sp.global_strict.disable().enable(); | |||
diff --git a/src/tests/broken_configuration_php8/config/borken_conf_upload_validation.ini b/src/tests/broken_configuration_php8/config/borken_conf_upload_validation.ini new file mode 100644 index 0000000..7c94185 --- /dev/null +++ b/src/tests/broken_configuration_php8/config/borken_conf_upload_validation.ini | |||
| @@ -0,0 +1 @@ | |||
| sp.upload_validation.script( | |||
diff --git a/src/tests/broken_configuration_php8/config/broken_conf.ini b/src/tests/broken_configuration_php8/config/broken_conf.ini new file mode 100644 index 0000000..0595320 --- /dev/null +++ b/src/tests/broken_configuration_php8/config/broken_conf.ini | |||
| @@ -0,0 +1 @@ | |||
| this is a broken line | |||
diff --git a/src/tests/broken_configuration_php8/config/broken_conf2.ini b/src/tests/broken_configuration_php8/config/broken_conf2.ini new file mode 100644 index 0000000..fdb6b8f --- /dev/null +++ b/src/tests/broken_configuration_php8/config/broken_conf2.ini | |||
| @@ -0,0 +1 @@ | |||
| sp.wrong | |||
diff --git a/src/tests/broken_configuration_php8/config/broken_conf_cookie_action.ini b/src/tests/broken_configuration_php8/config/broken_conf_cookie_action.ini new file mode 100644 index 0000000..5f07c28 --- /dev/null +++ b/src/tests/broken_configuration_php8/config/broken_conf_cookie_action.ini | |||
| @@ -0,0 +1 @@ | |||
| sp.cookie.name("my_cookie_name"); | |||
diff --git a/src/tests/broken_configuration_php8/config/broken_conf_cookie_encryption_without_encryption_key.ini b/src/tests/broken_configuration_php8/config/broken_conf_cookie_encryption_without_encryption_key.ini new file mode 100644 index 0000000..a100bd8 --- /dev/null +++ b/src/tests/broken_configuration_php8/config/broken_conf_cookie_encryption_without_encryption_key.ini | |||
| @@ -0,0 +1,2 @@ | |||
| 1 | sp.global.cookie_env_var("MY_SUPER_ENV_VAR_YAY"); | ||
| 2 | sp.cookie.name("my_cookie_name").encrypt(); | ||
diff --git a/src/tests/broken_configuration_php8/config/broken_conf_cookie_encryption_without_env_var.ini b/src/tests/broken_configuration_php8/config/broken_conf_cookie_encryption_without_env_var.ini new file mode 100644 index 0000000..54cb101 --- /dev/null +++ b/src/tests/broken_configuration_php8/config/broken_conf_cookie_encryption_without_env_var.ini | |||
| @@ -0,0 +1,2 @@ | |||
| 1 | sp.global.secret_key("super secret encryption key"); | ||
| 2 | sp.cookie.name("my_cookie_name").encrypt(); | ||
diff --git a/src/tests/broken_configuration_php8/config/broken_conf_cookie_name_and_regexp.ini b/src/tests/broken_configuration_php8/config/broken_conf_cookie_name_and_regexp.ini new file mode 100644 index 0000000..503889b --- /dev/null +++ b/src/tests/broken_configuration_php8/config/broken_conf_cookie_name_and_regexp.ini | |||
| @@ -0,0 +1,2 @@ | |||
| 1 | sp.global.secret_key("abcdef").cookie_env_var("REMOTE_ADDR"); | ||
| 2 | sp.cookie.name("my_cookie_name").name_r("my_cookie_regexp").encrypt(); | ||
diff --git a/src/tests/broken_configuration_php8/config/broken_conf_cookie_samesite.ini b/src/tests/broken_configuration_php8/config/broken_conf_cookie_samesite.ini new file mode 100644 index 0000000..acc4aa0 --- /dev/null +++ b/src/tests/broken_configuration_php8/config/broken_conf_cookie_samesite.ini | |||
| @@ -0,0 +1 @@ | |||
| sp.cookie.name("my_cookie_name").samesite("nop"); | |||
diff --git a/src/tests/broken_configuration_php8/config/broken_conf_eval.ini b/src/tests/broken_configuration_php8/config/broken_conf_eval.ini new file mode 100644 index 0000000..80ef7e5 --- /dev/null +++ b/src/tests/broken_configuration_php8/config/broken_conf_eval.ini | |||
| @@ -0,0 +1 @@ | |||
| sp.eval_blacklist.list("cos,sin | |||
diff --git a/src/tests/broken_configuration_php8/config/broken_conf_expecting_bool.ini b/src/tests/broken_configuration_php8/config/broken_conf_expecting_bool.ini new file mode 100644 index 0000000..51c28b2 --- /dev/null +++ b/src/tests/broken_configuration_php8/config/broken_conf_expecting_bool.ini | |||
| @@ -0,0 +1,5 @@ | |||
| 1 | # this is an example of broken conf | ||
| 2 | |||
| 3 | |||
| 4 | ; this is another comment | ||
| 5 | sp.harden_random.enable(1337); | ||
diff --git a/src/tests/broken_configuration_php8/config/broken_conf_invalid_cidr.ini b/src/tests/broken_configuration_php8/config/broken_conf_invalid_cidr.ini new file mode 100644 index 0000000..b1929c1 --- /dev/null +++ b/src/tests/broken_configuration_php8/config/broken_conf_invalid_cidr.ini | |||
| @@ -0,0 +1 @@ | |||
| sp.disable_function.function("system").drop().cidr("127.0.0.1/42"); | |||
diff --git a/src/tests/broken_configuration_php8/config/broken_conf_invalid_cidr6.ini b/src/tests/broken_configuration_php8/config/broken_conf_invalid_cidr6.ini new file mode 100644 index 0000000..5e91faf --- /dev/null +++ b/src/tests/broken_configuration_php8/config/broken_conf_invalid_cidr6.ini | |||
| @@ -0,0 +1 @@ | |||
| sp.disable_function.function("system").drop().cidr("2001:0db8:0000:0000:0000:ff00:0042:8329/ZZZ"); | |||
diff --git a/src/tests/broken_configuration_php8/config/broken_conf_invalid_cidr6_no_slash.ini b/src/tests/broken_configuration_php8/config/broken_conf_invalid_cidr6_no_slash.ini new file mode 100644 index 0000000..067209f --- /dev/null +++ b/src/tests/broken_configuration_php8/config/broken_conf_invalid_cidr6_no_slash.ini | |||
| @@ -0,0 +1 @@ | |||
| sp.disable_function.function("system").drop().cidr("2001:0db8:0000:0000:0000:ff00:0042:8329"); | |||
diff --git a/src/tests/broken_configuration_php8/config/broken_conf_invalid_cidr6_too_big.ini b/src/tests/broken_configuration_php8/config/broken_conf_invalid_cidr6_too_big.ini new file mode 100644 index 0000000..f82b18b --- /dev/null +++ b/src/tests/broken_configuration_php8/config/broken_conf_invalid_cidr6_too_big.ini | |||
| @@ -0,0 +1 @@ | |||
| sp.disable_function.function("system").drop().cidr("2001:0db8:0000:0000:0000:ff00:0042:8329/13337"); | |||
diff --git a/src/tests/broken_configuration_php8/config/broken_conf_invalid_cidr_value.ini b/src/tests/broken_configuration_php8/config/broken_conf_invalid_cidr_value.ini new file mode 100644 index 0000000..06a56bd --- /dev/null +++ b/src/tests/broken_configuration_php8/config/broken_conf_invalid_cidr_value.ini | |||
| @@ -0,0 +1 @@ | |||
| sp.disable_function.function("system").drop().cidr(" | |||
diff --git a/src/tests/broken_configuration_php8/config/broken_conf_invalid_filename.ini b/src/tests/broken_configuration_php8/config/broken_conf_invalid_filename.ini new file mode 100644 index 0000000..1be3b51 --- /dev/null +++ b/src/tests/broken_configuration_php8/config/broken_conf_invalid_filename.ini | |||
| @@ -0,0 +1 @@ | |||
| sp.disable_function.function("sprintf").filename("wrong file name").drop(); | |||
diff --git a/src/tests/broken_configuration_php8/config/broken_conf_invalid_log_media.ini b/src/tests/broken_configuration_php8/config/broken_conf_invalid_log_media.ini new file mode 100644 index 0000000..9e7cea0 --- /dev/null +++ b/src/tests/broken_configuration_php8/config/broken_conf_invalid_log_media.ini | |||
| @@ -0,0 +1 @@ | |||
| sp.log_media("pouet"); | |||
diff --git a/src/tests/broken_configuration_php8/config/broken_conf_invalid_type.ini b/src/tests/broken_configuration_php8/config/broken_conf_invalid_type.ini new file mode 100644 index 0000000..c52994e --- /dev/null +++ b/src/tests/broken_configuration_php8/config/broken_conf_invalid_type.ini | |||
| @@ -0,0 +1 @@ | |||
| sp.disable_function.function("strpos").ret_type("totally_wrong"_type") | |||
diff --git a/src/tests/broken_configuration_php8/config/broken_conf_key_value.ini b/src/tests/broken_configuration_php8/config/broken_conf_key_value.ini new file mode 100644 index 0000000..a0edaf2 --- /dev/null +++ b/src/tests/broken_configuration_php8/config/broken_conf_key_value.ini | |||
| @@ -0,0 +1 @@ | |||
| sp.disable_function.function("system").var("").value("").key("").drop(); | |||
diff --git a/src/tests/broken_configuration_php8/config/broken_conf_line_empty_string.ini b/src/tests/broken_configuration_php8/config/broken_conf_line_empty_string.ini new file mode 100644 index 0000000..dfa5520 --- /dev/null +++ b/src/tests/broken_configuration_php8/config/broken_conf_line_empty_string.ini | |||
| @@ -0,0 +1 @@ | |||
| sp.cookie.name( | |||
diff --git a/src/tests/broken_configuration_php8/config/broken_conf_line_no_closing.ini b/src/tests/broken_configuration_php8/config/broken_conf_line_no_closing.ini new file mode 100644 index 0000000..6a8c922 --- /dev/null +++ b/src/tests/broken_configuration_php8/config/broken_conf_line_no_closing.ini | |||
| @@ -0,0 +1 @@ | |||
| sp.cookie.name("123" | |||
diff --git a/src/tests/broken_configuration_php8/config/broken_conf_local_var_1.ini b/src/tests/broken_configuration_php8/config/broken_conf_local_var_1.ini new file mode 100644 index 0000000..ae5165c --- /dev/null +++ b/src/tests/broken_configuration_php8/config/broken_conf_local_var_1.ini | |||
| @@ -0,0 +1 @@ | |||
| sp.disable_function.function("system").var("]").drop(); | |||
diff --git a/src/tests/broken_configuration_php8/config/broken_conf_local_var_10.ini b/src/tests/broken_configuration_php8/config/broken_conf_local_var_10.ini new file mode 100644 index 0000000..93dd07f --- /dev/null +++ b/src/tests/broken_configuration_php8/config/broken_conf_local_var_10.ini | |||
| @@ -0,0 +1 @@ | |||
| sp.disable_function.function("system").var("asd[asd]asd").drop(); | |||
diff --git a/src/tests/broken_configuration_php8/config/broken_conf_local_var_11.ini b/src/tests/broken_configuration_php8/config/broken_conf_local_var_11.ini new file mode 100644 index 0000000..028b1bd --- /dev/null +++ b/src/tests/broken_configuration_php8/config/broken_conf_local_var_11.ini | |||
| @@ -0,0 +1 @@ | |||
| sp.disable_function.function("system").param("asd::").drop(); | |||
diff --git a/src/tests/broken_configuration_php8/config/broken_conf_local_var_12.ini b/src/tests/broken_configuration_php8/config/broken_conf_local_var_12.ini new file mode 100644 index 0000000..a151960 --- /dev/null +++ b/src/tests/broken_configuration_php8/config/broken_conf_local_var_12.ini | |||
| @@ -0,0 +1 @@ | |||
| sp.disable_function.function("system").var("").drop(); | |||
diff --git a/src/tests/broken_configuration_php8/config/broken_conf_local_var_13.ini b/src/tests/broken_configuration_php8/config/broken_conf_local_var_13.ini new file mode 100644 index 0000000..e7c9778 --- /dev/null +++ b/src/tests/broken_configuration_php8/config/broken_conf_local_var_13.ini | |||
| @@ -0,0 +1 @@ | |||
| sp.disable_function.function("system").var("asd->asd").drop(); | |||
diff --git a/src/tests/broken_configuration_php8/config/broken_conf_local_var_14.ini b/src/tests/broken_configuration_php8/config/broken_conf_local_var_14.ini new file mode 100644 index 0000000..6c98ec3 --- /dev/null +++ b/src/tests/broken_configuration_php8/config/broken_conf_local_var_14.ini | |||
| @@ -0,0 +1 @@ | |||
| sp.disable_function.function("system").var("$i+valid var name ").drop(); | |||
diff --git a/src/tests/broken_configuration_php8/config/broken_conf_local_var_15.ini b/src/tests/broken_configuration_php8/config/broken_conf_local_var_15.ini new file mode 100644 index 0000000..a8dc5a4 --- /dev/null +++ b/src/tests/broken_configuration_php8/config/broken_conf_local_var_15.ini | |||
| @@ -0,0 +1 @@ | |||
| sp.disable_function.function("system").var("$i$$!@#->qwe").drop(); | |||
diff --git a/src/tests/broken_configuration_php8/config/broken_conf_local_var_16.ini b/src/tests/broken_configuration_php8/config/broken_conf_local_var_16.ini new file mode 100644 index 0000000..550719b --- /dev/null +++ b/src/tests/broken_configuration_php8/config/broken_conf_local_var_16.ini | |||
| @@ -0,0 +1 @@ | |||
| sp.disable_function.function("system").var("\"").drop(); | |||
diff --git a/src/tests/broken_configuration_php8/config/broken_conf_local_var_2.ini b/src/tests/broken_configuration_php8/config/broken_conf_local_var_2.ini new file mode 100644 index 0000000..145a3b5 --- /dev/null +++ b/src/tests/broken_configuration_php8/config/broken_conf_local_var_2.ini | |||
| @@ -0,0 +1 @@ | |||
| sp.disable_function.function("system").var("\"\"asd").drop(); | |||
diff --git a/src/tests/broken_configuration_php8/config/broken_conf_local_var_3.ini b/src/tests/broken_configuration_php8/config/broken_conf_local_var_3.ini new file mode 100644 index 0000000..5d89076 --- /dev/null +++ b/src/tests/broken_configuration_php8/config/broken_conf_local_var_3.ini | |||
| @@ -0,0 +1 @@ | |||
| sp.disable_function.function("system").var("\$qwe->::").drop(); | |||
diff --git a/src/tests/broken_configuration_php8/config/broken_conf_local_var_4.ini b/src/tests/broken_configuration_php8/config/broken_conf_local_var_4.ini new file mode 100644 index 0000000..3ec073b --- /dev/null +++ b/src/tests/broken_configuration_php8/config/broken_conf_local_var_4.ini | |||
| @@ -0,0 +1 @@ | |||
| sp.disable_function.function("system").var("\"asd\"asd[]").drop(); | |||
diff --git a/src/tests/broken_configuration_php8/config/broken_conf_local_var_5.ini b/src/tests/broken_configuration_php8/config/broken_conf_local_var_5.ini new file mode 100644 index 0000000..cd350b6 --- /dev/null +++ b/src/tests/broken_configuration_php8/config/broken_conf_local_var_5.ini | |||
| @@ -0,0 +1 @@ | |||
| sp.disable_function.function("system").var("'asd'asd[]").drop(); | |||
diff --git a/src/tests/broken_configuration_php8/config/broken_conf_local_var_6.ini b/src/tests/broken_configuration_php8/config/broken_conf_local_var_6.ini new file mode 100644 index 0000000..02f4f1a --- /dev/null +++ b/src/tests/broken_configuration_php8/config/broken_conf_local_var_6.ini | |||
| @@ -0,0 +1 @@ | |||
| sp.disable_function.function("system").var("''asd").drop(); | |||
diff --git a/src/tests/broken_configuration_php8/config/broken_conf_local_var_7.ini b/src/tests/broken_configuration_php8/config/broken_conf_local_var_7.ini new file mode 100644 index 0000000..abbd223 --- /dev/null +++ b/src/tests/broken_configuration_php8/config/broken_conf_local_var_7.ini | |||
| @@ -0,0 +1 @@ | |||
| sp.disable_function.function("system").var("asd-->").drop(); | |||
diff --git a/src/tests/broken_configuration_php8/config/broken_conf_local_var_8.ini b/src/tests/broken_configuration_php8/config/broken_conf_local_var_8.ini new file mode 100644 index 0000000..fd18487 --- /dev/null +++ b/src/tests/broken_configuration_php8/config/broken_conf_local_var_8.ini | |||
| @@ -0,0 +1 @@ | |||
| sp.disable_function.function("system").var("asd[asd]\"asd\"").drop(); | |||
diff --git a/src/tests/broken_configuration_php8/config/broken_conf_local_var_9.ini b/src/tests/broken_configuration_php8/config/broken_conf_local_var_9.ini new file mode 100644 index 0000000..a311b86 --- /dev/null +++ b/src/tests/broken_configuration_php8/config/broken_conf_local_var_9.ini | |||
| @@ -0,0 +1 @@ | |||
| sp.disable_function.function("system").var("asd[asd]\'asd\'").drop(); | |||
diff --git a/src/tests/broken_configuration_php8/config/broken_conf_lots_of_quotes.ini b/src/tests/broken_configuration_php8/config/broken_conf_lots_of_quotes.ini new file mode 100644 index 0000000..189a10d --- /dev/null +++ b/src/tests/broken_configuration_php8/config/broken_conf_lots_of_quotes.ini | |||
| @@ -0,0 +1 @@ | |||
| sp.cookie.name("this\"is a weird\"\"\"cookie\"name""); | |||
diff --git a/src/tests/broken_configuration_php8/config/broken_conf_missing_script.ini b/src/tests/broken_configuration_php8/config/broken_conf_missing_script.ini new file mode 100644 index 0000000..a46f590 --- /dev/null +++ b/src/tests/broken_configuration_php8/config/broken_conf_missing_script.ini | |||
| @@ -0,0 +1 @@ | |||
| sp.upload_validation.enable(); | |||
diff --git a/src/tests/broken_configuration_php8/config/broken_conf_mutually_exclusive.ini b/src/tests/broken_configuration_php8/config/broken_conf_mutually_exclusive.ini new file mode 100644 index 0000000..7ea483f --- /dev/null +++ b/src/tests/broken_configuration_php8/config/broken_conf_mutually_exclusive.ini | |||
| @@ -0,0 +1 @@ | |||
| sp.disable_function.function("system").param("id").value("42").value_r("^id$").drop(); | |||
diff --git a/src/tests/broken_configuration_php8/config/broken_conf_mutually_exclusive10.ini b/src/tests/broken_configuration_php8/config/broken_conf_mutually_exclusive10.ini new file mode 100644 index 0000000..da8426e --- /dev/null +++ b/src/tests/broken_configuration_php8/config/broken_conf_mutually_exclusive10.ini | |||
| @@ -0,0 +1 @@ | |||
| sp.readonly_exec.enable().disable(); | |||
diff --git a/src/tests/broken_configuration_php8/config/broken_conf_mutually_exclusive11.ini b/src/tests/broken_configuration_php8/config/broken_conf_mutually_exclusive11.ini new file mode 100644 index 0000000..cab163f --- /dev/null +++ b/src/tests/broken_configuration_php8/config/broken_conf_mutually_exclusive11.ini | |||
| @@ -0,0 +1 @@ | |||
| sp.disable_function.function("strcmp").drop().ret("hip").var("hop"); | |||
diff --git a/src/tests/broken_configuration_php8/config/broken_conf_mutually_exclusive12.ini b/src/tests/broken_configuration_php8/config/broken_conf_mutually_exclusive12.ini new file mode 100644 index 0000000..fe140db --- /dev/null +++ b/src/tests/broken_configuration_php8/config/broken_conf_mutually_exclusive12.ini | |||
| @@ -0,0 +1 @@ | |||
| sp.disable_function.function("strcmp").drop().ret("hip").value("hop"); | |||
diff --git a/src/tests/broken_configuration_php8/config/broken_conf_mutually_exclusive2.ini b/src/tests/broken_configuration_php8/config/broken_conf_mutually_exclusive2.ini new file mode 100644 index 0000000..3ff3ca7 --- /dev/null +++ b/src/tests/broken_configuration_php8/config/broken_conf_mutually_exclusive2.ini | |||
| @@ -0,0 +1 @@ | |||
| sp.disable_function.function("system").function_r("system").param("id").value("42").drop(); | |||
diff --git a/src/tests/broken_configuration_php8/config/broken_conf_mutually_exclusive3.ini b/src/tests/broken_configuration_php8/config/broken_conf_mutually_exclusive3.ini new file mode 100644 index 0000000..f4f7604 --- /dev/null +++ b/src/tests/broken_configuration_php8/config/broken_conf_mutually_exclusive3.ini | |||
| @@ -0,0 +1 @@ | |||
| sp.disable_function.function("system").param("id").value("42").filename_r("^id$").filename("pouet.txt").drop(); | |||
diff --git a/src/tests/broken_configuration_php8/config/broken_conf_mutually_exclusive4.ini b/src/tests/broken_configuration_php8/config/broken_conf_mutually_exclusive4.ini new file mode 100644 index 0000000..c38a727 --- /dev/null +++ b/src/tests/broken_configuration_php8/config/broken_conf_mutually_exclusive4.ini | |||
| @@ -0,0 +1 @@ | |||
| sp.disable_function.function("system").param("id").value("42").param_r("^id$").drop(); | |||
diff --git a/src/tests/broken_configuration_php8/config/broken_conf_mutually_exclusive5.ini b/src/tests/broken_configuration_php8/config/broken_conf_mutually_exclusive5.ini new file mode 100644 index 0000000..254b2a3 --- /dev/null +++ b/src/tests/broken_configuration_php8/config/broken_conf_mutually_exclusive5.ini | |||
| @@ -0,0 +1 @@ | |||
| sp.disable_function.function("system").ret("0").drop().ret_r("^0$"); | |||
diff --git a/src/tests/broken_configuration_php8/config/broken_conf_mutually_exclusive6.ini b/src/tests/broken_configuration_php8/config/broken_conf_mutually_exclusive6.ini new file mode 100644 index 0000000..7c6712c --- /dev/null +++ b/src/tests/broken_configuration_php8/config/broken_conf_mutually_exclusive6.ini | |||
| @@ -0,0 +1 @@ | |||
| sp.disable_function.function("system").param("id").value("42").ret_r("^0$").drop(); | |||
diff --git a/src/tests/broken_configuration_php8/config/broken_conf_mutually_exclusive7.ini b/src/tests/broken_configuration_php8/config/broken_conf_mutually_exclusive7.ini new file mode 100644 index 0000000..feb3486 --- /dev/null +++ b/src/tests/broken_configuration_php8/config/broken_conf_mutually_exclusive7.ini | |||
| @@ -0,0 +1 @@ | |||
| sp.disable_function.function("system").ret("0").drop().allow(); | |||
diff --git a/src/tests/broken_configuration_php8/config/broken_conf_mutually_exclusive8.ini b/src/tests/broken_configuration_php8/config/broken_conf_mutually_exclusive8.ini new file mode 100644 index 0000000..c9c9ea2 --- /dev/null +++ b/src/tests/broken_configuration_php8/config/broken_conf_mutually_exclusive8.ini | |||
| @@ -0,0 +1 @@ | |||
| sp.disable_function.ret("0").drop(); | |||
diff --git a/src/tests/broken_configuration_php8/config/broken_conf_mutually_exclusive9.ini b/src/tests/broken_configuration_php8/config/broken_conf_mutually_exclusive9.ini new file mode 100644 index 0000000..7bf6a62 --- /dev/null +++ b/src/tests/broken_configuration_php8/config/broken_conf_mutually_exclusive9.ini | |||
| @@ -0,0 +1 @@ | |||
| sp.unserialize_hmac.enable().disable(); | |||
diff --git a/src/tests/broken_configuration_php8/config/broken_conf_nonexisting_script.ini b/src/tests/broken_configuration_php8/config/broken_conf_nonexisting_script.ini new file mode 100644 index 0000000..8327438 --- /dev/null +++ b/src/tests/broken_configuration_php8/config/broken_conf_nonexisting_script.ini | |||
| @@ -0,0 +1 @@ | |||
| sp.upload_validation.enable().script("./non_existing_script.sh"); | |||
diff --git a/src/tests/broken_configuration_php8/config/broken_conf_quotes.ini b/src/tests/broken_configuration_php8/config/broken_conf_quotes.ini new file mode 100644 index 0000000..eac8739 --- /dev/null +++ b/src/tests/broken_configuration_php8/config/broken_conf_quotes.ini | |||
| @@ -0,0 +1,3 @@ | |||
| 1 | sp.disable_function.function("system").filename("/static_pages/index.php").var("_SERVER[PHP_SELF").value_r("\"").drop().alias("XSS"); | ||
| 2 | sp.disable_function.filename("include/imageobject_im.class.php").function("exec").var("CONFIG[im_options]).value_r("[^a-z0-9]").drop(); | ||
| 3 | |||
diff --git a/src/tests/broken_configuration_php8/config/broken_conf_readonly_exec.ini b/src/tests/broken_configuration_php8/config/broken_conf_readonly_exec.ini new file mode 100644 index 0000000..9e11313 --- /dev/null +++ b/src/tests/broken_configuration_php8/config/broken_conf_readonly_exec.ini | |||
| @@ -0,0 +1 @@ | |||
| sp.readonly_exec.enable(1234); | |||
diff --git a/src/tests/broken_configuration_php8/config/broken_conf_session_encryption.ini b/src/tests/broken_configuration_php8/config/broken_conf_session_encryption.ini new file mode 100644 index 0000000..66b7956 --- /dev/null +++ b/src/tests/broken_configuration_php8/config/broken_conf_session_encryption.ini | |||
| @@ -0,0 +1 @@ | |||
| sp.session.encrypt(invalid value :/); | |||
diff --git a/src/tests/broken_configuration_php8/config/broken_conf_session_encryption_without_encryption_key.ini b/src/tests/broken_configuration_php8/config/broken_conf_session_encryption_without_encryption_key.ini new file mode 100644 index 0000000..2b6f674 --- /dev/null +++ b/src/tests/broken_configuration_php8/config/broken_conf_session_encryption_without_encryption_key.ini | |||
| @@ -0,0 +1,2 @@ | |||
| 1 | sp.global.cookie_env_var("MY_SUPER_ENV_VAR_YAY"); | ||
| 2 | sp.session.encrypt(); | ||
diff --git a/src/tests/broken_configuration_php8/config/broken_conf_session_encryption_without_env_var.ini b/src/tests/broken_configuration_php8/config/broken_conf_session_encryption_without_env_var.ini new file mode 100644 index 0000000..43caf4a --- /dev/null +++ b/src/tests/broken_configuration_php8/config/broken_conf_session_encryption_without_env_var.ini | |||
| @@ -0,0 +1,2 @@ | |||
| 1 | sp.global.secret_key("super secret key, shhhh"); | ||
| 2 | sp.session.encrypt(); | ||
diff --git a/src/tests/broken_configuration_php8/config/broken_conf_to_few_args.ini b/src/tests/broken_configuration_php8/config/broken_conf_to_few_args.ini new file mode 100644 index 0000000..89e19be --- /dev/null +++ b/src/tests/broken_configuration_php8/config/broken_conf_to_few_args.ini | |||
| @@ -0,0 +1 @@ | |||
| sp.harden_random.enable(); | |||
diff --git a/src/tests/broken_configuration_php8/config/broken_conf_unserialize.ini b/src/tests/broken_configuration_php8/config/broken_conf_unserialize.ini new file mode 100644 index 0000000..9cdc9a6 --- /dev/null +++ b/src/tests/broken_configuration_php8/config/broken_conf_unserialize.ini | |||
| @@ -0,0 +1 @@ | |||
| sp.unserialize_hmac.enable(1234); | |||
diff --git a/src/tests/broken_configuration_php8/config/broken_conf_weird_keyword.ini b/src/tests/broken_configuration_php8/config/broken_conf_weird_keyword.ini new file mode 100644 index 0000000..bf5e7f5 --- /dev/null +++ b/src/tests/broken_configuration_php8/config/broken_conf_weird_keyword.ini | |||
| @@ -0,0 +1 @@ | |||
| sp.harden_random.enable().not_a_valid_keyword("test"); | |||
diff --git a/src/tests/broken_configuration_php8/config/broken_conf_wrapper_whitelist.ini b/src/tests/broken_configuration_php8/config/broken_conf_wrapper_whitelist.ini new file mode 100644 index 0000000..b8e08a8 --- /dev/null +++ b/src/tests/broken_configuration_php8/config/broken_conf_wrapper_whitelist.ini | |||
| @@ -0,0 +1 @@ | |||
| sp.wrappers_whitelist.invalid_param(); | |||
diff --git a/src/tests/broken_configuration_php8/config/broken_conf_wrong_quotes.ini b/src/tests/broken_configuration_php8/config/broken_conf_wrong_quotes.ini new file mode 100644 index 0000000..ff41f93 --- /dev/null +++ b/src/tests/broken_configuration_php8/config/broken_conf_wrong_quotes.ini | |||
| @@ -0,0 +1 @@ | |||
| sp.cookie.name("\) | |||
diff --git a/src/tests/broken_configuration_php8/config/broken_conf_wrong_type.ini b/src/tests/broken_configuration_php8/config/broken_conf_wrong_type.ini new file mode 100644 index 0000000..b2943db --- /dev/null +++ b/src/tests/broken_configuration_php8/config/broken_conf_wrong_type.ini | |||
| @@ -0,0 +1,5 @@ | |||
| 1 | sp.disable_function.function("strpos").ret_type("undef").drop().alias("Return value is undef"); | ||
| 2 | sp.disable_function.function("strpos").ret_type("null").drop().alias("Return value is null"); | ||
| 3 | sp.disable_function.function("strpos").ret_type("object").drop().alias("Return value is object"); | ||
| 4 | sp.disable_function.function("strpos").ret_type("reference").drop().alias("Return value is reference"); | ||
| 5 | sp.disable_function.function("strpos").ret_type("totally_wrong_type").drop().alias("Return value is FALSE"); | ||
diff --git a/src/tests/broken_configuration_php8/config/broken_config_regexp.ini b/src/tests/broken_configuration_php8/config/broken_config_regexp.ini new file mode 100644 index 0000000..62bed11 --- /dev/null +++ b/src/tests/broken_configuration_php8/config/broken_config_regexp.ini | |||
| @@ -0,0 +1 @@ | |||
| sp.disable_function.function_r("^system$").filename_r("*.").drop(); | |||
diff --git a/src/tests/broken_configuration_php8/config/broken_config_regexp_no_closing_paren.ini b/src/tests/broken_configuration_php8/config/broken_config_regexp_no_closing_paren.ini new file mode 100644 index 0000000..93e150b --- /dev/null +++ b/src/tests/broken_configuration_php8/config/broken_config_regexp_no_closing_paren.ini | |||
| @@ -0,0 +1 @@ | |||
| sp.disable_function.function_r("^system$").drop().filename_r("*." | |||
diff --git a/src/tests/broken_configuration_php8/config/broken_regexp.ini b/src/tests/broken_configuration_php8/config/broken_regexp.ini new file mode 100644 index 0000000..8e4bf69 --- /dev/null +++ b/src/tests/broken_configuration_php8/config/broken_regexp.ini | |||
| @@ -0,0 +1 @@ | |||
| sp.disable_function.function("AwesomeClass::method3").param("a").drop().value_r("^$["); | |||
diff --git a/src/tests/broken_configuration_php8/config/config_broken_conf_truncated.ini b/src/tests/broken_configuration_php8/config/config_broken_conf_truncated.ini new file mode 100644 index 0000000..bf05dfb --- /dev/null +++ b/src/tests/broken_configuration_php8/config/config_broken_conf_truncated.ini | |||
| @@ -0,0 +1 @@ | |||
| sp.disable_function.function("").param(no quote, omg! | |||
diff --git a/src/tests/broken_configuration_php8/config/config_encrypted_cookies_noname.ini b/src/tests/broken_configuration_php8/config/config_encrypted_cookies_noname.ini new file mode 100644 index 0000000..048e404 --- /dev/null +++ b/src/tests/broken_configuration_php8/config/config_encrypted_cookies_noname.ini | |||
| @@ -0,0 +1,3 @@ | |||
| 1 | sp.global.secret_key("abcdef").cookie_env_var("REMOTE_ADDR"); | ||
| 2 | sp.cookie.name("").encrypt(); | ||
| 3 | sp.auto_cookie_secure.enable(); | ||
diff --git a/src/tests/broken_configuration_php8/config/config_encrypted_regexp_cookies_bad_regexp.ini b/src/tests/broken_configuration_php8/config/config_encrypted_regexp_cookies_bad_regexp.ini new file mode 100644 index 0000000..4fe92fd --- /dev/null +++ b/src/tests/broken_configuration_php8/config/config_encrypted_regexp_cookies_bad_regexp.ini | |||
| @@ -0,0 +1,3 @@ | |||
| 1 | sp.global.secret_key("abcdef").cookie_env_var("REMOTE_ADDR"); | ||
| 2 | sp.cookie.name_r("^super_co[a-z+$").encrypt(); | ||
| 3 | sp.auto_cookie_secure.enable(); | ||
diff --git a/src/tests/broken_configuration_php8/config/config_unmatching_brackets.ini b/src/tests/broken_configuration_php8/config/config_unmatching_brackets.ini new file mode 100644 index 0000000..45fa4fe --- /dev/null +++ b/src/tests/broken_configuration_php8/config/config_unmatching_brackets.ini | |||
| @@ -0,0 +1 @@ | |||
| sp.disable_function.function("foo").param("arr[b]]]]]").value("aaa").alias("4").drop(); | |||
diff --git a/src/tests/broken_configuration_php8/config/disabled_functions_cidr.ini b/src/tests/broken_configuration_php8/config/disabled_functions_cidr.ini new file mode 100644 index 0000000..f69ce07 --- /dev/null +++ b/src/tests/broken_configuration_php8/config/disabled_functions_cidr.ini | |||
| @@ -0,0 +1,9 @@ | |||
| 1 | sp.disable_function.function("system").drop().cidr("2001:ab9:a::123/64"); | ||
| 2 | sp.disable_function.function("system").drop().cidr("192.168.0.1/16"); | ||
| 3 | sp.disable_function.function("system").drop().cidr("127.0.0.1/8"); | ||
| 4 | sp.disable_function.function("printf").drop().cidr("10.0.0.1/8"); | ||
| 5 | sp.disable_function.function("strpos").drop().cidr("127.0.0.2/4"); | ||
| 6 | sp.disable_function.function("strpos").drop().cidr("::ffff:192.0.2.128/128"); | ||
| 7 | sp.disable_function.function("strpos").drop().cidr("2001:ab9:a::123/64"); | ||
| 8 | sp.disable_function.function("strpos").drop().cidr("2001:0db8:f000:f000:f000:ff00:0042:8329/124"); | ||
| 9 | sp.disable_function.function("printf").drop().cidr("2002:0db8:0000:0000:0000:ff00:0042:8329/24"); | ||
diff --git a/src/tests/broken_configuration_php8/encrypt_regexp_cookies_bad_regexp.phpt b/src/tests/broken_configuration_php8/encrypt_regexp_cookies_bad_regexp.phpt new file mode 100644 index 0000000..7a8c909 --- /dev/null +++ b/src/tests/broken_configuration_php8/encrypt_regexp_cookies_bad_regexp.phpt | |||
| @@ -0,0 +1,22 @@ | |||
| 1 | --TEST-- | ||
| 2 | Cookie decryption in ipv4 | ||
| 3 | --SKIPIF-- | ||
| 4 | <?php if (!extension_loaded("snuffleupagus")) print "skip"; ?> | ||
| 5 | --INI-- | ||
| 6 | sp.configuration_file={PWD}/config/config_encrypted_regexp_cookies_bad_regexp.ini | ||
| 7 | error_reporting=1 | ||
| 8 | --COOKIE-- | ||
| 9 | super_cookie=AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAP3gV9YJZL/pUeNAjCKFW0U2ywmf1CwHzwd2pWM=;awful_cookie=awful_cookie_value; | ||
| 10 | --ENV-- | ||
| 11 | return <<<EOF | ||
| 12 | REMOTE_ADDR=127.0.0.1 | ||
| 13 | HTTP_USER_AGENT=Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Ubuntu Chromium/59.0.3071.109 Chrome/59.0.3071.109 Safari/537.36 | ||
| 14 | EOF; | ||
| 15 | --FILE-- | ||
| 16 | <?php var_dump($_COOKIE); ?> | ||
| 17 | --EXPECT-- | ||
| 18 | Fatal error: [snuffleupagus][127.0.0.1][config][log] Invalid configuration file in Unknown on line 0 | ||
| 19 | |||
| 20 | Fatal error: [snuffleupagus][127.0.0.1][config][log] Failed to compile '^super_co[a-z+$': missing terminating ] for character class on line 2. in Unknown on line 0 | ||
| 21 | |||
| 22 | Fatal error: [snuffleupagus][127.0.0.1][config][log] '.name_r()' is expecting a valid regexp, and not '"^super_co[a-z+$"' on line 2 in Unknown on line 0 | ||
diff --git a/src/tests/config/phplog.ini b/src/tests/config/phplog.ini new file mode 100644 index 0000000..4eaa287 --- /dev/null +++ b/src/tests/config/phplog.ini | |||
| @@ -0,0 +1,3 @@ | |||
| 1 | sp.global.secret_key("abcdef"); | ||
| 2 | sp.unserialize_hmac.enable(); | ||
| 3 | sp.log_media("php"); | ||
diff --git a/src/tests/config/syslog.ini b/src/tests/config/syslog.ini new file mode 100644 index 0000000..17dce05 --- /dev/null +++ b/src/tests/config/syslog.ini | |||
| @@ -0,0 +1,3 @@ | |||
| 1 | sp.global.secret_key("abcdef"); | ||
| 2 | sp.unserialize_hmac.enable(); | ||
| 3 | sp.log_media("syslog"); | ||
diff --git a/src/tests/config/syslog_simulation.ini b/src/tests/config/syslog_simulation.ini new file mode 100644 index 0000000..bb52850 --- /dev/null +++ b/src/tests/config/syslog_simulation.ini | |||
| @@ -0,0 +1,3 @@ | |||
| 1 | sp.global.secret_key("abcdef"); | ||
| 2 | sp.unserialize_hmac.enable().simulation(); | ||
| 3 | sp.log_media("syslog"); | ||
diff --git a/src/tests/config_typo3.phpt b/src/tests/config_typo3.phpt index 1b678ca..6545d07 100644 --- a/src/tests/config_typo3.phpt +++ b/src/tests/config_typo3.phpt | |||
| @@ -1,7 +1,7 @@ | |||
| 1 | --TEST-- | 1 | --TEST-- |
| 2 | Rules for Typo3 | 2 | Rules for Typo3 |
| 3 | --SKIPIF-- | 3 | --SKIPIF-- |
| 4 | <?php if (!extension_loaded("snuffleupagus")) die "skip"; ?> | 4 | <?php if (!extension_loaded("snuffleupagus")) print "skip"; ?> |
| 5 | --INI-- | 5 | --INI-- |
| 6 | sp.configuration_file={PWD}/../../config/typo3.rules | 6 | sp.configuration_file={PWD}/../../config/typo3.rules |
| 7 | --FILE-- | 7 | --FILE-- |
diff --git a/src/tests/cookies_encryption/encrypt_cookies.phpt b/src/tests/cookies_encryption/encrypt_cookies.phpt index d581dbc..49587b7 100644 --- a/src/tests/cookies_encryption/encrypt_cookies.phpt +++ b/src/tests/cookies_encryption/encrypt_cookies.phpt | |||
| @@ -1,7 +1,7 @@ | |||
| 1 | --TEST-- | 1 | --TEST-- |
| 2 | Cookie decryption in ipv4 | 2 | Cookie decryption in ipv4 |
| 3 | --SKIPIF-- | 3 | --SKIPIF-- |
| 4 | <?php if (!extension_loaded("snuffleupagus")) die "skip"; ?> | 4 | <?php if (!extension_loaded("snuffleupagus")) print "skip"; ?> |
| 5 | --INI-- | 5 | --INI-- |
| 6 | sp.configuration_file={PWD}/config/config_encrypted_cookies.ini | 6 | sp.configuration_file={PWD}/config/config_encrypted_cookies.ini |
| 7 | --COOKIE-- | 7 | --COOKIE-- |
diff --git a/src/tests/cookies_encryption/encrypt_cookies2.phpt b/src/tests/cookies_encryption/encrypt_cookies2.phpt index 195cb24..18c6b41 100644 --- a/src/tests/cookies_encryption/encrypt_cookies2.phpt +++ b/src/tests/cookies_encryption/encrypt_cookies2.phpt | |||
| @@ -1,7 +1,7 @@ | |||
| 1 | --TEST-- | 1 | --TEST-- |
| 2 | Cookie encryption in ipv4 | 2 | Cookie encryption in ipv4 |
| 3 | --SKIPIF-- | 3 | --SKIPIF-- |
| 4 | <?php if (!extension_loaded("snuffleupagus")) die "skip"; ?> | 4 | <?php if (!extension_loaded("snuffleupagus")) print "skip"; ?> |
| 5 | --INI-- | 5 | --INI-- |
| 6 | sp.configuration_file={PWD}/config/config_encrypted_regexp_cookies.ini | 6 | sp.configuration_file={PWD}/config/config_encrypted_regexp_cookies.ini |
| 7 | --COOKIE-- | 7 | --COOKIE-- |
diff --git a/src/tests/cookies_encryption/encrypt_cookies3.phpt b/src/tests/cookies_encryption/encrypt_cookies3.phpt index ceb364c..beb4efb 100644 --- a/src/tests/cookies_encryption/encrypt_cookies3.phpt +++ b/src/tests/cookies_encryption/encrypt_cookies3.phpt | |||
| @@ -1,7 +1,7 @@ | |||
| 1 | --TEST-- | 1 | --TEST-- |
| 2 | Cookie decryption with ipv6 | 2 | Cookie decryption with ipv6 |
| 3 | --SKIPIF-- | 3 | --SKIPIF-- |
| 4 | <?php if (!extension_loaded("snuffleupagus")) die "skip"; ?> | 4 | <?php if (!extension_loaded("snuffleupagus")) print "skip"; ?> |
| 5 | --INI-- | 5 | --INI-- |
| 6 | sp.configuration_file={PWD}/config/config_encrypted_regexp_cookies.ini | 6 | sp.configuration_file={PWD}/config/config_encrypted_regexp_cookies.ini |
| 7 | --COOKIE-- | 7 | --COOKIE-- |
diff --git a/src/tests/cookies_encryption/encrypt_cookies4.phpt b/src/tests/cookies_encryption/encrypt_cookies4.phpt index b644680..fa36756 100644 --- a/src/tests/cookies_encryption/encrypt_cookies4.phpt +++ b/src/tests/cookies_encryption/encrypt_cookies4.phpt | |||
| @@ -1,7 +1,8 @@ | |||
| 1 | --TEST-- | 1 | --TEST-- |
| 2 | Cookie encryption in ipv6 | 2 | Cookie encryption in ipv6 |
| 3 | --SKIPIF-- | 3 | --SKIPIF-- |
| 4 | <?php if (!extension_loaded("snuffleupagus")) die "skip"; ?> | 4 | <?php if (!extension_loaded("snuffleupagus")) print "skip"; ?> |
| 5 | <?php if (PHP_VERSION_ID >= 80000) print "skip"; ?> | ||
| 5 | --INI-- | 6 | --INI-- |
| 6 | sp.configuration_file={PWD}/config/config_encrypted_cookies.ini | 7 | sp.configuration_file={PWD}/config/config_encrypted_cookies.ini |
| 7 | --COOKIE-- | 8 | --COOKIE-- |
diff --git a/src/tests/cookies_encryption/encrypt_cookies_empty_env.phpt b/src/tests/cookies_encryption/encrypt_cookies_empty_env.phpt index 721806a..aeec708 100644 --- a/src/tests/cookies_encryption/encrypt_cookies_empty_env.phpt +++ b/src/tests/cookies_encryption/encrypt_cookies_empty_env.phpt | |||
| @@ -1,7 +1,7 @@ | |||
| 1 | --TEST-- | 1 | --TEST-- |
| 2 | Cookie encryption - empty environment variable specified | 2 | Cookie encryption - empty environment variable specified |
| 3 | --SKIPIF-- | 3 | --SKIPIF-- |
| 4 | <?php if (!extension_loaded("snuffleupagus")) die "skip"; ?> | 4 | <?php if (!extension_loaded("snuffleupagus")) print "skip"; ?> |
| 5 | --INI-- | 5 | --INI-- |
| 6 | sp.configuration_file={PWD}/config/config_encrypted_cookies_empty_env.ini | 6 | sp.configuration_file={PWD}/config/config_encrypted_cookies_empty_env.ini |
| 7 | display_errors=1 | 7 | display_errors=1 |
| @@ -12,7 +12,7 @@ super_cookie=cGFkZGluZ3BhZGRpbmdwYWRkaW5ncGFkZGluZ3BhZGRpbmdwYWRkaW5ncGFkZGluZ3B | |||
| 12 | --FILE-- | 12 | --FILE-- |
| 13 | <?php echo "1\n\n\n\n\n"; ?> | 13 | <?php echo "1\n\n\n\n\n"; ?> |
| 14 | --EXPECT-- | 14 | --EXPECT-- |
| 15 | Warning: [snuffleupagus][0.0.0.0][cookie_encryption] The environment variable 'SUPER_ENV_VAR' is empty, cookies are weakly encrypted in Unknown on line 0 | 15 | Warning: [snuffleupagus][0.0.0.0][cookie_encryption][log] The environment variable 'SUPER_ENV_VAR' is empty, cookies are weakly encrypted in Unknown on line 0 |
| 16 | 16 | ||
| 17 | Warning: [snuffleupagus][0.0.0.0][cookie_encryption] Something went wrong with the decryption of super_cookie in Unknown on line 0 | 17 | Warning: [snuffleupagus][0.0.0.0][cookie_encryption][log] Something went wrong with the decryption of super_cookie in Unknown on line 0 |
| 18 | 1 | 18 | 1 |
diff --git a/src/tests/cookies_encryption/encrypt_cookies_invalid_decryption.phpt b/src/tests/cookies_encryption/encrypt_cookies_invalid_decryption.phpt index e2190b3..cc988ce 100644 --- a/src/tests/cookies_encryption/encrypt_cookies_invalid_decryption.phpt +++ b/src/tests/cookies_encryption/encrypt_cookies_invalid_decryption.phpt | |||
| @@ -1,7 +1,7 @@ | |||
| 1 | --TEST-- | 1 | --TEST-- |
| 2 | Cookie encryption - invalid decryption | 2 | Cookie encryption - invalid decryption |
| 3 | --SKIPIF-- | 3 | --SKIPIF-- |
| 4 | <?php if (!extension_loaded("snuffleupagus")) die "skip"; ?> | 4 | <?php if (!extension_loaded("snuffleupagus")) print "skip"; ?> |
| 5 | --INI-- | 5 | --INI-- |
| 6 | sp.configuration_file={PWD}/config/config_encrypted_cookies.ini | 6 | sp.configuration_file={PWD}/config/config_encrypted_cookies.ini |
| 7 | display_errors=1 | 7 | display_errors=1 |
| @@ -18,7 +18,7 @@ EOF; | |||
| 18 | echo "1337\n"; | 18 | echo "1337\n"; |
| 19 | var_dump($_COOKIE); ?> | 19 | var_dump($_COOKIE); ?> |
| 20 | --EXPECT-- | 20 | --EXPECT-- |
| 21 | Warning: [snuffleupagus][127.0.0.1][cookie_encryption] Something went wrong with the decryption of super_cookie in Unknown on line 0 | 21 | Warning: [snuffleupagus][127.0.0.1][cookie_encryption][log] Something went wrong with the decryption of super_cookie in Unknown on line 0 |
| 22 | 1337 | 22 | 1337 |
| 23 | array(1) { | 23 | array(1) { |
| 24 | ["awfulcookie"]=> | 24 | ["awfulcookie"]=> |
diff --git a/src/tests/cookies_encryption/encrypt_cookies_invalid_decryption2.phpt b/src/tests/cookies_encryption/encrypt_cookies_invalid_decryption2.phpt index 3efe051..5ec6af5 100644 --- a/src/tests/cookies_encryption/encrypt_cookies_invalid_decryption2.phpt +++ b/src/tests/cookies_encryption/encrypt_cookies_invalid_decryption2.phpt | |||
| @@ -1,7 +1,7 @@ | |||
| 1 | --TEST-- | 1 | --TEST-- |
| 2 | Cookie encryption | 2 | Cookie encryption |
| 3 | --SKIPIF-- | 3 | --SKIPIF-- |
| 4 | <?php if (!extension_loaded("snuffleupagus")) die "skip"; ?> | 4 | <?php if (!extension_loaded("snuffleupagus")) print "skip"; ?> |
| 5 | --INI-- | 5 | --INI-- |
| 6 | sp.configuration_file={PWD}/config/config_encrypted_cookies.ini | 6 | sp.configuration_file={PWD}/config/config_encrypted_cookies.ini |
| 7 | display_errors=1 | 7 | display_errors=1 |
| @@ -16,4 +16,4 @@ EOF; | |||
| 16 | --FILE-- | 16 | --FILE-- |
| 17 | <?php var_dump($_COOKIE); ?> | 17 | <?php var_dump($_COOKIE); ?> |
| 18 | --EXPECT-- | 18 | --EXPECT-- |
| 19 | Fatal error: [snuffleupagus][127.0.0.1][cookie_encryption] Buffer underflow tentative detected in cookie encryption handling in Unknown on line 0 \ No newline at end of file | 19 | Fatal error: [snuffleupagus][127.0.0.1][cookie_encryption][drop] Buffer underflow tentative detected in cookie encryption handling in Unknown on line 0 \ No newline at end of file |
diff --git a/src/tests/cookies_encryption/encrypt_cookies_invalid_decryption3.phpt b/src/tests/cookies_encryption/encrypt_cookies_invalid_decryption3.phpt index f4afc32..a6afdbe 100644 --- a/src/tests/cookies_encryption/encrypt_cookies_invalid_decryption3.phpt +++ b/src/tests/cookies_encryption/encrypt_cookies_invalid_decryption3.phpt | |||
| @@ -1,7 +1,7 @@ | |||
| 1 | --TEST-- | 1 | --TEST-- |
| 2 | Cookie encryption | 2 | Cookie encryption |
| 3 | --SKIPIF-- | 3 | --SKIPIF-- |
| 4 | <?php if (!extension_loaded("snuffleupagus")) die "skip"; ?> | 4 | <?php if (!extension_loaded("snuffleupagus")) print "skip"; ?> |
| 5 | --INI-- | 5 | --INI-- |
| 6 | sp.configuration_file={PWD}/config/config_encrypted_cookies.ini | 6 | sp.configuration_file={PWD}/config/config_encrypted_cookies.ini |
| 7 | --COOKIE-- | 7 | --COOKIE-- |
diff --git a/src/tests/cookies_encryption/encrypt_cookies_invalid_decryption_short_cookie.phpt b/src/tests/cookies_encryption/encrypt_cookies_invalid_decryption_short_cookie.phpt index 5c99dfc..00a2cec 100644 --- a/src/tests/cookies_encryption/encrypt_cookies_invalid_decryption_short_cookie.phpt +++ b/src/tests/cookies_encryption/encrypt_cookies_invalid_decryption_short_cookie.phpt | |||
| @@ -1,7 +1,7 @@ | |||
| 1 | --TEST-- | 1 | --TEST-- |
| 2 | Cookie encryption - invalid decryption in simulation mode with a short cookie | 2 | Cookie encryption - invalid decryption in simulation mode with a short cookie |
| 3 | --SKIPIF-- | 3 | --SKIPIF-- |
| 4 | <?php if (!extension_loaded("snuffleupagus")) die "skip"; ?> | 4 | <?php if (!extension_loaded("snuffleupagus")) print "skip"; ?> |
| 5 | --INI-- | 5 | --INI-- |
| 6 | sp.configuration_file={PWD}/config/config_encrypted_cookies_simulation.ini | 6 | sp.configuration_file={PWD}/config/config_encrypted_cookies_simulation.ini |
| 7 | display_errors=1 | 7 | display_errors=1 |
| @@ -16,7 +16,7 @@ EOF; | |||
| 16 | --FILE-- | 16 | --FILE-- |
| 17 | <?php var_dump($_COOKIE); ?> | 17 | <?php var_dump($_COOKIE); ?> |
| 18 | --EXPECT-- | 18 | --EXPECT-- |
| 19 | Warning: [snuffleupagus][127.0.0.1][cookie_encryption] Buffer underflow tentative detected in cookie encryption handling for super_cookie. Using the cookie 'as it' instead of decrypting it in Unknown on line 0 | 19 | Warning: [snuffleupagus][127.0.0.1][cookie_encryption][simulation] Buffer underflow tentative detected in cookie encryption handling for super_cookie. Using the cookie 'as it' instead of decrypting it in Unknown on line 0 |
| 20 | array(2) { | 20 | array(2) { |
| 21 | ["super_cookie"]=> | 21 | ["super_cookie"]=> |
| 22 | string(3) "AAA" | 22 | string(3) "AAA" |
diff --git a/src/tests/cookies_encryption/encrypt_cookies_invalid_decryption_simulation.phpt b/src/tests/cookies_encryption/encrypt_cookies_invalid_decryption_simulation.phpt index 29adcf4..4d8e18d 100644 --- a/src/tests/cookies_encryption/encrypt_cookies_invalid_decryption_simulation.phpt +++ b/src/tests/cookies_encryption/encrypt_cookies_invalid_decryption_simulation.phpt | |||
| @@ -1,7 +1,7 @@ | |||
| 1 | --TEST-- | 1 | --TEST-- |
| 2 | Cookie encryption - invalid decryption in simulation mode | 2 | Cookie encryption - invalid decryption in simulation mode |
| 3 | --SKIPIF-- | 3 | --SKIPIF-- |
| 4 | <?php if (!extension_loaded("snuffleupagus")) die "skip"; ?> | 4 | <?php if (!extension_loaded("snuffleupagus")) print "skip"; ?> |
| 5 | --INI-- | 5 | --INI-- |
| 6 | sp.configuration_file={PWD}/config/config_encrypted_cookies_simulation.ini | 6 | sp.configuration_file={PWD}/config/config_encrypted_cookies_simulation.ini |
| 7 | display_errors=1 | 7 | display_errors=1 |
| @@ -18,7 +18,7 @@ EOF; | |||
| 18 | echo "1337\n"; | 18 | echo "1337\n"; |
| 19 | var_dump($_COOKIE); ?> | 19 | var_dump($_COOKIE); ?> |
| 20 | --EXPECT-- | 20 | --EXPECT-- |
| 21 | Warning: [snuffleupagus][127.0.0.1][cookie_encryption] Something went wrong with the decryption of super_cookie. Using the cookie 'as it' instead of decrypting it in Unknown on line 0 | 21 | Warning: [snuffleupagus][127.0.0.1][cookie_encryption][simulation] Something went wrong with the decryption of super_cookie. Using the cookie 'as it' instead of decrypting it in Unknown on line 0 |
| 22 | 1337 | 22 | 1337 |
| 23 | array(2) { | 23 | array(2) { |
| 24 | ["super_cookie"]=> | 24 | ["super_cookie"]=> |
diff --git a/src/tests/cookies_encryption/encrypt_regexp_cookies.phpt b/src/tests/cookies_encryption/encrypt_regexp_cookies.phpt index 6bc187a..da44855 100644 --- a/src/tests/cookies_encryption/encrypt_regexp_cookies.phpt +++ b/src/tests/cookies_encryption/encrypt_regexp_cookies.phpt | |||
| @@ -1,7 +1,7 @@ | |||
| 1 | --TEST-- | 1 | --TEST-- |
| 2 | Cookie decryption in ipv4 | 2 | Cookie decryption in ipv4 |
| 3 | --SKIPIF-- | 3 | --SKIPIF-- |
| 4 | <?php if (!extension_loaded("snuffleupagus")) die "skip"; ?> | 4 | <?php if (!extension_loaded("snuffleupagus")) print "skip"; ?> |
| 5 | --INI-- | 5 | --INI-- |
| 6 | sp.configuration_file={PWD}/config/config_encrypted_regexp_cookies.ini | 6 | sp.configuration_file={PWD}/config/config_encrypted_regexp_cookies.ini |
| 7 | --COOKIE-- | 7 | --COOKIE-- |
diff --git a/src/tests/cookies_encryption/encrypt_regexp_cookies2.phpt b/src/tests/cookies_encryption/encrypt_regexp_cookies2.phpt index 195cb24..18c6b41 100644 --- a/src/tests/cookies_encryption/encrypt_regexp_cookies2.phpt +++ b/src/tests/cookies_encryption/encrypt_regexp_cookies2.phpt | |||
| @@ -1,7 +1,7 @@ | |||
| 1 | --TEST-- | 1 | --TEST-- |
| 2 | Cookie encryption in ipv4 | 2 | Cookie encryption in ipv4 |
| 3 | --SKIPIF-- | 3 | --SKIPIF-- |
| 4 | <?php if (!extension_loaded("snuffleupagus")) die "skip"; ?> | 4 | <?php if (!extension_loaded("snuffleupagus")) print "skip"; ?> |
| 5 | --INI-- | 5 | --INI-- |
| 6 | sp.configuration_file={PWD}/config/config_encrypted_regexp_cookies.ini | 6 | sp.configuration_file={PWD}/config/config_encrypted_regexp_cookies.ini |
| 7 | --COOKIE-- | 7 | --COOKIE-- |
diff --git a/src/tests/cookies_encryption/encrypt_regexp_cookies3.phpt b/src/tests/cookies_encryption/encrypt_regexp_cookies3.phpt index ceb364c..beb4efb 100644 --- a/src/tests/cookies_encryption/encrypt_regexp_cookies3.phpt +++ b/src/tests/cookies_encryption/encrypt_regexp_cookies3.phpt | |||
| @@ -1,7 +1,7 @@ | |||
| 1 | --TEST-- | 1 | --TEST-- |
| 2 | Cookie decryption with ipv6 | 2 | Cookie decryption with ipv6 |
| 3 | --SKIPIF-- | 3 | --SKIPIF-- |
| 4 | <?php if (!extension_loaded("snuffleupagus")) die "skip"; ?> | 4 | <?php if (!extension_loaded("snuffleupagus")) print "skip"; ?> |
| 5 | --INI-- | 5 | --INI-- |
| 6 | sp.configuration_file={PWD}/config/config_encrypted_regexp_cookies.ini | 6 | sp.configuration_file={PWD}/config/config_encrypted_regexp_cookies.ini |
| 7 | --COOKIE-- | 7 | --COOKIE-- |
diff --git a/src/tests/cookies_encryption/encrypt_regexp_cookies4.phpt b/src/tests/cookies_encryption/encrypt_regexp_cookies4.phpt index 14d737a..09184a8 100644 --- a/src/tests/cookies_encryption/encrypt_regexp_cookies4.phpt +++ b/src/tests/cookies_encryption/encrypt_regexp_cookies4.phpt | |||
| @@ -1,7 +1,7 @@ | |||
| 1 | --TEST-- | 1 | --TEST-- |
| 2 | Cookie encryption in ipv6 | 2 | Cookie encryption in ipv6 |
| 3 | --SKIPIF-- | 3 | --SKIPIF-- |
| 4 | <?php if (!extension_loaded("snuffleupagus")) die "skip"; ?> | 4 | <?php if (!extension_loaded("snuffleupagus")) print "skip"; ?> |
| 5 | --INI-- | 5 | --INI-- |
| 6 | sp.configuration_file={PWD}/config/config_encrypted_cookies.ini | 6 | sp.configuration_file={PWD}/config/config_encrypted_cookies.ini |
| 7 | --COOKIE-- | 7 | --COOKIE-- |
diff --git a/src/tests/cookies_encryption/encrypt_regexp_cookies_empty_env.phpt b/src/tests/cookies_encryption/encrypt_regexp_cookies_empty_env.phpt index 7bd2fcc..53f2eba 100644 --- a/src/tests/cookies_encryption/encrypt_regexp_cookies_empty_env.phpt +++ b/src/tests/cookies_encryption/encrypt_regexp_cookies_empty_env.phpt | |||
| @@ -1,7 +1,7 @@ | |||
| 1 | --TEST-- | 1 | --TEST-- |
| 2 | Cookie encryption - empty environment variable specified | 2 | Cookie encryption - empty environment variable specified |
| 3 | --SKIPIF-- | 3 | --SKIPIF-- |
| 4 | <?php if (!extension_loaded("snuffleupagus")) die "skip"; ?> | 4 | <?php if (!extension_loaded("snuffleupagus")) print "skip"; ?> |
| 5 | --INI-- | 5 | --INI-- |
| 6 | sp.configuration_file={PWD}/config/config_encrypted_regexp_cookies_empty_env.ini | 6 | sp.configuration_file={PWD}/config/config_encrypted_regexp_cookies_empty_env.ini |
| 7 | display_errors=1 | 7 | display_errors=1 |
| @@ -16,4 +16,4 @@ EOF; | |||
| 16 | --FILE-- | 16 | --FILE-- |
| 17 | <?php echo "1\n\n\n\n\n"; ?> | 17 | <?php echo "1\n\n\n\n\n"; ?> |
| 18 | --EXPECT-- | 18 | --EXPECT-- |
| 19 | Fatal error: [snuffleupagus][0.0.0.0][cookie_encryption] Buffer underflow tentative detected in cookie encryption handling in Unknown on line 0 \ No newline at end of file | 19 | Fatal error: [snuffleupagus][0.0.0.0][cookie_encryption][drop] Buffer underflow tentative detected in cookie encryption handling in Unknown on line 0 \ No newline at end of file |
diff --git a/src/tests/cookies_encryption/encrypt_regexp_cookies_invalid_decryption.phpt b/src/tests/cookies_encryption/encrypt_regexp_cookies_invalid_decryption.phpt index a0729d4..b101042 100644 --- a/src/tests/cookies_encryption/encrypt_regexp_cookies_invalid_decryption.phpt +++ b/src/tests/cookies_encryption/encrypt_regexp_cookies_invalid_decryption.phpt | |||
| @@ -1,7 +1,7 @@ | |||
| 1 | --TEST-- | 1 | --TEST-- |
| 2 | Cookie encryption | 2 | Cookie encryption |
| 3 | --SKIPIF-- | 3 | --SKIPIF-- |
| 4 | <?php if (!extension_loaded("snuffleupagus")) die "skip"; ?> | 4 | <?php if (!extension_loaded("snuffleupagus")) print "skip"; ?> |
| 5 | --INI-- | 5 | --INI-- |
| 6 | sp.configuration_file={PWD}/config/config_encrypted_regexp_cookies.ini | 6 | sp.configuration_file={PWD}/config/config_encrypted_regexp_cookies.ini |
| 7 | display_errors=1 | 7 | display_errors=1 |
| @@ -16,7 +16,7 @@ EOF; | |||
| 16 | --FILE-- | 16 | --FILE-- |
| 17 | <?php var_dump($_COOKIE); ?> | 17 | <?php var_dump($_COOKIE); ?> |
| 18 | --EXPECT-- | 18 | --EXPECT-- |
| 19 | Warning: [snuffleupagus][127.0.0.1][cookie_encryption] Something went wrong with the decryption of super_cookie in Unknown on line 0 | 19 | Warning: [snuffleupagus][127.0.0.1][cookie_encryption][log] Something went wrong with the decryption of super_cookie in Unknown on line 0 |
| 20 | array(1) { | 20 | array(1) { |
| 21 | ["awful_cookie"]=> | 21 | ["awful_cookie"]=> |
| 22 | string(18) "awful_cookie_value" | 22 | string(18) "awful_cookie_value" |
diff --git a/src/tests/cookies_encryption/encrypt_regexp_cookies_invalid_decryption2.phpt b/src/tests/cookies_encryption/encrypt_regexp_cookies_invalid_decryption2.phpt index 11288e0..29444dc 100644 --- a/src/tests/cookies_encryption/encrypt_regexp_cookies_invalid_decryption2.phpt +++ b/src/tests/cookies_encryption/encrypt_regexp_cookies_invalid_decryption2.phpt | |||
| @@ -1,7 +1,7 @@ | |||
| 1 | --TEST-- | 1 | --TEST-- |
| 2 | Cookie encryption | 2 | Cookie encryption |
| 3 | --SKIPIF-- | 3 | --SKIPIF-- |
| 4 | <?php if (!extension_loaded("snuffleupagus")) die "skip"; ?> | 4 | <?php if (!extension_loaded("snuffleupagus")) print "skip"; ?> |
| 5 | --INI-- | 5 | --INI-- |
| 6 | sp.configuration_file={PWD}/config/config_encrypted_regexp_cookies.ini | 6 | sp.configuration_file={PWD}/config/config_encrypted_regexp_cookies.ini |
| 7 | display_errors=1 | 7 | display_errors=1 |
| @@ -16,4 +16,4 @@ EOF; | |||
| 16 | --FILE-- | 16 | --FILE-- |
| 17 | <?php var_dump($_COOKIE); ?> | 17 | <?php var_dump($_COOKIE); ?> |
| 18 | --EXPECT-- | 18 | --EXPECT-- |
| 19 | Fatal error: [snuffleupagus][127.0.0.1][cookie_encryption] Buffer underflow tentative detected in cookie encryption handling in Unknown on line 0 \ No newline at end of file | 19 | Fatal error: [snuffleupagus][127.0.0.1][cookie_encryption][drop] Buffer underflow tentative detected in cookie encryption handling in Unknown on line 0 \ No newline at end of file |
diff --git a/src/tests/cookies_encryption/encrypt_regexp_cookies_invalid_decryption3.phpt b/src/tests/cookies_encryption/encrypt_regexp_cookies_invalid_decryption3.phpt index 28ffaad..ea26b00 100644 --- a/src/tests/cookies_encryption/encrypt_regexp_cookies_invalid_decryption3.phpt +++ b/src/tests/cookies_encryption/encrypt_regexp_cookies_invalid_decryption3.phpt | |||
| @@ -1,7 +1,7 @@ | |||
| 1 | --TEST-- | 1 | --TEST-- |
| 2 | Cookie encryption | 2 | Cookie encryption |
| 3 | --SKIPIF-- | 3 | --SKIPIF-- |
| 4 | <?php if (!extension_loaded("snuffleupagus")) die "skip"; ?> | 4 | <?php if (!extension_loaded("snuffleupagus")) print "skip"; ?> |
| 5 | --INI-- | 5 | --INI-- |
| 6 | sp.configuration_file={PWD}/config/config_encrypted_regexp_cookies.ini | 6 | sp.configuration_file={PWD}/config/config_encrypted_regexp_cookies.ini |
| 7 | --COOKIE-- | 7 | --COOKIE-- |
diff --git a/src/tests/cookies_encryption/setcookie.phpt b/src/tests/cookies_encryption/setcookie.phpt index ba1d1c1..4e86984 100644 --- a/src/tests/cookies_encryption/setcookie.phpt +++ b/src/tests/cookies_encryption/setcookie.phpt | |||
| @@ -1,7 +1,8 @@ | |||
| 1 | --TEST-- | 1 | --TEST-- |
| 2 | Set cookies. | 2 | Set cookies. |
| 3 | --SKIPIF-- | 3 | --SKIPIF-- |
| 4 | <?php if (!extension_loaded("snuffleupagus")) die "skip"; ?> | 4 | <?php if (!extension_loaded("snuffleupagus")) print "skip"; ?> |
| 5 | <?php if (PHP_VERSION_ID >= 80000) print "skip"; ?> | ||
| 5 | --INI-- | 6 | --INI-- |
| 6 | sp.configuration_file={PWD}/config/config_encrypted_cookies.ini | 7 | sp.configuration_file={PWD}/config/config_encrypted_cookies.ini |
| 7 | --COOKIE-- | 8 | --COOKIE-- |
diff --git a/src/tests/cookies_encryption_warning/encrypt_cookies_no_env.phpt b/src/tests/cookies_encryption_warning/encrypt_cookies_no_env.phpt index f1ebf2f..015c159 100644 --- a/src/tests/cookies_encryption_warning/encrypt_cookies_no_env.phpt +++ b/src/tests/cookies_encryption_warning/encrypt_cookies_no_env.phpt | |||
| @@ -1,7 +1,7 @@ | |||
| 1 | --TEST-- | 1 | --TEST-- |
| 2 | Cookie encryption - no environment variable specified | 2 | Cookie encryption - no environment variable specified |
| 3 | --SKIPIF-- | 3 | --SKIPIF-- |
| 4 | <?php if (!extension_loaded("snuffleupagus")) die "skip"; ?> | 4 | <?php if (!extension_loaded("snuffleupagus")) print "skip"; ?> |
| 5 | --INI-- | 5 | --INI-- |
| 6 | sp.configuration_file={PWD}/config/encrypt_cookies_no_env.ini | 6 | sp.configuration_file={PWD}/config/encrypt_cookies_no_env.ini |
| 7 | display_errors=1 | 7 | display_errors=1 |
| @@ -16,6 +16,6 @@ EOF; | |||
| 16 | --FILE-- | 16 | --FILE-- |
| 17 | <?php echo "1"; ?> | 17 | <?php echo "1"; ?> |
| 18 | --EXPECT-- | 18 | --EXPECT-- |
| 19 | Fatal error: [snuffleupagus][127.0.0.1][config] Invalid configuration file in Unknown on line 0 | 19 | Fatal error: [snuffleupagus][127.0.0.1][config][log] Invalid configuration file in Unknown on line 0 |
| 20 | 20 | ||
| 21 | Fatal error: [snuffleupagus][127.0.0.1][config] You're trying to use the cookie encryption featureon line 2 without having set the `.cookie_env_var` option in`sp.global`: please set it first in Unknown on line 0 | 21 | Fatal error: [snuffleupagus][127.0.0.1][config][log] You're trying to use the cookie encryption featureon line 2 without having set the `.cookie_env_var` option in`sp.global`: please set it first in Unknown on line 0 |
diff --git a/src/tests/cookies_encryption_warning/encrypt_cookies_no_key.phpt b/src/tests/cookies_encryption_warning/encrypt_cookies_no_key.phpt index d24446b..42f5509 100644 --- a/src/tests/cookies_encryption_warning/encrypt_cookies_no_key.phpt +++ b/src/tests/cookies_encryption_warning/encrypt_cookies_no_key.phpt | |||
| @@ -1,7 +1,7 @@ | |||
| 1 | --TEST-- | 1 | --TEST-- |
| 2 | Cookie encryption - no encryption key specified | 2 | Cookie encryption - no encryption key specified |
| 3 | --SKIPIF-- | 3 | --SKIPIF-- |
| 4 | <?php if (!extension_loaded("snuffleupagus")) die "skip"; ?> | 4 | <?php if (!extension_loaded("snuffleupagus")) print "skip"; ?> |
| 5 | --INI-- | 5 | --INI-- |
| 6 | sp.configuration_file={PWD}/config/encrypt_cookies_no_key.ini | 6 | sp.configuration_file={PWD}/config/encrypt_cookies_no_key.ini |
| 7 | display_errors=1 | 7 | display_errors=1 |
| @@ -16,6 +16,6 @@ EOF; | |||
| 16 | --FILE-- | 16 | --FILE-- |
| 17 | <?php echo "1"; ?> | 17 | <?php echo "1"; ?> |
| 18 | --EXPECT-- | 18 | --EXPECT-- |
| 19 | Fatal error: [snuffleupagus][127.0.0.1][config] Invalid configuration file in Unknown on line 0 | 19 | Fatal error: [snuffleupagus][127.0.0.1][config][log] Invalid configuration file in Unknown on line 0 |
| 20 | 20 | ||
| 21 | Fatal error: [snuffleupagus][127.0.0.1][config] You're trying to use the cookie encryption featureon line 2 without having set the `.encryption_key` option in`sp.global`: please set it first in Unknown on line 0 | 21 | Fatal error: [snuffleupagus][127.0.0.1][config][log] You're trying to use the cookie encryption featureon line 2 without having set the `.encryption_key` option in`sp.global`: please set it first in Unknown on line 0 |
diff --git a/src/tests/cookies_encryption_warning/encrypt_regexp_cookies_no_env.phpt b/src/tests/cookies_encryption_warning/encrypt_regexp_cookies_no_env.phpt index 995ac4f..163cb26 100644 --- a/src/tests/cookies_encryption_warning/encrypt_regexp_cookies_no_env.phpt +++ b/src/tests/cookies_encryption_warning/encrypt_regexp_cookies_no_env.phpt | |||
| @@ -1,7 +1,7 @@ | |||
| 1 | --TEST-- | 1 | --TEST-- |
| 2 | Cookie encryption - no environment variable specified | 2 | Cookie encryption - no environment variable specified |
| 3 | --SKIPIF-- | 3 | --SKIPIF-- |
| 4 | <?php if (!extension_loaded("snuffleupagus")) die "skip"; ?> | 4 | <?php if (!extension_loaded("snuffleupagus")) print "skip"; ?> |
| 5 | --INI-- | 5 | --INI-- |
| 6 | sp.configuration_file={PWD}/config/encrypt_regexp_cookies_no_env.ini | 6 | sp.configuration_file={PWD}/config/encrypt_regexp_cookies_no_env.ini |
| 7 | display_errors=1 | 7 | display_errors=1 |
| @@ -16,6 +16,6 @@ EOF; | |||
| 16 | --FILE-- | 16 | --FILE-- |
| 17 | <?php echo "1"; ?> | 17 | <?php echo "1"; ?> |
| 18 | --EXPECT-- | 18 | --EXPECT-- |
| 19 | Fatal error: [snuffleupagus][127.0.0.1][config] Invalid configuration file in Unknown on line 0 | 19 | Fatal error: [snuffleupagus][127.0.0.1][config][log] Invalid configuration file in Unknown on line 0 |
| 20 | 20 | ||
| 21 | Fatal error: [snuffleupagus][127.0.0.1][config] You're trying to use the cookie encryption featureon line 2 without having set the `.cookie_env_var` option in`sp.global`: please set it first in Unknown on line 0 | 21 | Fatal error: [snuffleupagus][127.0.0.1][config][log] You're trying to use the cookie encryption featureon line 2 without having set the `.cookie_env_var` option in`sp.global`: please set it first in Unknown on line 0 |
diff --git a/src/tests/cookies_encryption_warning/encrypt_regexp_cookies_no_key.phpt b/src/tests/cookies_encryption_warning/encrypt_regexp_cookies_no_key.phpt index ead651d..df31f2e 100644 --- a/src/tests/cookies_encryption_warning/encrypt_regexp_cookies_no_key.phpt +++ b/src/tests/cookies_encryption_warning/encrypt_regexp_cookies_no_key.phpt | |||
| @@ -1,7 +1,7 @@ | |||
| 1 | --TEST-- | 1 | --TEST-- |
| 2 | Cookie encryption - no encryption key specified | 2 | Cookie encryption - no encryption key specified |
| 3 | --SKIPIF-- | 3 | --SKIPIF-- |
| 4 | <?php if (!extension_loaded("snuffleupagus")) die "skip"; ?> | 4 | <?php if (!extension_loaded("snuffleupagus")) print "skip"; ?> |
| 5 | --INI-- | 5 | --INI-- |
| 6 | sp.configuration_file={PWD}/config/encrypt_regexp_cookies_no_key.ini | 6 | sp.configuration_file={PWD}/config/encrypt_regexp_cookies_no_key.ini |
| 7 | display_errors=1 | 7 | display_errors=1 |
| @@ -16,6 +16,6 @@ EOF; | |||
| 16 | --FILE-- | 16 | --FILE-- |
| 17 | <?php echo "1"; ?> | 17 | <?php echo "1"; ?> |
| 18 | --EXPECT-- | 18 | --EXPECT-- |
| 19 | Fatal error: [snuffleupagus][127.0.0.1][config] Invalid configuration file in Unknown on line 0 | 19 | Fatal error: [snuffleupagus][127.0.0.1][config][log] Invalid configuration file in Unknown on line 0 |
| 20 | 20 | ||
| 21 | Fatal error: [snuffleupagus][127.0.0.1][config] You're trying to use the cookie encryption featureon line 2 without having set the `.encryption_key` option in`sp.global`: please set it first in Unknown on line 0 | 21 | Fatal error: [snuffleupagus][127.0.0.1][config][log] You're trying to use the cookie encryption featureon line 2 without having set the `.encryption_key` option in`sp.global`: please set it first in Unknown on line 0 |
diff --git a/src/tests/cookies_php8/config/config_encrypted_cookies.ini b/src/tests/cookies_php8/config/config_encrypted_cookies.ini new file mode 100644 index 0000000..4b50440 --- /dev/null +++ b/src/tests/cookies_php8/config/config_encrypted_cookies.ini | |||
| @@ -0,0 +1,3 @@ | |||
| 1 | sp.global.secret_key("abcdef").cookie_env_var("REMOTE_ADDR"); | ||
| 2 | sp.cookie.name("super_cookie").encrypt(); | ||
| 3 | sp.auto_cookie_secure.enable(); | ||
diff --git a/src/tests/cookies_php8/encrypt_cookies4.phpt b/src/tests/cookies_php8/encrypt_cookies4.phpt new file mode 100644 index 0000000..8b51838 --- /dev/null +++ b/src/tests/cookies_php8/encrypt_cookies4.phpt | |||
| @@ -0,0 +1,31 @@ | |||
| 1 | --TEST-- | ||
| 2 | Cookie encryption in ipv6 | ||
| 3 | --SKIPIF-- | ||
| 4 | <?php if (!extension_loaded("snuffleupagus")) print "skip"; ?> | ||
| 5 | <?php if (PHP_VERSION_ID < 80000) print "skip"; ?> | ||
| 6 | --INI-- | ||
| 7 | sp.configuration_file={PWD}/config/config_encrypted_cookies.ini | ||
| 8 | --COOKIE-- | ||
| 9 | --ENV-- | ||
| 10 | return <<<EOF | ||
| 11 | REMOTE_ADDR=2001:0db8:0000:0000:0000:fe00:0042:8329 | ||
| 12 | HTTP_USER_AGENT=Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Ubuntu Chromium/59.0.3071.109 Chrome/59.0.3071.109 Safari/537.36 | ||
| 13 | HTTPS=1 | ||
| 14 | EOF; | ||
| 15 | --FILE-- | ||
| 16 | <?php | ||
| 17 | setcookie("super_cookie", "super_value"); | ||
| 18 | setcookie("awful_cookie", "awful_value"); | ||
| 19 | setcookie("nice_cookie", "nice_value", 1, "1", "1", true, true); | ||
| 20 | $ret = setcookie("", "Cookie with no name", 1, "1", "1", true, true); | ||
| 21 | if ($ret == TRUE) { | ||
| 22 | echo "fail :/"; | ||
| 23 | } | ||
| 24 | var_dump($_COOKIE); | ||
| 25 | ?> | ||
| 26 | --EXPECTF-- | ||
| 27 | Fatal error: Uncaught ValueError: setcookie(): Argument #1 ($name) cannot be empty in %s/tests/cookies_php8/encrypt_cookies4.php:5 | ||
| 28 | Stack trace: | ||
| 29 | #0 %s/tests/cookies_php8/encrypt_cookies4.php(5): setcookie('', 'Cookie with no ...', 1, '1', '1', true, true) | ||
| 30 | #1 {main} | ||
| 31 | thrown in %s/tests/cookies_php8/encrypt_cookies4.php on line 5 | ||
diff --git a/src/tests/cookies_php8/setcookie.phpt b/src/tests/cookies_php8/setcookie.phpt new file mode 100644 index 0000000..67f1f50 --- /dev/null +++ b/src/tests/cookies_php8/setcookie.phpt | |||
| @@ -0,0 +1,37 @@ | |||
| 1 | --TEST-- | ||
| 2 | Set cookies. | ||
| 3 | --SKIPIF-- | ||
| 4 | <?php if (!extension_loaded("snuffleupagus")) print "skip"; ?> | ||
| 5 | <?php if (PHP_VERSION_ID < 80000) print "skip"; ?> | ||
| 6 | --INI-- | ||
| 7 | sp.configuration_file={PWD}/config/config_encrypted_cookies.ini | ||
| 8 | --COOKIE-- | ||
| 9 | --ENV-- | ||
| 10 | return <<<EOF | ||
| 11 | REMOTE_ADDR=127.0.0.1 | ||
| 12 | HTTP_USER_AGENT=Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Ubuntu Chromium/59.0.3071.109 Chrome/59.0.3071.109 Safari/537.36 | ||
| 13 | HTTPS=1 | ||
| 14 | EOF; | ||
| 15 | --FILE-- | ||
| 16 | <?php | ||
| 17 | setcookie("name"); | ||
| 18 | setcookie("super_cookie"); | ||
| 19 | setcookie("name", "value"); | ||
| 20 | setcookie("name", "value1", 1); | ||
| 21 | setcookie("name", "value2", 0); | ||
| 22 | setcookie("name", "value", 1, "/super/path"); | ||
| 23 | setcookie("name", "value", 1, "/super/path", "super_domain"); | ||
| 24 | setcookie("name", "value", 1, "/super/path", "super_domain1", true); | ||
| 25 | setcookie("name", "value", 1, "/super/path", "super_domain2", false); | ||
| 26 | setcookie("name", "value", 1, "/super/path", "super_domain1", true, true); | ||
| 27 | setcookie("name", "value", 1, "/super/path", "super_domain2", true, false); | ||
| 28 | setcookie("name", "value", 1, "/super/path", "super_domain2", true, false, 1337); | ||
| 29 | setcookie(); | ||
| 30 | echo '1337'; | ||
| 31 | ?> | ||
| 32 | --EXPECTF-- | ||
| 33 | Fatal error: Uncaught ArgumentCountError: setcookie() expects at most 7 arguments, 8 given in %s/tests/cookies_php8/setcookie.php:13 | ||
| 34 | Stack trace: | ||
| 35 | #0 %s/tests/cookies_php8/setcookie.php(13): setcookie('name', 'value', 1, '/super/path', 'super_domain2', true, false, 1337) | ||
| 36 | #1 {main} | ||
| 37 | thrown in %s/tests/cookies_php8/setcookie.php on line 13 | ||
diff --git a/src/tests/deny_writable/deny_writable_execution.phpt b/src/tests/deny_writable/deny_writable_execution.phpt index 43d12c3..e65dc32 100644 --- a/src/tests/deny_writable/deny_writable_execution.phpt +++ b/src/tests/deny_writable/deny_writable_execution.phpt | |||
| @@ -40,4 +40,4 @@ unlink("$dir/non_writable_file.txt"); | |||
| 40 | unlink("$dir/writable_file.txt"); | 40 | unlink("$dir/writable_file.txt"); |
| 41 | ?> | 41 | ?> |
| 42 | --EXPECTF-- | 42 | --EXPECTF-- |
| 43 | Fatal error: [snuffleupagus][0.0.0.0][readonly_exec] Attempted execution of a writable file (%a/deny_writable_execution.php). in %a/deny_writable_execution.php on line 2 | 43 | Fatal error: [snuffleupagus][0.0.0.0][readonly_exec][drop] Attempted execution of a writable file (%a/deny_writable_execution.php). in %a/deny_writable_execution.php on line 2 |
diff --git a/src/tests/deny_writable/deny_writable_execution_simulation.phpt b/src/tests/deny_writable/deny_writable_execution_simulation.phpt index b03bc8f..30f8cb1 100644 --- a/src/tests/deny_writable/deny_writable_execution_simulation.phpt +++ b/src/tests/deny_writable/deny_writable_execution_simulation.phpt | |||
| @@ -1,8 +1,9 @@ | |||
| 1 | --TEST-- | 1 | --TEST-- |
| 2 | Readonly execution attempt (simulation mode) | 2 | Readonly execution attempt (simulation mode) |
| 3 | --SKIPIF-- | 3 | --SKIPIF-- |
| 4 | <?php if (PHP_VERSION_ID >= 80000) print "skip"; ?> | ||
| 4 | <?php | 5 | <?php |
| 5 | if (!extension_loaded("snuffleupagus")) print "skip"; | 6 | if (!extension_loaded("snuffleupagus")) { print "skip" }; |
| 6 | 7 | ||
| 7 | // root has write privileges on any file | 8 | // root has write privileges on any file |
| 8 | if (TRUE == function_exists("posix_getuid")) { | 9 | if (TRUE == function_exists("posix_getuid")) { |
| @@ -17,6 +18,7 @@ if (TRUE == function_exists("posix_getuid")) { | |||
| 17 | ?> | 18 | ?> |
| 18 | --INI-- | 19 | --INI-- |
| 19 | sp.configuration_file={PWD}/config/config_disable_writable_simulation.ini | 20 | sp.configuration_file={PWD}/config/config_disable_writable_simulation.ini |
| 21 | --XFAIL-- | ||
| 20 | --FILE-- | 22 | --FILE-- |
| 21 | <?php | 23 | <?php |
| 22 | $dir = __DIR__; | 24 | $dir = __DIR__; |
| @@ -41,10 +43,10 @@ unlink("$dir/non_writable_file.txt"); | |||
| 41 | unlink("$dir/writable_file.txt"); | 43 | unlink("$dir/writable_file.txt"); |
| 42 | ?> | 44 | ?> |
| 43 | --EXPECTF-- | 45 | --EXPECTF-- |
| 44 | Warning: [snuffleupagus][0.0.0.0][readonly_exec] Attempted execution of a writable file (%a/deny_writable_execution_simulation.php). in %a/deny_writable_execution_simulation.php on line 2 | 46 | Warning: [snuffleupagus][0.0.0.0][readonly_exec][simulation] Attempted execution of a writable file (%a/deny_writable_execution_simulation.php). in %a/deny_writable_execution_simulation.php on line 2 |
| 45 | 47 | ||
| 46 | Warning: [snuffleupagus][0.0.0.0][readonly_exec] Attempted execution of a writable file (%a/writable_file.txt). in %a/deny_writable_execution_simulation.php on line 12 | 48 | Warning: [snuffleupagus][0.0.0.0][readonly_exec][simulation] Attempted execution of a writable file (%a/writable_file.txt). in %a/deny_writable_execution_simulation.php on line 12 |
| 47 | 49 | ||
| 48 | Warning: [snuffleupagus][0.0.0.0][readonly_exec] Attempted execution of a writable file (%a/writable_file.txt). in %a/writable_file.txt on line 1 | 50 | Warning: [snuffleupagus][0.0.0.0][readonly_exec][simulation] Attempted execution of a writable file (%a/writable_file.txt). in %a/writable_file.txt on line 1 |
| 49 | Code execution within a writable file. | 51 | Code execution within a writable file. |
| 50 | Code execution within a non-writable file. | 52 | Code execution within a non-writable file. |
diff --git a/src/tests/disable_function/config/config_disabled_functions_chain_call_skip.ini b/src/tests/disable_function/config/config_disabled_functions_chain_call_skip.ini new file mode 100644 index 0000000..4d2f68d --- /dev/null +++ b/src/tests/disable_function/config/config_disabled_functions_chain_call_skip.ini | |||
| @@ -0,0 +1 @@ | |||
| sp.disable_function.function("a>c").simulation().drop(); | |||
diff --git a/src/tests/disable_function/config/config_disabled_functions_param_array.ini b/src/tests/disable_function/config/config_disabled_functions_param_array.ini index f676d76..2bfa648 100644 --- a/src/tests/disable_function/config/config_disabled_functions_param_array.ini +++ b/src/tests/disable_function/config/config_disabled_functions_param_array.ini | |||
| @@ -4,4 +4,3 @@ sp.disable_function.function("foo").param("arr[test]").alias("3").drop(); | |||
| 4 | sp.disable_function.function("foo").param("arr[test2][foo]").value("aaa").alias("4").drop(); | 4 | sp.disable_function.function("foo").param("arr[test2][foo]").value("aaa").alias("4").drop(); |
| 5 | sp.disable_function.function("foo").param("arr[test2][bar]").key("lol").alias("5").drop(); | 5 | sp.disable_function.function("foo").param("arr[test2][bar]").key("lol").alias("5").drop(); |
| 6 | sp.disable_function.function("foo").param("arr[test2][bar]").key("123").alias("6").drop(); | 6 | sp.disable_function.function("foo").param("arr[test2][bar]").key("123").alias("6").drop(); |
| 7 | sp.disable_function.function("foo").param("qwe[a]").value("abcd").alias("7").drop(); | ||
diff --git a/src/tests/disable_function/disabled_function_echo.phpt b/src/tests/disable_function/disabled_function_echo.phpt index 5dbfe43..12aaff4 100644 --- a/src/tests/disable_function/disabled_function_echo.phpt +++ b/src/tests/disable_function/disabled_function_echo.phpt | |||
| @@ -1,7 +1,7 @@ | |||
| 1 | --TEST-- | 1 | --TEST-- |
| 2 | Echo hooking | 2 | Echo hooking |
| 3 | --SKIPIF-- | 3 | --SKIPIF-- |
| 4 | <?php if (!extension_loaded("snuffleupagus")) die "skip"; ?> | 4 | <?php if (!extension_loaded("snuffleupagus")) print "skip"; ?> |
| 5 | --INI-- | 5 | --INI-- |
| 6 | sp.configuration_file={PWD}/config/disabled_function_echo.ini | 6 | sp.configuration_file={PWD}/config/disabled_function_echo.ini |
| 7 | --FILE-- | 7 | --FILE-- |
| @@ -16,4 +16,4 @@ test("oops"); | |||
| 16 | --CLEAN-- | 16 | --CLEAN-- |
| 17 | --EXPECTF-- | 17 | --EXPECTF-- |
| 18 | qwerty | 18 | qwerty |
| 19 | Fatal error: [snuffleupagus][0.0.0.0][disabled_function] Aborted execution on call of the function 'echo' in %a/disabled_function_echo.php on line 3 \ No newline at end of file | 19 | Fatal error: [snuffleupagus][0.0.0.0][disabled_function][drop] Aborted execution on call of the function 'echo' in %a/disabled_function_echo.php on line 3 |
diff --git a/src/tests/disable_function/disabled_function_echo_2.phpt b/src/tests/disable_function/disabled_function_echo_2.phpt index c317cf7..82a2fa1 100644 --- a/src/tests/disable_function/disabled_function_echo_2.phpt +++ b/src/tests/disable_function/disabled_function_echo_2.phpt | |||
| @@ -1,7 +1,7 @@ | |||
| 1 | --TEST-- | 1 | --TEST-- |
| 2 | Echo hooking | 2 | Echo hooking |
| 3 | --SKIPIF-- | 3 | --SKIPIF-- |
| 4 | <?php if (!extension_loaded("snuffleupagus")) die "skip"; ?> | 4 | <?php if (!extension_loaded("snuffleupagus")) print "skip"; ?> |
| 5 | --INI-- | 5 | --INI-- |
| 6 | sp.configuration_file={PWD}/config/disabled_function_echo.ini | 6 | sp.configuration_file={PWD}/config/disabled_function_echo.ini |
| 7 | --FILE-- | 7 | --FILE-- |
| @@ -12,4 +12,4 @@ echo "1", "oops"; | |||
| 12 | --CLEAN-- | 12 | --CLEAN-- |
| 13 | --EXPECTF-- | 13 | --EXPECTF-- |
| 14 | qwe1 | 14 | qwe1 |
| 15 | Fatal error: [snuffleupagus][0.0.0.0][disabled_function] Aborted execution on call of the function 'echo' in %a/disabled_function_echo_2.php on line 3 \ No newline at end of file | 15 | Fatal error: [snuffleupagus][0.0.0.0][disabled_function][drop] Aborted execution on call of the function 'echo' in %a/disabled_function_echo_2.php on line 3 |
diff --git a/src/tests/disable_function/disabled_function_echo_local_var.phpt b/src/tests/disable_function/disabled_function_echo_local_var.phpt index 3bbb2a0..ee1be1f 100644 --- a/src/tests/disable_function/disabled_function_echo_local_var.phpt +++ b/src/tests/disable_function/disabled_function_echo_local_var.phpt | |||
| @@ -1,7 +1,7 @@ | |||
| 1 | --TEST-- | 1 | --TEST-- |
| 2 | Echo hooking | 2 | Echo hooking |
| 3 | --SKIPIF-- | 3 | --SKIPIF-- |
| 4 | <?php if (!extension_loaded("snuffleupagus")) die "skip"; ?> | 4 | <?php if (!extension_loaded("snuffleupagus")) print "skip"; ?> |
| 5 | --INI-- | 5 | --INI-- |
| 6 | sp.configuration_file={PWD}/config/disabled_function_echo.ini | 6 | sp.configuration_file={PWD}/config/disabled_function_echo.ini |
| 7 | --FILE-- | 7 | --FILE-- |
| @@ -18,4 +18,4 @@ test(); | |||
| 18 | --EXPECTF-- | 18 | --EXPECTF-- |
| 19 | 3 | 19 | 3 |
| 20 | 20 | ||
| 21 | Fatal error: [snuffleupagus][0.0.0.0][disabled_function] Aborted execution on call of the function 'echo' in %a/disabled_function_echo_local_var.php on line 3 \ No newline at end of file | 21 | Fatal error: [snuffleupagus][0.0.0.0][disabled_function][drop] Aborted execution on call of the function 'echo' in %a/disabled_function_echo_local_var.php on line 3 |
diff --git a/src/tests/disable_function/disabled_function_ensure_client_valid_certs.phpt b/src/tests/disable_function/disabled_function_ensure_client_valid_certs.phpt index dc53593..9872374 100644 --- a/src/tests/disable_function/disabled_function_ensure_client_valid_certs.phpt +++ b/src/tests/disable_function/disabled_function_ensure_client_valid_certs.phpt | |||
| @@ -2,8 +2,8 @@ | |||
| 2 | Disable functions - Ensure that client certificates validation can't be disabled | 2 | Disable functions - Ensure that client certificates validation can't be disabled |
| 3 | --SKIPIF-- | 3 | --SKIPIF-- |
| 4 | <?php | 4 | <?php |
| 5 | if (!extension_loaded("snuffleupagus")) { die("skip"); } | 5 | if (!extension_loaded("snuffleupagus")) { print("skip"); } |
| 6 | if (!extension_loaded("curl")) { die("skip"); } | 6 | if (!extension_loaded("curl")) { print("skip"); } |
| 7 | ?> | 7 | ?> |
| 8 | --EXTENSIONS-- | 8 | --EXTENSIONS-- |
| 9 | curl | 9 | curl |
| @@ -17,4 +17,4 @@ curl_setopt($ch, CURLOPT_SSL_VERIFYPEER, '0'); | |||
| 17 | echo "1337"; | 17 | echo "1337"; |
| 18 | ?> | 18 | ?> |
| 19 | --EXPECTF-- | 19 | --EXPECTF-- |
| 20 | Fatal error: [snuffleupagus][0.0.0.0][disabled_function] Aborted execution on call of the function 'curl_setopt', because its argument '$option' content (64) matched the rule 'Please don't turn CURLOPT_SSL_VERIFYPEER off.' in %s/disabled_function_ensure_client_valid_certs.php on line %d | 20 | Fatal error: [snuffleupagus][0.0.0.0][disabled_function][drop] Aborted execution on call of the function 'curl_setopt', because its argument '$option' content (64) matched the rule 'Please don't turn CURLOPT_SSL_VERIFYPEER off.' in %s/disabled_function_ensure_client_valid_certs.php on line %d |
diff --git a/src/tests/disable_function/disabled_function_ensure_client_valid_certs_curl_multi_setopt.phpt b/src/tests/disable_function/disabled_function_ensure_client_valid_certs_curl_multi_setopt.phpt index 9ff37ec..45ae95e 100644 --- a/src/tests/disable_function/disabled_function_ensure_client_valid_certs_curl_multi_setopt.phpt +++ b/src/tests/disable_function/disabled_function_ensure_client_valid_certs_curl_multi_setopt.phpt | |||
| @@ -2,8 +2,8 @@ | |||
| 2 | Disable functions - Ensure that client certificates validation can't be disabled via `curl_multi_setopt` | 2 | Disable functions - Ensure that client certificates validation can't be disabled via `curl_multi_setopt` |
| 3 | --SKIPIF-- | 3 | --SKIPIF-- |
| 4 | <?php | 4 | <?php |
| 5 | if (!extension_loaded("snuffleupagus")) { die("skip"); } | 5 | if (!extension_loaded("snuffleupagus")) { print("skip"); } |
| 6 | if (!extension_loaded("curl")) { die("skip"); } | 6 | if (!extension_loaded("curl")) { print("skip"); } |
| 7 | ?> | 7 | ?> |
| 8 | --EXTENSIONS-- | 8 | --EXTENSIONS-- |
| 9 | curl | 9 | curl |
| @@ -16,4 +16,4 @@ curl_multi_setopt($mch, CURLOPT_SSL_VERIFYPEER, 0); | |||
| 16 | echo "1337"; | 16 | echo "1337"; |
| 17 | ?> | 17 | ?> |
| 18 | --EXPECTF-- | 18 | --EXPECTF-- |
| 19 | Fatal error: [snuffleupagus][0.0.0.0][disabled_function] Aborted execution on call of the function 'curl_multi_setopt', because its argument '$option' content (64) matched the rule 'Please don't turn CURLOPT_SSL_VERIFYPEER off.' in %s/disabled_function_ensure_client_valid_certs_curl_multi_setopt.php on line %d | 19 | Fatal error: [snuffleupagus][0.0.0.0][disabled_function][drop] Aborted execution on call of the function 'curl_multi_setopt', because its argument '$option' content (64) matched the rule 'Please don't turn CURLOPT_SSL_VERIFYPEER off.' in %s/disabled_function_ensure_client_valid_certs_curl_multi_setopt.php on line %d |
diff --git a/src/tests/disable_function/disabled_function_ensure_client_valid_certs_curl_setopt_array.phpt b/src/tests/disable_function/disabled_function_ensure_client_valid_certs_curl_setopt_array.phpt index 246fee6..93ed020 100644 --- a/src/tests/disable_function/disabled_function_ensure_client_valid_certs_curl_setopt_array.phpt +++ b/src/tests/disable_function/disabled_function_ensure_client_valid_certs_curl_setopt_array.phpt | |||
| @@ -2,8 +2,8 @@ | |||
| 2 | Disable functions - Ensure that client certificates validation can't be disabled via `curl_setopt_array` | 2 | Disable functions - Ensure that client certificates validation can't be disabled via `curl_setopt_array` |
| 3 | --SKIPIF-- | 3 | --SKIPIF-- |
| 4 | <?php | 4 | <?php |
| 5 | if (!extension_loaded("snuffleupagus")) { die("skip"); } | 5 | if (!extension_loaded("snuffleupagus")) { print("skip"); } |
| 6 | if (!extension_loaded("curl")) { die("skip"); } | 6 | if (!extension_loaded("curl")) { print("skip"); } |
| 7 | ?> | 7 | ?> |
| 8 | --EXTENSIONS-- | 8 | --EXTENSIONS-- |
| 9 | curl | 9 | curl |
| @@ -18,4 +18,4 @@ curl_setopt_array($ch, $options); | |||
| 18 | echo "1337"; | 18 | echo "1337"; |
| 19 | ?> | 19 | ?> |
| 20 | --EXPECTF-- | 20 | --EXPECTF-- |
| 21 | Fatal error: [snuffleupagus][0.0.0.0][disabled_function] Aborted execution on call of the function 'curl_setopt_array', because its argument '$options' content (0) matched the rule 'Please don't turn CURLOPT_SSL_VERIFYPEER off.' in %s/disabled_function_ensure_client_valid_certs_curl_setopt_array.php on line 5 | 21 | Fatal error: [snuffleupagus][0.0.0.0][disabled_function][drop] Aborted execution on call of the function 'curl_setopt_array', because its argument '$options' content (0) matched the rule 'Please don't turn CURLOPT_SSL_VERIFYPEER off.' in %s/disabled_function_ensure_client_valid_certs_curl_setopt_array.php on line 5 |
diff --git a/src/tests/disable_function/disabled_function_ensure_server_valid_certs.phpt b/src/tests/disable_function/disabled_function_ensure_server_valid_certs.phpt index fa583b0..6e027de 100644 --- a/src/tests/disable_function/disabled_function_ensure_server_valid_certs.phpt +++ b/src/tests/disable_function/disabled_function_ensure_server_valid_certs.phpt | |||
| @@ -2,8 +2,8 @@ | |||
| 2 | Disable functions - Ensure that server certificates validation can't be disabled | 2 | Disable functions - Ensure that server certificates validation can't be disabled |
| 3 | --SKIPIF-- | 3 | --SKIPIF-- |
| 4 | <?php | 4 | <?php |
| 5 | if (!extension_loaded("snuffleupagus")) { die("skip"); } | 5 | if (!extension_loaded("snuffleupagus")) { print("skip"); } |
| 6 | if (!extension_loaded("curl")) { die("skip"); } | 6 | if (!extension_loaded("curl")) { print("skip"); } |
| 7 | ?> | 7 | ?> |
| 8 | --EXTENSIONS-- | 8 | --EXTENSIONS-- |
| 9 | curl | 9 | curl |
| @@ -17,4 +17,4 @@ curl_setopt($ch, CURLOPT_SSL_VERIFYHOST, '0'); | |||
| 17 | echo "1337"; | 17 | echo "1337"; |
| 18 | ?> | 18 | ?> |
| 19 | --EXPECTF-- | 19 | --EXPECTF-- |
| 20 | Fatal error: [snuffleupagus][0.0.0.0][disabled_function] Aborted execution on call of the function 'curl_setopt', because its argument '$option' content (81) matched the rule 'Please don't turn CURLOPT_SSL_VERIFYHOST off.' in %s/disabled_function_ensure_server_valid_certs.php on line %d | 20 | Fatal error: [snuffleupagus][0.0.0.0][disabled_function][drop] Aborted execution on call of the function 'curl_setopt', because its argument '$option' content (81) matched the rule 'Please don't turn CURLOPT_SSL_VERIFYHOST off.' in %s/disabled_function_ensure_server_valid_certs.php on line %d |
diff --git a/src/tests/disable_function/disabled_function_ensure_server_valid_certs_curl_multi_setopt.phpt b/src/tests/disable_function/disabled_function_ensure_server_valid_certs_curl_multi_setopt.phpt index 3b374ee..32013b5 100644 --- a/src/tests/disable_function/disabled_function_ensure_server_valid_certs_curl_multi_setopt.phpt +++ b/src/tests/disable_function/disabled_function_ensure_server_valid_certs_curl_multi_setopt.phpt | |||
| @@ -2,8 +2,8 @@ | |||
| 2 | Disable functions - Ensure that server certificates validation can't be disabled via `curl_multi_setopt` | 2 | Disable functions - Ensure that server certificates validation can't be disabled via `curl_multi_setopt` |
| 3 | --SKIPIF-- | 3 | --SKIPIF-- |
| 4 | <?php | 4 | <?php |
| 5 | if (!extension_loaded("snuffleupagus")) { die("skip"); } | 5 | if (!extension_loaded("snuffleupagus")) { print("skip"); } |
| 6 | if (!extension_loaded("curl")) { die("skip"); } | 6 | if (!extension_loaded("curl")) { print("skip"); } |
| 7 | ?> | 7 | ?> |
| 8 | --EXTENSIONS-- | 8 | --EXTENSIONS-- |
| 9 | curl | 9 | curl |
| @@ -16,4 +16,4 @@ curl_multi_setopt($mch, CURLOPT_SSL_VERIFYHOST, 0); | |||
| 16 | echo "1337"; | 16 | echo "1337"; |
| 17 | ?> | 17 | ?> |
| 18 | --EXPECTF-- | 18 | --EXPECTF-- |
| 19 | Fatal error: [snuffleupagus][0.0.0.0][disabled_function] Aborted execution on call of the function 'curl_multi_setopt', because its argument '$option' content (81) matched the rule 'Please don't turn CURLOPT_SSL_VERIFYHOST off.' in %s/disabled_function_ensure_server_valid_certs_curl_multi_setopt.php on line %d | 19 | Fatal error: [snuffleupagus][0.0.0.0][disabled_function][drop] Aborted execution on call of the function 'curl_multi_setopt', because its argument '$option' content (81) matched the rule 'Please don't turn CURLOPT_SSL_VERIFYHOST off.' in %s/disabled_function_ensure_server_valid_certs_curl_multi_setopt.php on line %d |
diff --git a/src/tests/disable_function/disabled_function_ensure_server_valid_certs_curl_setopt_array.phpt b/src/tests/disable_function/disabled_function_ensure_server_valid_certs_curl_setopt_array.phpt index 97accce..ec0528a 100644 --- a/src/tests/disable_function/disabled_function_ensure_server_valid_certs_curl_setopt_array.phpt +++ b/src/tests/disable_function/disabled_function_ensure_server_valid_certs_curl_setopt_array.phpt | |||
| @@ -18,4 +18,4 @@ curl_setopt_array($ch, $options); | |||
| 18 | echo "1337"; | 18 | echo "1337"; |
| 19 | ?> | 19 | ?> |
| 20 | --EXPECTF-- | 20 | --EXPECTF-- |
| 21 | Fatal error: [snuffleupagus][0.0.0.0][disabled_function] Aborted execution on call of the function 'curl_setopt_array', because its argument '$options' content (0) matched the rule 'Please don't turn CURLOPT_SSL_VERIFYHOST off.' in %s/disabled_function_ensure_server_valid_certs_curl_setopt_array.php on line 5 | 21 | Fatal error: [snuffleupagus][0.0.0.0][disabled_function][drop] Aborted execution on call of the function 'curl_setopt_array', because its argument '$options' content (0) matched the rule 'Please don't turn CURLOPT_SSL_VERIFYHOST off.' in %s/disabled_function_ensure_server_valid_certs_curl_setopt_array.php on line 5 |
diff --git a/src/tests/disable_function/disabled_function_local_var.phpt b/src/tests/disable_function/disabled_function_local_var.phpt index 1323cc9..c28fd8c 100644 --- a/src/tests/disable_function/disabled_function_local_var.phpt +++ b/src/tests/disable_function/disabled_function_local_var.phpt | |||
| @@ -1,7 +1,7 @@ | |||
| 1 | --TEST-- | 1 | --TEST-- |
| 2 | Disable functions - match on a local variable | 2 | Disable functions - match on a local variable |
| 3 | --SKIPIF-- | 3 | --SKIPIF-- |
| 4 | <?php if (!extension_loaded("snuffleupagus")) die "skip"; ?> | 4 | <?php if (!extension_loaded("snuffleupagus")) print "skip"; ?> |
| 5 | --INI-- | 5 | --INI-- |
| 6 | sp.configuration_file={PWD}/config/disabled_function_local_var.ini | 6 | sp.configuration_file={PWD}/config/disabled_function_local_var.ini |
| 7 | --FILE-- | 7 | --FILE-- |
| @@ -22,4 +22,4 @@ Value of a: 1338 | |||
| 22 | ID | 22 | ID |
| 23 | Value of a: 1337 | 23 | Value of a: 1337 |
| 24 | 24 | ||
| 25 | Fatal error: [snuffleupagus][0.0.0.0][disabled_function] Aborted execution on call of the function 'strtoupper' in %a/disabled_function_local_var.php on line 4 | 25 | Fatal error: [snuffleupagus][0.0.0.0][disabled_function][drop] Aborted execution on call of the function 'strtoupper' in %a/disabled_function_local_var.php on line 4 |
diff --git a/src/tests/disable_function/disabled_function_local_var_10.phpt b/src/tests/disable_function/disabled_function_local_var_10.phpt index a3110ac..2d5478d 100644 --- a/src/tests/disable_function/disabled_function_local_var_10.phpt +++ b/src/tests/disable_function/disabled_function_local_var_10.phpt | |||
| @@ -1,7 +1,7 @@ | |||
| 1 | --TEST-- | 1 | --TEST-- |
| 2 | Disable functions - match on a local variable | 2 | Disable functions - match on a local variable |
| 3 | --SKIPIF-- | 3 | --SKIPIF-- |
| 4 | <?php if (!extension_loaded("snuffleupagus")) die "skip"; ?> | 4 | <?php if (!extension_loaded("snuffleupagus")) print "skip"; ?> |
| 5 | --INI-- | 5 | --INI-- |
| 6 | sp.configuration_file={PWD}/config/disabled_function_local_var.ini | 6 | sp.configuration_file={PWD}/config/disabled_function_local_var.ini |
| 7 | --FILE-- | 7 | --FILE-- |
| @@ -42,4 +42,4 @@ array(2) { | |||
| 42 | } | 42 | } |
| 43 | } | 43 | } |
| 44 | 44 | ||
| 45 | Fatal error: [snuffleupagus][0.0.0.0][disabled_function] Aborted execution on call of the function 'strtoupper' in %a/disabled_function_local_var_10.php on line 7 \ No newline at end of file | 45 | Fatal error: [snuffleupagus][0.0.0.0][disabled_function][drop] Aborted execution on call of the function 'strtoupper' in %a/disabled_function_local_var_10.php on line 7 |
diff --git a/src/tests/disable_function/disabled_function_local_var_2.phpt b/src/tests/disable_function/disabled_function_local_var_2.phpt index d672010..076c3c5 100644 --- a/src/tests/disable_function/disabled_function_local_var_2.phpt +++ b/src/tests/disable_function/disabled_function_local_var_2.phpt | |||
| @@ -1,7 +1,7 @@ | |||
| 1 | --TEST-- | 1 | --TEST-- |
| 2 | Disable functions - match on a local variable | 2 | Disable functions - match on a local variable |
| 3 | --SKIPIF-- | 3 | --SKIPIF-- |
| 4 | <?php if (!extension_loaded("snuffleupagus")) die "skip"; ?> | 4 | <?php if (!extension_loaded("snuffleupagus")) print "skip"; ?> |
| 5 | --INI-- | 5 | --INI-- |
| 6 | sp.configuration_file={PWD}/config/disabled_function_local_var.ini | 6 | sp.configuration_file={PWD}/config/disabled_function_local_var.ini |
| 7 | --FILE-- | 7 | --FILE-- |
| @@ -44,4 +44,4 @@ array(2) { | |||
| 44 | string(5) "block" | 44 | string(5) "block" |
| 45 | } | 45 | } |
| 46 | 46 | ||
| 47 | Fatal error: [snuffleupagus][0.0.0.0][disabled_function] Aborted execution on call of the function 'strtoupper' in %a/disabled_function_local_var_2.php on line 4 | 47 | Fatal error: [snuffleupagus][0.0.0.0][disabled_function][drop] Aborted execution on call of the function 'strtoupper' in %a/disabled_function_local_var_2.php on line 4 |
diff --git a/src/tests/disable_function/disabled_function_local_var_3.phpt b/src/tests/disable_function/disabled_function_local_var_3.phpt index 66c5d69..f404682 100644 --- a/src/tests/disable_function/disabled_function_local_var_3.phpt +++ b/src/tests/disable_function/disabled_function_local_var_3.phpt | |||
| @@ -1,7 +1,7 @@ | |||
| 1 | --TEST-- | 1 | --TEST-- |
| 2 | Disable functions - match on a local variable | 2 | Disable functions - match on a local variable |
| 3 | --SKIPIF-- | 3 | --SKIPIF-- |
| 4 | <?php if (!extension_loaded("snuffleupagus")) die "skip"; ?> | 4 | <?php if (!extension_loaded("snuffleupagus")) print "skip"; ?> |
| 5 | --INI-- | 5 | --INI-- |
| 6 | sp.configuration_file={PWD}/config/disabled_function_local_var.ini | 6 | sp.configuration_file={PWD}/config/disabled_function_local_var.ini |
| 7 | --FILE-- | 7 | --FILE-- |
| @@ -43,4 +43,4 @@ array(2) { | |||
| 43 | } | 43 | } |
| 44 | } | 44 | } |
| 45 | 45 | ||
| 46 | Fatal error: [snuffleupagus][0.0.0.0][disabled_function] Aborted execution on call of the function 'strtoupper' in %a/disabled_function_local_var_3.php on line 3 | 46 | Fatal error: [snuffleupagus][0.0.0.0][disabled_function][drop] Aborted execution on call of the function 'strtoupper' in %a/disabled_function_local_var_3.php on line 3 |
diff --git a/src/tests/disable_function/disabled_function_local_var_4.phpt b/src/tests/disable_function/disabled_function_local_var_4.phpt index fceee23..ec44c3f 100644 --- a/src/tests/disable_function/disabled_function_local_var_4.phpt +++ b/src/tests/disable_function/disabled_function_local_var_4.phpt | |||
| @@ -1,7 +1,7 @@ | |||
| 1 | --TEST-- | 1 | --TEST-- |
| 2 | Disable functions - match on a local variable | 2 | Disable functions - match on a local variable |
| 3 | --SKIPIF-- | 3 | --SKIPIF-- |
| 4 | <?php if (!extension_loaded("snuffleupagus")) die "skip"; ?> | 4 | <?php if (!extension_loaded("snuffleupagus")) print "skip"; ?> |
| 5 | --INI-- | 5 | --INI-- |
| 6 | sp.configuration_file={PWD}/config/disabled_function_local_var_2.ini | 6 | sp.configuration_file={PWD}/config/disabled_function_local_var_2.ini |
| 7 | --FILE-- | 7 | --FILE-- |
| @@ -54,4 +54,4 @@ test(); | |||
| 54 | Valeur: valeur de a | 54 | Valeur: valeur de a |
| 55 | Valeur: valeur de apres | 55 | Valeur: valeur de apres |
| 56 | 56 | ||
| 57 | Fatal error: [snuffleupagus][0.0.0.0][disabled_function] Aborted execution on call of the function 'strtoupper' in %a/disabled_function_local_var_4.php on line 36 \ No newline at end of file | 57 | Fatal error: [snuffleupagus][0.0.0.0][disabled_function][drop] Aborted execution on call of the function 'strtoupper' in %a/disabled_function_local_var_4.php on line 36 |
diff --git a/src/tests/disable_function/disabled_function_local_var_5.phpt b/src/tests/disable_function/disabled_function_local_var_5.phpt index e95ff19..7e592cd 100644 --- a/src/tests/disable_function/disabled_function_local_var_5.phpt +++ b/src/tests/disable_function/disabled_function_local_var_5.phpt | |||
| @@ -1,7 +1,7 @@ | |||
| 1 | --TEST-- | 1 | --TEST-- |
| 2 | Disable functions - match on a local variable | 2 | Disable functions - match on a local variable |
| 3 | --SKIPIF-- | 3 | --SKIPIF-- |
| 4 | <?php if (!extension_loaded("snuffleupagus")) die "skip"; ?> | 4 | <?php if (!extension_loaded("snuffleupagus")) print "skip"; ?> |
| 5 | --INI-- | 5 | --INI-- |
| 6 | sp.configuration_file={PWD}/config/disabled_function_local_var.ini | 6 | sp.configuration_file={PWD}/config/disabled_function_local_var.ini |
| 7 | --FILE-- | 7 | --FILE-- |
| @@ -31,4 +31,4 @@ object(stdClass)#1 (1) { | |||
| 31 | string(16) "not a good value" | 31 | string(16) "not a good value" |
| 32 | } | 32 | } |
| 33 | 33 | ||
| 34 | Fatal error: [snuffleupagus][0.0.0.0][disabled_function] Aborted execution on call of the function 'strtoupper' in %a/disabled_function_local_var_5.php on line 3 | 34 | Fatal error: [snuffleupagus][0.0.0.0][disabled_function][drop] Aborted execution on call of the function 'strtoupper' in %a/disabled_function_local_var_5.php on line 3 |
diff --git a/src/tests/disable_function/disabled_function_local_var_6.phpt b/src/tests/disable_function/disabled_function_local_var_6.phpt index cd2eb61..a4d9ae9 100644 --- a/src/tests/disable_function/disabled_function_local_var_6.phpt +++ b/src/tests/disable_function/disabled_function_local_var_6.phpt | |||
| @@ -1,7 +1,7 @@ | |||
| 1 | --TEST-- | 1 | --TEST-- |
| 2 | Disable functions - match on a local variable | 2 | Disable functions - match on a local variable |
| 3 | --SKIPIF-- | 3 | --SKIPIF-- |
| 4 | <?php if (!extension_loaded("snuffleupagus")) die "skip"; ?> | 4 | <?php if (!extension_loaded("snuffleupagus")) print "skip"; ?> |
| 5 | --INI-- | 5 | --INI-- |
| 6 | sp.configuration_file={PWD}/config/disabled_function_local_var.ini | 6 | sp.configuration_file={PWD}/config/disabled_function_local_var.ini |
| 7 | --FILE-- | 7 | --FILE-- |
| @@ -29,4 +29,4 @@ class test_object { | |||
| 29 | --EXPECTF-- | 29 | --EXPECTF-- |
| 30 | Valeur: no good | 30 | Valeur: no good |
| 31 | 31 | ||
| 32 | Fatal error: [snuffleupagus][0.0.0.0][disabled_function] Aborted execution on call of the function 'strtoupper' in %a/disabled_function_local_var_6.php on line 4 \ No newline at end of file | 32 | Fatal error: [snuffleupagus][0.0.0.0][disabled_function][drop] Aborted execution on call of the function 'strtoupper' in %a/disabled_function_local_var_6.php on line 4 |
diff --git a/src/tests/disable_function/disabled_function_local_var_7.phpt b/src/tests/disable_function/disabled_function_local_var_7.phpt index d219780..f6d4dc6 100644 --- a/src/tests/disable_function/disabled_function_local_var_7.phpt +++ b/src/tests/disable_function/disabled_function_local_var_7.phpt | |||
| @@ -1,7 +1,7 @@ | |||
| 1 | --TEST-- | 1 | --TEST-- |
| 2 | Disable functions - match on a local variable | 2 | Disable functions - match on a local variable |
| 3 | --SKIPIF-- | 3 | --SKIPIF-- |
| 4 | <?php if (!extension_loaded("snuffleupagus")) die "skip"; ?> | 4 | <?php if (!extension_loaded("snuffleupagus")) print "skip"; ?> |
| 5 | --INI-- | 5 | --INI-- |
| 6 | sp.configuration_file={PWD}/config/disabled_function_local_var.ini | 6 | sp.configuration_file={PWD}/config/disabled_function_local_var.ini |
| 7 | --FILE-- | 7 | --FILE-- |
| @@ -29,4 +29,4 @@ class test_object { | |||
| 29 | --EXPECTF-- | 29 | --EXPECTF-- |
| 30 | Valeur: qwerty | 30 | Valeur: qwerty |
| 31 | 31 | ||
| 32 | Fatal error: [snuffleupagus][0.0.0.0][disabled_function] Aborted execution on call of the function 'strtoupper' in %a/disabled_function_local_var_7.php on line 4 \ No newline at end of file | 32 | Fatal error: [snuffleupagus][0.0.0.0][disabled_function][drop] Aborted execution on call of the function 'strtoupper' in %a/disabled_function_local_var_7.php on line 4 |
diff --git a/src/tests/disable_function/disabled_function_local_var_8.phpt b/src/tests/disable_function/disabled_function_local_var_8.phpt index 8b64534..1279269 100644 --- a/src/tests/disable_function/disabled_function_local_var_8.phpt +++ b/src/tests/disable_function/disabled_function_local_var_8.phpt | |||
| @@ -1,7 +1,7 @@ | |||
| 1 | --TEST-- | 1 | --TEST-- |
| 2 | Disable functions - match on a local variable | 2 | Disable functions - match on a local variable |
| 3 | --SKIPIF-- | 3 | --SKIPIF-- |
| 4 | <?php if (!extension_loaded("snuffleupagus")) die "skip"; ?> | 4 | <?php if (!extension_loaded("snuffleupagus")) print "skip"; ?> |
| 5 | --INI-- | 5 | --INI-- |
| 6 | sp.configuration_file={PWD}/config/disabled_function_local_var.ini | 6 | sp.configuration_file={PWD}/config/disabled_function_local_var.ini |
| 7 | --FILE-- | 7 | --FILE-- |
| @@ -18,4 +18,4 @@ namespace asd { | |||
| 18 | --EXPECTF-- | 18 | --EXPECTF-- |
| 19 | Valeur: qwerty | 19 | Valeur: qwerty |
| 20 | 20 | ||
| 21 | Fatal error: [snuffleupagus][0.0.0.0][disabled_function] Aborted execution on call of the function 'strtoupper' in %a/disabled_function_local_var_8.php on line 8 \ No newline at end of file | 21 | Fatal error: [snuffleupagus][0.0.0.0][disabled_function][drop] Aborted execution on call of the function 'strtoupper' in %a/disabled_function_local_var_8.php on line 8 |
diff --git a/src/tests/disable_function/disabled_function_local_var_9.phpt b/src/tests/disable_function/disabled_function_local_var_9.phpt index cc37a78..7e56a67 100644 --- a/src/tests/disable_function/disabled_function_local_var_9.phpt +++ b/src/tests/disable_function/disabled_function_local_var_9.phpt | |||
| @@ -1,7 +1,7 @@ | |||
| 1 | --TEST-- | 1 | --TEST-- |
| 2 | Disable functions - match on a local variable | 2 | Disable functions - match on a local variable |
| 3 | --SKIPIF-- | 3 | --SKIPIF-- |
| 4 | <?php if (!extension_loaded("snuffleupagus")) die "skip"; ?> | 4 | <?php if (!extension_loaded("snuffleupagus")) print "skip"; ?> |
| 5 | --INI-- | 5 | --INI-- |
| 6 | sp.configuration_file={PWD}/config/disabled_function_local_var.ini | 6 | sp.configuration_file={PWD}/config/disabled_function_local_var.ini |
| 7 | --FILE-- | 7 | --FILE-- |
| @@ -18,4 +18,4 @@ namespace asd { | |||
| 18 | --EXPECTF-- | 18 | --EXPECTF-- |
| 19 | Valeur: asdfgh | 19 | Valeur: asdfgh |
| 20 | 20 | ||
| 21 | Fatal error: [snuffleupagus][0.0.0.0][disabled_function] Aborted execution on call of the function 'strtoupper' in %a/disabled_function_local_var_9.php on line 8 \ No newline at end of file | 21 | Fatal error: [snuffleupagus][0.0.0.0][disabled_function][drop] Aborted execution on call of the function 'strtoupper' in %a/disabled_function_local_var_9.php on line 8 |
diff --git a/src/tests/disable_function/disabled_function_local_var_const.phpt b/src/tests/disable_function/disabled_function_local_var_const.phpt index 1500558..e349b8e 100644 --- a/src/tests/disable_function/disabled_function_local_var_const.phpt +++ b/src/tests/disable_function/disabled_function_local_var_const.phpt | |||
| @@ -1,7 +1,7 @@ | |||
| 1 | --TEST-- | 1 | --TEST-- |
| 2 | Disable functions - match on a constant | 2 | Disable functions - match on a constant |
| 3 | --SKIPIF-- | 3 | --SKIPIF-- |
| 4 | <?php if (!extension_loaded("snuffleupagus")) die "skip"; ?> | 4 | <?php if (!extension_loaded("snuffleupagus")) print "skip"; ?> |
| 5 | --INI-- | 5 | --INI-- |
| 6 | sp.configuration_file={PWD}/config/disabled_function_local_var_const.ini | 6 | sp.configuration_file={PWD}/config/disabled_function_local_var_const.ini |
| 7 | --FILE-- | 7 | --FILE-- |
| @@ -11,4 +11,4 @@ define("MY_CONST", $a); | |||
| 11 | strtoupper("test"); | 11 | strtoupper("test"); |
| 12 | ?> | 12 | ?> |
| 13 | --EXPECTF-- | 13 | --EXPECTF-- |
| 14 | Fatal error: [snuffleupagus][0.0.0.0][disabled_function] Aborted execution on call of the function 'strtoupper' in %a/disabled_function_local_var_const.php on line 4 \ No newline at end of file | 14 | Fatal error: [snuffleupagus][0.0.0.0][disabled_function][drop] Aborted execution on call of the function 'strtoupper' in %a/disabled_function_local_var_const.php on line 4 |
diff --git a/src/tests/disable_function/disabled_function_local_var_crash.phpt b/src/tests/disable_function/disabled_function_local_var_crash.phpt index 3381b6c..f36b2c7 100644 --- a/src/tests/disable_function/disabled_function_local_var_crash.phpt +++ b/src/tests/disable_function/disabled_function_local_var_crash.phpt | |||
| @@ -1,7 +1,7 @@ | |||
| 1 | --TEST-- | 1 | --TEST-- |
| 2 | Disable functions - match on a local variable | 2 | Disable functions - match on a local variable |
| 3 | --SKIPIF-- | 3 | --SKIPIF-- |
| 4 | <?php if (!extension_loaded("snuffleupagus")) die "skip"; ?> | 4 | <?php if (!extension_loaded("snuffleupagus")) print "skip"; ?> |
| 5 | --INI-- | 5 | --INI-- |
| 6 | sp.configuration_file={PWD}/config/disabled_function_local_var.ini | 6 | sp.configuration_file={PWD}/config/disabled_function_local_var.ini |
| 7 | --FILE-- | 7 | --FILE-- |
diff --git a/src/tests/disable_function/disabled_function_local_var_obj.phpt b/src/tests/disable_function/disabled_function_local_var_obj.phpt index c8c3be3..684933a 100644 --- a/src/tests/disable_function/disabled_function_local_var_obj.phpt +++ b/src/tests/disable_function/disabled_function_local_var_obj.phpt | |||
| @@ -1,7 +1,7 @@ | |||
| 1 | --TEST-- | 1 | --TEST-- |
| 2 | Disable functions - match on a local variable | 2 | Disable functions - match on a local variable |
| 3 | --SKIPIF-- | 3 | --SKIPIF-- |
| 4 | <?php if (!extension_loaded("snuffleupagus")) die "skip"; ?> | 4 | <?php if (!extension_loaded("snuffleupagus")) print "skip"; ?> |
| 5 | --INI-- | 5 | --INI-- |
| 6 | sp.configuration_file={PWD}/config/disabled_function_local_var_obj.ini | 6 | sp.configuration_file={PWD}/config/disabled_function_local_var_obj.ini |
| 7 | --FILE-- | 7 | --FILE-- |
| @@ -23,4 +23,4 @@ echo strtoupper($test->$arg) . "\n"; | |||
| 23 | --EXPECTF-- | 23 | --EXPECTF-- |
| 24 | QWE | 24 | QWE |
| 25 | 25 | ||
| 26 | Fatal error: [snuffleupagus][0.0.0.0][disabled_function] Aborted execution on call of the function 'strtoupper' in %a/disabled_function_local_var_obj.php on line 14 | 26 | Fatal error: [snuffleupagus][0.0.0.0][disabled_function][drop] Aborted execution on call of the function 'strtoupper' in %a/disabled_function_local_var_obj.php on line 14 |
diff --git a/src/tests/disable_function/disabled_function_param.phpt b/src/tests/disable_function/disabled_function_param.phpt index 80812b9..e318a15 100644 --- a/src/tests/disable_function/disabled_function_param.phpt +++ b/src/tests/disable_function/disabled_function_param.phpt | |||
| @@ -1,7 +1,7 @@ | |||
| 1 | --TEST-- | 1 | --TEST-- |
| 2 | Disable functions - match on a param | 2 | Disable functions - match on a param |
| 3 | --SKIPIF-- | 3 | --SKIPIF-- |
| 4 | <?php if (!extension_loaded("snuffleupagus")) die "skip"; ?> | 4 | <?php if (!extension_loaded("snuffleupagus")) print "skip"; ?> |
| 5 | --INI-- | 5 | --INI-- |
| 6 | sp.configuration_file={PWD}/config/disabled_function_param.ini | 6 | sp.configuration_file={PWD}/config/disabled_function_param.ini |
| 7 | --FILE-- | 7 | --FILE-- |
| @@ -17,4 +17,4 @@ qweqwe(Array(2)); | |||
| 17 | --EXPECTF-- | 17 | --EXPECTF-- |
| 18 | OK | 18 | OK |
| 19 | 19 | ||
| 20 | Fatal error: [snuffleupagus][0.0.0.0][disabled_function] Aborted execution on call of the function 'qweqwe', because its argument '$asd' content (2) matched a rule in %a/disabled_function_param.php on line 3 \ No newline at end of file | 20 | Fatal error: [snuffleupagus][0.0.0.0][disabled_function][drop] Aborted execution on call of the function 'qweqwe', because its argument '$asd' content (2) matched a rule in %a/disabled_function_param.php on line 3 |
diff --git a/src/tests/disable_function/disabled_function_print.phpt b/src/tests/disable_function/disabled_function_print.phpt index ee02687..ec1b04f 100644 --- a/src/tests/disable_function/disabled_function_print.phpt +++ b/src/tests/disable_function/disabled_function_print.phpt | |||
| @@ -1,7 +1,7 @@ | |||
| 1 | --TEST-- | 1 | --TEST-- |
| 2 | Echo hooking | 2 | Echo hooking |
| 3 | --SKIPIF-- | 3 | --SKIPIF-- |
| 4 | <?php if (!extension_loaded("snuffleupagus")) die "skip"; ?> | 4 | <?php if (!extension_loaded("snuffleupagus")) print "skip"; ?> |
| 5 | --INI-- | 5 | --INI-- |
| 6 | sp.configuration_file={PWD}/config/disabled_function_print.ini | 6 | sp.configuration_file={PWD}/config/disabled_function_print.ini |
| 7 | --FILE-- | 7 | --FILE-- |
| @@ -16,4 +16,4 @@ test("oops"); | |||
| 16 | --CLEAN-- | 16 | --CLEAN-- |
| 17 | --EXPECTF-- | 17 | --EXPECTF-- |
| 18 | qwerty | 18 | qwerty |
| 19 | Fatal error: [snuffleupagus][0.0.0.0][disabled_function] Aborted execution on call of the function 'echo' in %a/disabled_function_print.php on line 3 \ No newline at end of file | 19 | Fatal error: [snuffleupagus][0.0.0.0][disabled_function][drop] Aborted execution on call of the function 'echo' in %a/disabled_function_print.php on line 3 \ No newline at end of file |
diff --git a/src/tests/disable_function/disabled_function_super_global_var.phpt b/src/tests/disable_function/disabled_function_super_global_var.phpt index 19bb892..6232e19 100644 --- a/src/tests/disable_function/disabled_function_super_global_var.phpt +++ b/src/tests/disable_function/disabled_function_super_global_var.phpt | |||
| @@ -1,7 +1,7 @@ | |||
| 1 | --TEST-- | 1 | --TEST-- |
| 2 | Disable functions - match on a super global | 2 | Disable functions - match on a super global |
| 3 | --SKIPIF-- | 3 | --SKIPIF-- |
| 4 | <?php if (!extension_loaded("snuffleupagus")) die "skip"; ?> | 4 | <?php if (!extension_loaded("snuffleupagus")) print "skip"; ?> |
| 5 | --INI-- | 5 | --INI-- |
| 6 | sp.configuration_file={PWD}/config/disabled_function_super_global_var.ini | 6 | sp.configuration_file={PWD}/config/disabled_function_super_global_var.ini |
| 7 | --GET-- | 7 | --GET-- |
| @@ -22,4 +22,4 @@ test(); | |||
| 22 | --EXPECTF-- | 22 | --EXPECTF-- |
| 23 | TEST | 23 | TEST |
| 24 | 24 | ||
| 25 | Fatal error: [snuffleupagus][0.0.0.0][disabled_function] Aborted execution on call of the function 'strtoupper' in %a/disabled_function_super_global_var.php on line 4 | 25 | Fatal error: [snuffleupagus][0.0.0.0][disabled_function][drop] Aborted execution on call of the function 'strtoupper' in %a/disabled_function_super_global_var.php on line 4 |
diff --git a/src/tests/disable_function/disabled_functions.phpt b/src/tests/disable_function/disabled_functions.phpt index 45a46ad..cda7c20 100644 --- a/src/tests/disable_function/disabled_functions.phpt +++ b/src/tests/disable_function/disabled_functions.phpt | |||
| @@ -1,7 +1,7 @@ | |||
| 1 | --TEST-- | 1 | --TEST-- |
| 2 | Disable functions | 2 | Disable functions |
| 3 | --SKIPIF-- | 3 | --SKIPIF-- |
| 4 | <?php if (!extension_loaded("snuffleupagus")) die "skip"; ?> | 4 | <?php if (!extension_loaded("snuffleupagus")) print "skip"; ?> |
| 5 | --INI-- | 5 | --INI-- |
| 6 | sp.configuration_file={PWD}/config/disabled_functions.ini | 6 | sp.configuration_file={PWD}/config/disabled_functions.ini |
| 7 | --FILE-- | 7 | --FILE-- |
| @@ -14,4 +14,4 @@ var_dump("this is a super test"); | |||
| 14 | echo strpos("pouet", "o"); | 14 | echo strpos("pouet", "o"); |
| 15 | ?> | 15 | ?> |
| 16 | --EXPECTF-- | 16 | --EXPECTF-- |
| 17 | Fatal error: [snuffleupagus][0.0.0.0][disabled_function] Aborted execution on call of the function 'system' in %a/disabled_functions.php on line %d | 17 | Fatal error: [snuffleupagus][0.0.0.0][disabled_function][drop] Aborted execution on call of the function 'system' in %a/disabled_functions.php on line %d |
diff --git a/src/tests/disable_function/disabled_functions_callback_called_file_r.phpt b/src/tests/disable_function/disabled_functions_callback_called_file_r.phpt index 63a0e00..ec75d74 100644 --- a/src/tests/disable_function/disabled_functions_callback_called_file_r.phpt +++ b/src/tests/disable_function/disabled_functions_callback_called_file_r.phpt | |||
| @@ -1,7 +1,7 @@ | |||
| 1 | --TEST-- | 1 | --TEST-- |
| 2 | Disable functions by matching on the filename_r where the callback function is called, and not defined | 2 | Disable functions by matching on the filename_r where the callback function is called, and not defined |
| 3 | --SKIPIF-- | 3 | --SKIPIF-- |
| 4 | <?php if (!extension_loaded("snuffleupagus")) die "skip"; ?> | 4 | <?php if (!extension_loaded("snuffleupagus")) print "skip"; ?> |
| 5 | --INI-- | 5 | --INI-- |
| 6 | sp.configuration_file={PWD}/config/config_disabled_functions_callback_called_file_r.ini | 6 | sp.configuration_file={PWD}/config/config_disabled_functions_callback_called_file_r.ini |
| 7 | --FILE-- | 7 | --FILE-- |
| @@ -36,4 +36,4 @@ $dir = __DIR__; | |||
| 36 | @unlink("$dir/myfunc_callback.php"); | 36 | @unlink("$dir/myfunc_callback.php"); |
| 37 | ?> | 37 | ?> |
| 38 | --EXPECTF-- | 38 | --EXPECTF-- |
| 39 | Fatal error: [snuffleupagus][0.0.0.0][disabled_function] Aborted execution on call of the function 'test_callback' in %a/myfunc_callback.php on line 4 | 39 | Fatal error: [snuffleupagus][0.0.0.0][disabled_function][drop] Aborted execution on call of the function 'test_callback' in %a/myfunc_callback.php on line 4 |
diff --git a/src/tests/disable_function/disabled_functions_called_file_r.phpt b/src/tests/disable_function/disabled_functions_called_file_r.phpt index a02dde0..dde26f7 100644 --- a/src/tests/disable_function/disabled_functions_called_file_r.phpt +++ b/src/tests/disable_function/disabled_functions_called_file_r.phpt | |||
| @@ -1,7 +1,7 @@ | |||
| 1 | --TEST-- | 1 | --TEST-- |
| 2 | Disable functions by matching on the filename_r where the function is called, and not defined | 2 | Disable functions by matching on the filename_r where the function is called, and not defined |
| 3 | --SKIPIF-- | 3 | --SKIPIF-- |
| 4 | <?php if (!extension_loaded("snuffleupagus")) die "skip"; ?> | 4 | <?php if (!extension_loaded("snuffleupagus")) print "skip"; ?> |
| 5 | --INI-- | 5 | --INI-- |
| 6 | sp.configuration_file={PWD}/config/config_disabled_functions_called_file_r.ini | 6 | sp.configuration_file={PWD}/config/config_disabled_functions_called_file_r.ini |
| 7 | --FILE-- | 7 | --FILE-- |
| @@ -31,4 +31,4 @@ $dir = __DIR__; | |||
| 31 | @unlink("$dir/myfunc.php"); | 31 | @unlink("$dir/myfunc.php"); |
| 32 | ?> | 32 | ?> |
| 33 | --EXPECTF-- | 33 | --EXPECTF-- |
| 34 | Fatal error: [snuffleupagus][0.0.0.0][disabled_function] Aborted execution on call of the function 'test' in %a/myfunc.php on line 3 | 34 | Fatal error: [snuffleupagus][0.0.0.0][disabled_function][drop] Aborted execution on call of the function 'test' in %a/myfunc.php on line 3 |
diff --git a/src/tests/disable_function/disabled_functions_chain.phpt b/src/tests/disable_function/disabled_functions_chain.phpt index fd379c9..7edf863 100644 --- a/src/tests/disable_function/disabled_functions_chain.phpt +++ b/src/tests/disable_function/disabled_functions_chain.phpt | |||
| @@ -1,7 +1,7 @@ | |||
| 1 | --TEST-- | 1 | --TEST-- |
| 2 | Disable functions by matching the calltrace | 2 | Disable functions by matching the calltrace |
| 3 | --SKIPIF-- | 3 | --SKIPIF-- |
| 4 | <?php if (!extension_loaded("snuffleupagus")) die "skip"; ?> | 4 | <?php if (!extension_loaded("snuffleupagus")) print "skip"; ?> |
| 5 | --INI-- | 5 | --INI-- |
| 6 | sp.configuration_file={PWD}/config/config_disabled_functions_chain.ini | 6 | sp.configuration_file={PWD}/config/config_disabled_functions_chain.ini |
| 7 | --FILE-- | 7 | --FILE-- |
| @@ -24,4 +24,4 @@ echo "I'm after the call to outer\n"; | |||
| 24 | I'm before the call to outer | 24 | I'm before the call to outer |
| 25 | I'm in the outer function, before the call! | 25 | I'm in the outer function, before the call! |
| 26 | 26 | ||
| 27 | Fatal error: [snuffleupagus][0.0.0.0][disabled_function] Aborted execution on call of the function 'outer>inner' in %a/disabled_functions_chain.php on line 5 \ No newline at end of file | 27 | Fatal error: [snuffleupagus][0.0.0.0][disabled_function][drop] Aborted execution on call of the function 'outer>inner' in %a/disabled_functions_chain.php on line 5 \ No newline at end of file |
diff --git a/src/tests/disable_function/disabled_functions_chain_call_skip.phpt b/src/tests/disable_function/disabled_functions_chain_call_skip.phpt new file mode 100644 index 0000000..267b691 --- /dev/null +++ b/src/tests/disable_function/disabled_functions_chain_call_skip.phpt | |||
| @@ -0,0 +1,29 @@ | |||
| 1 | --TEST-- | ||
| 2 | Disable functions by matching the calltrace, with a superfluous function in between | ||
| 3 | --SKIPIF-- | ||
| 4 | <?php if (!extension_loaded("snuffleupagus")) print "skip"; ?> | ||
| 5 | --INI-- | ||
| 6 | sp.configuration_file={PWD}/config/config_disabled_functions_chain_call_skip.ini | ||
| 7 | --FILE-- | ||
| 8 | <?php | ||
| 9 | |||
| 10 | function a() { | ||
| 11 | echo "I'm in the `a` function!\n"; | ||
| 12 | b(); | ||
| 13 | } | ||
| 14 | function b() { | ||
| 15 | echo "I'm in the `b` function!\n"; | ||
| 16 | c(); | ||
| 17 | } | ||
| 18 | function c() { | ||
| 19 | echo "I'm in the `c` function!\n"; | ||
| 20 | } | ||
| 21 | |||
| 22 | a(); | ||
| 23 | ?> | ||
| 24 | --EXPECTF-- | ||
| 25 | I'm in the `a` function! | ||
| 26 | I'm in the `b` function! | ||
| 27 | |||
| 28 | Warning: [snuffleupagus][0.0.0.0][disabled_function][simulation] Aborted execution on call of the function 'a>c' in %s/tests/disable_function/disabled_functions_chain_call_skip.php on line 12 | ||
| 29 | I'm in the `c` function! | ||
diff --git a/src/tests/disable_function/disabled_functions_chain_call_user_func.phpt b/src/tests/disable_function/disabled_functions_chain_call_user_func.phpt index fd07225..c7a1f88 100644 --- a/src/tests/disable_function/disabled_functions_chain_call_user_func.phpt +++ b/src/tests/disable_function/disabled_functions_chain_call_user_func.phpt | |||
| @@ -1,7 +1,7 @@ | |||
| 1 | --TEST-- | 1 | --TEST-- |
| 2 | Disable functions by matching the calltrace, with call_user_func involved | 2 | Disable functions by matching the calltrace, with call_user_func involved |
| 3 | --SKIPIF-- | 3 | --SKIPIF-- |
| 4 | <?php if (!extension_loaded("snuffleupagus")) die "skip"; ?> | 4 | <?php if (!extension_loaded("snuffleupagus")) print "skip"; ?> |
| 5 | --INI-- | 5 | --INI-- |
| 6 | sp.configuration_file={PWD}/config/config_disabled_functions_chain_call_user_func.ini | 6 | sp.configuration_file={PWD}/config/config_disabled_functions_chain_call_user_func.ini |
| 7 | --FILE-- | 7 | --FILE-- |
| @@ -24,4 +24,4 @@ echo "I'm after the call to outer\n"; | |||
| 24 | I'm before the call to outer | 24 | I'm before the call to outer |
| 25 | I'm in the outer function, before the call! | 25 | I'm in the outer function, before the call! |
| 26 | 26 | ||
| 27 | Fatal error: [snuffleupagus][0.0.0.0][disabled_function] Aborted execution on call of the function 'outer>inner' in %a/disabled_functions_chain_call_user_func.php on line 5 \ No newline at end of file | 27 | Fatal error: [snuffleupagus][0.0.0.0][disabled_function][drop] Aborted execution on call of the function 'outer>inner' in %a/disabled_functions_chain_call_user_func.php on line 5 \ No newline at end of file |
diff --git a/src/tests/disable_function/disabled_functions_chain_call_user_func_ret.phpt b/src/tests/disable_function/disabled_functions_chain_call_user_func_ret.phpt index 3046096..1a77205 100644 --- a/src/tests/disable_function/disabled_functions_chain_call_user_func_ret.phpt +++ b/src/tests/disable_function/disabled_functions_chain_call_user_func_ret.phpt | |||
| @@ -1,7 +1,7 @@ | |||
| 1 | --TEST-- | 1 | --TEST-- |
| 2 | Disable functions by matching the calltrace, on the return value | 2 | Disable functions by matching the calltrace, on the return value |
| 3 | --SKIPIF-- | 3 | --SKIPIF-- |
| 4 | <?php if (!extension_loaded("snuffleupagus")) die "skip"; ?> | 4 | <?php if (!extension_loaded("snuffleupagus")) print "skip"; ?> |
| 5 | --INI-- | 5 | --INI-- |
| 6 | sp.configuration_file={PWD}/config/config_disabled_functions_chain_call_user_func_ret.ini | 6 | sp.configuration_file={PWD}/config/config_disabled_functions_chain_call_user_func_ret.ini |
| 7 | --FILE-- | 7 | --FILE-- |
| @@ -28,7 +28,7 @@ not matching_one | |||
| 28 | one | 28 | one |
| 29 | two | 29 | two |
| 30 | 30 | ||
| 31 | Warning: [snuffleupagus][0.0.0.0][disabled_function] Aborted execution on return of the function 'two', because the function returned 'matching_two', which matched a rule in %a/disabled_functions_chain_call_user_func_ret.php on line %d | 31 | Warning: [snuffleupagus][0.0.0.0][disabled_function][simulation] Aborted execution on return of the function 'two', because the function returned 'matching_two', which matched a rule in %a/disabled_functions_chain_call_user_func_ret.php on line %d |
| 32 | matching_one | 32 | matching_one |
| 33 | one | 33 | one |
| 34 | two | 34 | two |
diff --git a/src/tests/disable_function/disabled_functions_chain_not_matching.phpt b/src/tests/disable_function/disabled_functions_chain_not_matching.phpt index 3a0400a..91b4154 100644 --- a/src/tests/disable_function/disabled_functions_chain_not_matching.phpt +++ b/src/tests/disable_function/disabled_functions_chain_not_matching.phpt | |||
| @@ -1,7 +1,7 @@ | |||
| 1 | --TEST-- | 1 | --TEST-- |
| 2 | Disable functions by matching the calltrace | 2 | Disable functions by matching the calltrace |
| 3 | --SKIPIF-- | 3 | --SKIPIF-- |
| 4 | <?php if (!extension_loaded("snuffleupagus")) die "skip"; ?> | 4 | <?php if (!extension_loaded("snuffleupagus")) print "skip"; ?> |
| 5 | --INI-- | 5 | --INI-- |
| 6 | sp.configuration_file={PWD}/config/config_disabled_functions_chain.ini | 6 | sp.configuration_file={PWD}/config/config_disabled_functions_chain.ini |
| 7 | --FILE-- | 7 | --FILE-- |
diff --git a/src/tests/disable_function/disabled_functions_cidr.phpt b/src/tests/disable_function/disabled_functions_cidr.phpt index ea690e8..ef82957 100644 --- a/src/tests/disable_function/disabled_functions_cidr.phpt +++ b/src/tests/disable_function/disabled_functions_cidr.phpt | |||
| @@ -1,7 +1,7 @@ | |||
| 1 | --TEST-- | 1 | --TEST-- |
| 2 | Disable functions | 2 | Disable functions |
| 3 | --SKIPIF-- | 3 | --SKIPIF-- |
| 4 | <?php if (!extension_loaded("snuffleupagus")) die "skip"; ?> | 4 | <?php if (!extension_loaded("snuffleupagus")) print "skip"; ?> |
| 5 | --ENV-- | 5 | --ENV-- |
| 6 | return <<<EOF | 6 | return <<<EOF |
| 7 | REMOTE_ADDR=127.0.0.1 | 7 | REMOTE_ADDR=127.0.0.1 |
| @@ -13,4 +13,4 @@ sp.configuration_file={PWD}/config/disabled_functions_cidr.ini | |||
| 13 | system("echo 42"); | 13 | system("echo 42"); |
| 14 | ?> | 14 | ?> |
| 15 | --EXPECTF-- | 15 | --EXPECTF-- |
| 16 | Fatal error: [snuffleupagus][127.0.0.1][disabled_function] Aborted execution on call of the function 'system' in %a/disabled_functions_cidr.php on line 2 \ No newline at end of file | 16 | Fatal error: [snuffleupagus][127.0.0.1][disabled_function][drop] Aborted execution on call of the function 'system' in %a/disabled_functions_cidr.php on line 2 \ No newline at end of file |
diff --git a/src/tests/disable_function/disabled_functions_cidr_6.phpt b/src/tests/disable_function/disabled_functions_cidr_6.phpt index 914cd35..0153cc5 100644 --- a/src/tests/disable_function/disabled_functions_cidr_6.phpt +++ b/src/tests/disable_function/disabled_functions_cidr_6.phpt | |||
| @@ -1,7 +1,7 @@ | |||
| 1 | --TEST-- | 1 | --TEST-- |
| 2 | Disable functions | 2 | Disable functions |
| 3 | --SKIPIF-- | 3 | --SKIPIF-- |
| 4 | <?php if (!extension_loaded("snuffleupagus")) die "skip"; ?> | 4 | <?php if (!extension_loaded("snuffleupagus")) print "skip"; ?> |
| 5 | --ENV-- | 5 | --ENV-- |
| 6 | return <<<EOF | 6 | return <<<EOF |
| 7 | REMOTE_ADDR=2001:0db8:f000:f000:f000:ff00:0042:8328 | 7 | REMOTE_ADDR=2001:0db8:f000:f000:f000:ff00:0042:8328 |
| @@ -14,4 +14,4 @@ strpos("a", "b"); | |||
| 14 | printf(1337); | 14 | printf(1337); |
| 15 | ?> | 15 | ?> |
| 16 | --EXPECTF-- | 16 | --EXPECTF-- |
| 17 | Fatal error: [snuffleupagus][2001:0db8:f000:f000:f000:ff00:0042:8328][disabled_function] Aborted execution on call of the function 'strpos' in %a/disabled_functions_cidr_6.php on line 2 | 17 | Fatal error: [snuffleupagus][2001:0db8:f000:f000:f000:ff00:0042:8328][disabled_function][drop] Aborted execution on call of the function 'strpos' in %a/disabled_functions_cidr_6.php on line 2 |
diff --git a/src/tests/disable_function/disabled_functions_cidr_x_fwd_for.phpt b/src/tests/disable_function/disabled_functions_cidr_x_fwd_for.phpt new file mode 100644 index 0000000..85aeb1a --- /dev/null +++ b/src/tests/disable_function/disabled_functions_cidr_x_fwd_for.phpt | |||
| @@ -0,0 +1,16 @@ | |||
| 1 | --TEST-- | ||
| 2 | Disable functions - CIDR match on an x-forwarded-for | ||
| 3 | --SKIPIF-- | ||
| 4 | <?php if (!extension_loaded("snuffleupagus")) print "skip"; ?> | ||
| 5 | --ENV-- | ||
| 6 | return <<<EOF | ||
| 7 | HTTP_X_FORWARDED_FOR=127.0.0.1 | ||
| 8 | EOF; | ||
| 9 | --INI-- | ||
| 10 | sp.configuration_file={PWD}/config/disabled_functions_cidr.ini | ||
| 11 | --FILE-- | ||
| 12 | <?php | ||
| 13 | system("echo 42"); | ||
| 14 | ?> | ||
| 15 | --EXPECTF-- | ||
| 16 | Fatal error: [snuffleupagus][127.0.0.1][disabled_function][drop] Aborted execution on call of the function 'system' in %a/disabled_functions_cidr_x_fwd_for.php on line 2 | ||
diff --git a/src/tests/disable_function/disabled_functions_cidr_x_fwd_for_remote_addr.phpt b/src/tests/disable_function/disabled_functions_cidr_x_fwd_for_remote_addr.phpt new file mode 100644 index 0000000..af5c6ed --- /dev/null +++ b/src/tests/disable_function/disabled_functions_cidr_x_fwd_for_remote_addr.phpt | |||
| @@ -0,0 +1,17 @@ | |||
| 1 | --TEST-- | ||
| 2 | Disable functions - x-forwarded-for and remote-addr | ||
| 3 | --SKIPIF-- | ||
| 4 | <?php if (!extension_loaded("snuffleupagus")) print "skip"; ?> | ||
| 5 | --ENV-- | ||
| 6 | return <<<EOF | ||
| 7 | HTTP_X_FORWARDED_FOR=127.0.0.1 | ||
| 8 | REMOTE_ADDR=127.0.0.2 | ||
| 9 | EOF; | ||
| 10 | --INI-- | ||
| 11 | sp.configuration_file={PWD}/config/disabled_functions_cidr.ini | ||
| 12 | --FILE-- | ||
| 13 | <?php | ||
| 14 | system("echo 42"); | ||
| 15 | ?> | ||
| 16 | --EXPECTF-- | ||
| 17 | Fatal error: [snuffleupagus][127.0.0.2][disabled_function][drop] Aborted execution on call of the function 'system' in %a/disabled_functions_cidr_x_fwd_for_remote_addr.php on line 2 | ||
diff --git a/src/tests/disable_function/disabled_functions_die.phpt b/src/tests/disable_function/disabled_functions_die.phpt index 73bd657..75c8e1b 100644 --- a/src/tests/disable_function/disabled_functions_die.phpt +++ b/src/tests/disable_function/disabled_functions_die.phpt | |||
| @@ -1,7 +1,7 @@ | |||
| 1 | --TEST-- | 1 | --TEST-- |
| 2 | Disable functions - die | 2 | Disable functions - die |
| 3 | --SKIPIF-- | 3 | --SKIPIF-- |
| 4 | <?php if (!extension_loaded("snuffleupagus")) die "skip"; ?> | 4 | <?php if (!extension_loaded("snuffleupagus")) print "skip"; ?> |
| 5 | --INI-- | 5 | --INI-- |
| 6 | sp.configuration_file={PWD}/config/disabled_functions_die.ini | 6 | sp.configuration_file={PWD}/config/disabled_functions_die.ini |
| 7 | --FILE-- | 7 | --FILE-- |
| @@ -10,4 +10,4 @@ die('OMG'); | |||
| 10 | ?> | 10 | ?> |
| 11 | --XFAIL-- | 11 | --XFAIL-- |
| 12 | --EXPECTF-- | 12 | --EXPECTF-- |
| 13 | Fatal error: [snuffleupagus][0.0.0.0][disabled_function] Aborted execution on call of the function 'die' in %a/disabled_function_echo.php on line 3 | 13 | Fatal error: [snuffleupagus][0.0.0.0][disabled_function][drop] Aborted execution on call of the function 'die' in %a/disabled_function_echo.php on line 3 |
diff --git a/src/tests/disable_function/disabled_functions_drop_include.phpt b/src/tests/disable_function/disabled_functions_drop_include.phpt index ba1c955..975168e 100644 --- a/src/tests/disable_function/disabled_functions_drop_include.phpt +++ b/src/tests/disable_function/disabled_functions_drop_include.phpt | |||
| @@ -1,7 +1,7 @@ | |||
| 1 | --TEST-- | 1 | --TEST-- |
| 2 | Disable function, bug : https://github.com/jvoisin/snuffleupagus/issues/181 | 2 | Disable function, bug : https://github.com/jvoisin/snuffleupagus/issues/181 |
| 3 | --SKIPIF-- | 3 | --SKIPIF-- |
| 4 | <?php if (!extension_loaded("snuffleupagus")) die "skip"; ?> | 4 | <?php if (!extension_loaded("snuffleupagus")) print "skip"; ?> |
| 5 | --INI-- | 5 | --INI-- |
| 6 | sp.configuration_file={PWD}/config/disabled_functions_drop_include.ini | 6 | sp.configuration_file={PWD}/config/disabled_functions_drop_include.ini |
| 7 | --FILE-- | 7 | --FILE-- |
diff --git a/src/tests/disable_function/disabled_functions_drop_include_simulation.phpt b/src/tests/disable_function/disabled_functions_drop_include_simulation.phpt index 1b13915..0a693be 100644 --- a/src/tests/disable_function/disabled_functions_drop_include_simulation.phpt +++ b/src/tests/disable_function/disabled_functions_drop_include_simulation.phpt | |||
| @@ -1,7 +1,7 @@ | |||
| 1 | --TEST-- | 1 | --TEST-- |
| 2 | Disable function, bug : https://github.com/jvoisin/snuffleupagus/issues/181 | 2 | Disable function, bug : https://github.com/jvoisin/snuffleupagus/issues/181 |
| 3 | --SKIPIF-- | 3 | --SKIPIF-- |
| 4 | <?php if (!extension_loaded("snuffleupagus")) die "skip"; ?> | 4 | <?php if (!extension_loaded("snuffleupagus")) print "skip"; ?> |
| 5 | --INI-- | 5 | --INI-- |
| 6 | sp.configuration_file={PWD}/config/disabled_functions_drop_include_simulation.ini | 6 | sp.configuration_file={PWD}/config/disabled_functions_drop_include_simulation.ini |
| 7 | --FILE-- | 7 | --FILE-- |
diff --git a/src/tests/disable_function/disabled_functions_eval.phpt b/src/tests/disable_function/disabled_functions_eval.phpt index 04b2342..78156e1 100644 --- a/src/tests/disable_function/disabled_functions_eval.phpt +++ b/src/tests/disable_function/disabled_functions_eval.phpt | |||
| @@ -1,7 +1,7 @@ | |||
| 1 | --TEST-- | 1 | --TEST-- |
| 2 | Disable functions - eval | 2 | Disable functions - eval |
| 3 | --SKIPIF-- | 3 | --SKIPIF-- |
| 4 | <?php if (!extension_loaded("snuffleupagus")) die "skip"; ?> | 4 | <?php if (!extension_loaded("snuffleupagus")) print "skip"; ?> |
| 5 | --INI-- | 5 | --INI-- |
| 6 | sp.configuration_file={PWD}/config/disabled_functions_eval.ini | 6 | sp.configuration_file={PWD}/config/disabled_functions_eval.ini |
| 7 | --FILE-- | 7 | --FILE-- |
| @@ -11,4 +11,4 @@ eval('$var = 1337 + 1337;'); | |||
| 11 | print("Variable: $var\n"); | 11 | print("Variable: $var\n"); |
| 12 | ?> | 12 | ?> |
| 13 | --EXPECTF-- | 13 | --EXPECTF-- |
| 14 | Fatal error: [snuffleupagus][0.0.0.0][disabled_function] Aborted execution on call of the function 'eval' in %a/disabled_functions_eval.php(3) : eval()'d code on line 1 \ No newline at end of file | 14 | Fatal error: [snuffleupagus][0.0.0.0][disabled_function][drop] Aborted execution on call of the function 'eval' in %a/disabled_functions_eval.php(3) : eval()'d code on line 1 \ No newline at end of file |
diff --git a/src/tests/disable_function/disabled_functions_eval_filename.phpt b/src/tests/disable_function/disabled_functions_eval_filename.phpt index 564116e..8ee482d 100644 --- a/src/tests/disable_function/disabled_functions_eval_filename.phpt +++ b/src/tests/disable_function/disabled_functions_eval_filename.phpt | |||
| @@ -1,7 +1,7 @@ | |||
| 1 | --TEST-- | 1 | --TEST-- |
| 2 | Disable functions - eval | 2 | Disable functions - eval |
| 3 | --SKIPIF-- | 3 | --SKIPIF-- |
| 4 | <?php if (!extension_loaded("snuffleupagus")) die "skip"; ?> | 4 | <?php if (!extension_loaded("snuffleupagus")) print "skip"; ?> |
| 5 | --INI-- | 5 | --INI-- |
| 6 | sp.configuration_file={PWD}/config/config_disabled_functions_eval_filename.ini | 6 | sp.configuration_file={PWD}/config/config_disabled_functions_eval_filename.ini |
| 7 | --FILE-- | 7 | --FILE-- |
| @@ -11,4 +11,4 @@ eval('$var = 1337 + 1337;'); | |||
| 11 | print("Variable: $var\n"); | 11 | print("Variable: $var\n"); |
| 12 | ?> | 12 | ?> |
| 13 | --EXPECTF-- | 13 | --EXPECTF-- |
| 14 | Fatal error: [snuffleupagus][0.0.0.0][disabled_function] Aborted execution on call of the function 'eval' in %a/disabled_functions_eval_filename.php(3) : eval()'d code on line 1 \ No newline at end of file | 14 | Fatal error: [snuffleupagus][0.0.0.0][disabled_function][drop] Aborted execution on call of the function 'eval' in %a/disabled_functions_eval_filename.php(3) : eval()'d code on line 1 |
diff --git a/src/tests/disable_function/disabled_functions_eval_simulation.phpt b/src/tests/disable_function/disabled_functions_eval_simulation.phpt index 6286235..9e36006 100644 --- a/src/tests/disable_function/disabled_functions_eval_simulation.phpt +++ b/src/tests/disable_function/disabled_functions_eval_simulation.phpt | |||
| @@ -1,7 +1,7 @@ | |||
| 1 | --TEST-- | 1 | --TEST-- |
| 2 | Disable functions - eval (simulation) | 2 | Disable functions - eval (simulation) |
| 3 | --SKIPIF-- | 3 | --SKIPIF-- |
| 4 | <?php if (!extension_loaded("snuffleupagus")) die "skip"; ?> | 4 | <?php if (!extension_loaded("snuffleupagus")) print "skip"; ?> |
| 5 | --INI-- | 5 | --INI-- |
| 6 | sp.configuration_file={PWD}/config/disabled_functions_eval_simulation.ini | 6 | sp.configuration_file={PWD}/config/disabled_functions_eval_simulation.ini |
| 7 | --FILE-- | 7 | --FILE-- |
| @@ -11,5 +11,5 @@ eval('$var = 1337 + 1337;'); | |||
| 11 | print("Variable: $var\n"); | 11 | print("Variable: $var\n"); |
| 12 | ?> | 12 | ?> |
| 13 | --EXPECTF-- | 13 | --EXPECTF-- |
| 14 | Warning: [snuffleupagus][0.0.0.0][disabled_function] Aborted execution on call of the function 'eval' in %a/disabled_functions_eval_simulation.php(3) : eval()'d code on line 1 | 14 | Warning: [snuffleupagus][0.0.0.0][disabled_function][simulation] Aborted execution on call of the function 'eval' in %a/disabled_functions_eval_simulation.php(3) : eval()'d code on line 1 |
| 15 | Variable: 2674 \ No newline at end of file | 15 | Variable: 2674 \ No newline at end of file |
diff --git a/src/tests/disable_function/disabled_functions_eval_user.phpt b/src/tests/disable_function/disabled_functions_eval_user.phpt index 7e02d13..84643f6 100644 --- a/src/tests/disable_function/disabled_functions_eval_user.phpt +++ b/src/tests/disable_function/disabled_functions_eval_user.phpt | |||
| @@ -1,7 +1,7 @@ | |||
| 1 | --TEST-- | 1 | --TEST-- |
| 2 | Disable functions - eval with a disabled user func | 2 | Disable functions - eval with a disabled user func |
| 3 | --SKIPIF-- | 3 | --SKIPIF-- |
| 4 | <?php if (!extension_loaded("snuffleupagus")) die "skip"; ?> | 4 | <?php if (!extension_loaded("snuffleupagus")) print "skip"; ?> |
| 5 | --INI-- | 5 | --INI-- |
| 6 | sp.configuration_file={PWD}/config/config_disabled_functions_eval_user_func.ini | 6 | sp.configuration_file={PWD}/config/config_disabled_functions_eval_user_func.ini |
| 7 | --FILE-- | 7 | --FILE-- |
| @@ -15,4 +15,4 @@ eval('$a = my_func();'); | |||
| 15 | echo '$a = ' . $a . "\n"; | 15 | echo '$a = ' . $a . "\n"; |
| 16 | ?> | 16 | ?> |
| 17 | --EXPECTF-- | 17 | --EXPECTF-- |
| 18 | Fatal error: [snuffleupagus][0.0.0.0][disabled_function] Aborted execution on call of the function 'my_func' in %a/disabled_functions_eval_user.php on line 3 \ No newline at end of file | 18 | Fatal error: [snuffleupagus][0.0.0.0][disabled_function][drop] Aborted execution on call of the function 'my_func' in %a/disabled_functions_eval_user.php on line 3 \ No newline at end of file |
diff --git a/src/tests/disable_function/disabled_functions_exit.phpt b/src/tests/disable_function/disabled_functions_exit.phpt index a6fd3c6..2aa013b 100644 --- a/src/tests/disable_function/disabled_functions_exit.phpt +++ b/src/tests/disable_function/disabled_functions_exit.phpt | |||
| @@ -1,7 +1,7 @@ | |||
| 1 | --TEST-- | 1 | --TEST-- |
| 2 | Disable functions - exit | 2 | Disable functions - exit |
| 3 | --SKIPIF-- | 3 | --SKIPIF-- |
| 4 | <?php if (!extension_loaded("snuffleupagus")) die "skip"; ?> | 4 | <?php if (!extension_loaded("snuffleupagus")) print "skip"; ?> |
| 5 | --INI-- | 5 | --INI-- |
| 6 | sp.configuration_file={PWD}/config/disabled_functions_exit.ini | 6 | sp.configuration_file={PWD}/config/disabled_functions_exit.ini |
| 7 | --FILE-- | 7 | --FILE-- |
| @@ -10,4 +10,4 @@ exit('OMG'); | |||
| 10 | ?> | 10 | ?> |
| 11 | --XFAIL-- | 11 | --XFAIL-- |
| 12 | --EXPECTF-- | 12 | --EXPECTF-- |
| 13 | Fatal error: [snuffleupagus][0.0.0.0][disabled_function] Aborted execution on call of the function 'exit' in %a/disabled_function_echo.php on line 3 | 13 | Fatal error: [snuffleupagus][0.0.0.0][disabled_function][drop] Aborted execution on call of the function 'exit' in %a/disabled_function_echo.php on line 3 |
diff --git a/src/tests/disable_function/disabled_functions_filename_r.phpt b/src/tests/disable_function/disabled_functions_filename_r.phpt index 9f36cce..97e703b 100644 --- a/src/tests/disable_function/disabled_functions_filename_r.phpt +++ b/src/tests/disable_function/disabled_functions_filename_r.phpt | |||
| @@ -1,7 +1,7 @@ | |||
| 1 | --TEST-- | 1 | --TEST-- |
| 2 | Disable functions - filename regexp | 2 | Disable functions - filename regexp |
| 3 | --SKIPIF-- | 3 | --SKIPIF-- |
| 4 | <?php if (!extension_loaded("snuffleupagus")) die "skip"; ?> | 4 | <?php if (!extension_loaded("snuffleupagus")) print "skip"; ?> |
| 5 | --INI-- | 5 | --INI-- |
| 6 | sp.configuration_file={PWD}/config/config_disabled_functions_filename_r.ini | 6 | sp.configuration_file={PWD}/config/config_disabled_functions_filename_r.ini |
| 7 | --FILE-- | 7 | --FILE-- |
| @@ -12,4 +12,4 @@ shell_exec("echo 43"); | |||
| 12 | --EXPECTF-- | 12 | --EXPECTF-- |
| 13 | 42 | 13 | 42 |
| 14 | 14 | ||
| 15 | Fatal error: [snuffleupagus][0.0.0.0][disabled_function] Aborted execution on call of the function 'shell_exec' in %a/disabled_functions_filename_r.php on line 3 \ No newline at end of file | 15 | Fatal error: [snuffleupagus][0.0.0.0][disabled_function][drop] Aborted execution on call of the function 'shell_exec' in %a/disabled_functions_filename_r.php on line 3 |
diff --git a/src/tests/disable_function/disabled_functions_include_once.phpt b/src/tests/disable_function/disabled_functions_include_once.phpt index 3709aff..57cb5a1 100644 --- a/src/tests/disable_function/disabled_functions_include_once.phpt +++ b/src/tests/disable_function/disabled_functions_include_once.phpt | |||
| @@ -1,7 +1,7 @@ | |||
| 1 | --TEST-- | 1 | --TEST-- |
| 2 | Disable functions - include_once | 2 | Disable functions - include_once |
| 3 | --SKIPIF-- | 3 | --SKIPIF-- |
| 4 | <?php if (!extension_loaded("snuffleupagus")) die "skip"; ?> | 4 | <?php if (!extension_loaded("snuffleupagus")) print "skip"; ?> |
| 5 | --INI-- | 5 | --INI-- |
| 6 | sp.configuration_file={PWD}/config/config_disabled_functions_include.ini | 6 | sp.configuration_file={PWD}/config/config_disabled_functions_include.ini |
| 7 | --FILE-- | 7 | --FILE-- |
| @@ -22,6 +22,6 @@ unlink($dir . '/test.sim'); | |||
| 22 | --EXPECTF-- | 22 | --EXPECTF-- |
| 23 | BLA | 23 | BLA |
| 24 | 24 | ||
| 25 | Warning: [snuffleupagus][0.0.0.0][disabled_function] Aborted execution on call of the function 'include_once', because its argument 'inclusion path' content (%a/test.sim) matched a rule in %a/disabled_functions_include_once.php on line 6 | 25 | Warning: [snuffleupagus][0.0.0.0][disabled_function][simulation] Aborted execution on call of the function 'include_once', because its argument 'inclusion path' content (%a/test.sim) matched a rule in %a/disabled_functions_include_once.php on line 6 |
| 26 | MEH | 26 | MEH |
| 27 | 1337 | 27 | 1337 |
diff --git a/src/tests/disable_function/disabled_functions_include_simulation.phpt b/src/tests/disable_function/disabled_functions_include_simulation.phpt index 60ba9ee..53ea2a4 100644 --- a/src/tests/disable_function/disabled_functions_include_simulation.phpt +++ b/src/tests/disable_function/disabled_functions_include_simulation.phpt | |||
| @@ -1,7 +1,7 @@ | |||
| 1 | --TEST-- | 1 | --TEST-- |
| 2 | Disable functions - Include (simulation) | 2 | Disable functions - Include (simulation) |
| 3 | --SKIPIF-- | 3 | --SKIPIF-- |
| 4 | <?php if (!extension_loaded("snuffleupagus")) die "skip"; ?> | 4 | <?php if (!extension_loaded("snuffleupagus")) print "skip"; ?> |
| 5 | --INI-- | 5 | --INI-- |
| 6 | sp.configuration_file={PWD}/config/config_disabled_functions_include.ini | 6 | sp.configuration_file={PWD}/config/config_disabled_functions_include.ini |
| 7 | --FILE-- | 7 | --FILE-- |
| @@ -22,6 +22,6 @@ unlink($dir . '/test.sim'); | |||
| 22 | --EXPECTF-- | 22 | --EXPECTF-- |
| 23 | BLA | 23 | BLA |
| 24 | 24 | ||
| 25 | Warning: [snuffleupagus][0.0.0.0][disabled_function] Aborted execution on call of the function 'include', because its argument 'inclusion path' content (%a/test.sim) matched a rule in %a/disabled_functions_include_simulation.php on line 6 | 25 | Warning: [snuffleupagus][0.0.0.0][disabled_function][simulation] Aborted execution on call of the function 'include', because its argument 'inclusion path' content (%a/test.sim) matched a rule in %a/disabled_functions_include_simulation.php on line 6 |
| 26 | MEH | 26 | MEH |
| 27 | 1337 | 27 | 1337 |
diff --git a/src/tests/disable_function/disabled_functions_local_var_array.phpt b/src/tests/disable_function/disabled_functions_local_var_array.phpt index f460d72..bff34eb 100644 --- a/src/tests/disable_function/disabled_functions_local_var_array.phpt +++ b/src/tests/disable_function/disabled_functions_local_var_array.phpt | |||
| @@ -1,7 +1,7 @@ | |||
| 1 | --TEST-- | 1 | --TEST-- |
| 2 | Disable functions - match on an array value buried in several levels | 2 | Disable functions - match on an array value buried in several levels |
| 3 | --SKIPIF-- | 3 | --SKIPIF-- |
| 4 | <?php if (!extension_loaded("snuffleupagus")) die "skip"; ?> | 4 | <?php if (!extension_loaded("snuffleupagus")) print "skip"; ?> |
| 5 | --INI-- | 5 | --INI-- |
| 6 | sp.configuration_file={PWD}/config/config_disabled_functions_local_var_array.ini | 6 | sp.configuration_file={PWD}/config/config_disabled_functions_local_var_array.ini |
| 7 | --FILE-- | 7 | --FILE-- |
| @@ -18,4 +18,4 @@ foo($a); | |||
| 18 | --EXPECTF-- | 18 | --EXPECTF-- |
| 19 | cccc | 19 | cccc |
| 20 | 20 | ||
| 21 | Fatal error: [snuffleupagus][0.0.0.0][disabled_function] Aborted execution on call of the function 'foo' in %a/disabled_functions_local_var_array.php on line 3 \ No newline at end of file | 21 | Fatal error: [snuffleupagus][0.0.0.0][disabled_function][drop] Aborted execution on call of the function 'foo' in %a/disabled_functions_local_var_array.php on line 3 |
diff --git a/src/tests/disable_function/disabled_functions_local_var_array_key.phpt b/src/tests/disable_function/disabled_functions_local_var_array_key.phpt index b69db4a..bb66ac0 100644 --- a/src/tests/disable_function/disabled_functions_local_var_array_key.phpt +++ b/src/tests/disable_function/disabled_functions_local_var_array_key.phpt | |||
| @@ -1,7 +1,7 @@ | |||
| 1 | --TEST-- | 1 | --TEST-- |
| 2 | Disable functions - match on an array value buried in several levels | 2 | Disable functions - match on an array value buried in several levels |
| 3 | --SKIPIF-- | 3 | --SKIPIF-- |
| 4 | <?php if (!extension_loaded("snuffleupagus")) die "skip"; ?> | 4 | <?php if (!extension_loaded("snuffleupagus")) print "skip"; ?> |
| 5 | --INI-- | 5 | --INI-- |
| 6 | sp.configuration_file={PWD}/config/config_disabled_functions_local_var_array_key.ini | 6 | sp.configuration_file={PWD}/config/config_disabled_functions_local_var_array_key.ini |
| 7 | --FILE-- | 7 | --FILE-- |
| @@ -18,4 +18,4 @@ foo($a); | |||
| 18 | --EXPECTF-- | 18 | --EXPECTF-- |
| 19 | cccc | 19 | cccc |
| 20 | 20 | ||
| 21 | Fatal error: [snuffleupagus][0.0.0.0][disabled_function] Aborted execution on call of the function 'foo' in %a/disabled_functions_local_var_array_key.php on line 3 \ No newline at end of file | 21 | Fatal error: [snuffleupagus][0.0.0.0][disabled_function][drop] Aborted execution on call of the function 'foo' in %a/disabled_functions_local_var_array_key.php on line 3 |
diff --git a/src/tests/disable_function/disabled_functions_local_var_array_not_array.phpt b/src/tests/disable_function/disabled_functions_local_var_array_not_array.phpt index 54e8719..6a62074 100644 --- a/src/tests/disable_function/disabled_functions_local_var_array_not_array.phpt +++ b/src/tests/disable_function/disabled_functions_local_var_array_not_array.phpt | |||
| @@ -1,7 +1,7 @@ | |||
| 1 | --TEST-- | 1 | --TEST-- |
| 2 | Disable functions | 2 | Disable functions |
| 3 | --SKIPIF-- | 3 | --SKIPIF-- |
| 4 | <?php if (!extension_loaded("snuffleupagus")) die "skip"; ?> | 4 | <?php if (!extension_loaded("snuffleupagus")) print "skip"; ?> |
| 5 | --INI-- | 5 | --INI-- |
| 6 | sp.configuration_file={PWD}/config/disabled_function_local_var_array_not_array.ini | 6 | sp.configuration_file={PWD}/config/disabled_function_local_var_array_not_array.ini |
| 7 | --FILE-- | 7 | --FILE-- |
diff --git a/src/tests/disable_function/disabled_functions_mb.phpt b/src/tests/disable_function/disabled_functions_mb.phpt index eda11f7..3640679 100644 --- a/src/tests/disable_function/disabled_functions_mb.phpt +++ b/src/tests/disable_function/disabled_functions_mb.phpt | |||
| @@ -1,7 +1,7 @@ | |||
| 1 | --TEST-- | 1 | --TEST-- |
| 2 | Disable functions | 2 | Disable functions |
| 3 | --SKIPIF-- | 3 | --SKIPIF-- |
| 4 | <?php if (!extension_loaded("snuffleupagus")) die "skip"; ?> | 4 | <?php if (!extension_loaded("snuffleupagus")) print "skip"; ?> |
| 5 | --INI-- | 5 | --INI-- |
| 6 | sp.configuration_file={PWD}/config/disabled_functions_mb.ini | 6 | sp.configuration_file={PWD}/config/disabled_functions_mb.ini |
| 7 | --FILE-- | 7 | --FILE-- |
| @@ -9,4 +9,4 @@ sp.configuration_file={PWD}/config/disabled_functions_mb.ini | |||
| 9 | echo strtoupper("id"); | 9 | echo strtoupper("id"); |
| 10 | ?> | 10 | ?> |
| 11 | --EXPECTF-- | 11 | --EXPECTF-- |
| 12 | Fatal error: [snuffleupagus][0.0.0.0][disabled_function] Aborted execution on call of the function 'strtoupper' in %a/disabled_functions_mb.php on line 2 \ No newline at end of file | 12 | Fatal error: [snuffleupagus][0.0.0.0][disabled_function][drop] Aborted execution on call of the function 'strtoupper' in %a/disabled_functions_mb.php on line 2 \ No newline at end of file |
diff --git a/src/tests/disable_function/disabled_functions_method.phpt b/src/tests/disable_function/disabled_functions_method.phpt index 632d570..b37f9fd 100644 --- a/src/tests/disable_function/disabled_functions_method.phpt +++ b/src/tests/disable_function/disabled_functions_method.phpt | |||
| @@ -1,7 +1,7 @@ | |||
| 1 | --TEST-- | 1 | --TEST-- |
| 2 | Disable functions | 2 | Disable functions |
| 3 | --SKIPIF-- | 3 | --SKIPIF-- |
| 4 | <?php if (!extension_loaded("snuffleupagus")) die "skip"; ?> | 4 | <?php if (!extension_loaded("snuffleupagus")) print "skip"; ?> |
| 5 | --INI-- | 5 | --INI-- |
| 6 | sp.configuration_file={PWD}/config/config_disabled_functions_method.ini | 6 | sp.configuration_file={PWD}/config/config_disabled_functions_method.ini |
| 7 | --FILE-- | 7 | --FILE-- |
| @@ -24,4 +24,4 @@ $c->method2("paf"); | |||
| 24 | $c->method3("pouet"); | 24 | $c->method3("pouet"); |
| 25 | ?> | 25 | ?> |
| 26 | --EXPECTF-- | 26 | --EXPECTF-- |
| 27 | Fatal error: [snuffleupagus][0.0.0.0][disabled_function] Aborted execution on call of the function 'AwesomeClass::method1' in %a/disabled_functions_method.php on line 4 \ No newline at end of file | 27 | Fatal error: [snuffleupagus][0.0.0.0][disabled_function][drop] Aborted execution on call of the function 'AwesomeClass::method1' in %a/disabled_functions_method.php on line 4 |
diff --git a/src/tests/disable_function/disabled_functions_name_r.phpt b/src/tests/disable_function/disabled_functions_name_r.phpt index 0a151a6..7a45c6e 100644 --- a/src/tests/disable_function/disabled_functions_name_r.phpt +++ b/src/tests/disable_function/disabled_functions_name_r.phpt | |||
| @@ -1,7 +1,7 @@ | |||
| 1 | --TEST-- | 1 | --TEST-- |
| 2 | Disable functions | 2 | Disable functions |
| 3 | --SKIPIF-- | 3 | --SKIPIF-- |
| 4 | <?php if (!extension_loaded("snuffleupagus")) die "skip"; ?> | 4 | <?php if (!extension_loaded("snuffleupagus")) print "skip"; ?> |
| 5 | --INI-- | 5 | --INI-- |
| 6 | sp.configuration_file={PWD}/config/config_disabled_functions_name_r.ini | 6 | sp.configuration_file={PWD}/config/config_disabled_functions_name_r.ini |
| 7 | --FILE-- | 7 | --FILE-- |
| @@ -13,4 +13,4 @@ system("echo 1337"); | |||
| 13 | 42 | 13 | 42 |
| 14 | 1337 | 14 | 1337 |
| 15 | 15 | ||
| 16 | Fatal error: [snuffleupagus][0.0.0.0][disabled_function] Aborted execution on return of the function 'system', because the function returned '1337', which matched a rule in %a/disabled_functions_name_r.php on line 3 \ No newline at end of file | 16 | Fatal error: [snuffleupagus][0.0.0.0][disabled_function][drop] Aborted execution on return of the function 'system', because the function returned '1337', which matched a rule in %a/disabled_functions_name_r.php on line 3 |
diff --git a/src/tests/disable_function/disabled_functions_name_regexp_type.phpt b/src/tests/disable_function/disabled_functions_name_regexp_type.phpt index 0bcb28c..25ac2b3 100644 --- a/src/tests/disable_function/disabled_functions_name_regexp_type.phpt +++ b/src/tests/disable_function/disabled_functions_name_regexp_type.phpt | |||
| @@ -1,7 +1,8 @@ | |||
| 1 | --TEST-- | 1 | --TEST-- |
| 2 | Disable functions | 2 | Disable functions |
| 3 | --SKIPIF-- | 3 | --SKIPIF-- |
| 4 | <?php if (!extension_loaded("snuffleupagus")) die "skip"; ?> | 4 | <?php if (!extension_loaded("snuffleupagus")) print "skip"; ?> |
| 5 | <?php if (PHP_VERSION_ID >= 80000) print "skip"; ?> | ||
| 5 | --INI-- | 6 | --INI-- |
| 6 | sp.configuration_file={PWD}/config/config_disabled_functions_name_regexp_type.ini | 7 | sp.configuration_file={PWD}/config/config_disabled_functions_name_regexp_type.ini |
| 7 | --FILE-- | 8 | --FILE-- |
| @@ -14,4 +15,4 @@ echo strcmp([1], "pouet") . "\n"; | |||
| 14 | 0 | 15 | 0 |
| 15 | -1 | 16 | -1 |
| 16 | 17 | ||
| 17 | Fatal error: [snuffleupagus][0.0.0.0][disabled_function] Aborted execution on call of the function 'strcmp', because its argument 'str1' content (?) matched a rule in %a/disabled_functions_name_regexp_type.php on line 4 \ No newline at end of file | 18 | Fatal error: [snuffleupagus][0.0.0.0][disabled_function][drop] Aborted execution on call of the function 'strcmp', because its argument 'str1' content (?) matched a rule in %a/disabled_functions_name_regexp_type.php on line 4 |
diff --git a/src/tests/disable_function/disabled_functions_name_type.phpt b/src/tests/disable_function/disabled_functions_name_type.phpt index 59b4683..8d70eaa 100644 --- a/src/tests/disable_function/disabled_functions_name_type.phpt +++ b/src/tests/disable_function/disabled_functions_name_type.phpt | |||
| @@ -1,7 +1,8 @@ | |||
| 1 | --TEST-- | 1 | --TEST-- |
| 2 | Disable functions | 2 | Disable functions |
| 3 | --SKIPIF-- | 3 | --SKIPIF-- |
| 4 | <?php if (!extension_loaded("snuffleupagus")) die "skip"; ?> | 4 | <?php if (!extension_loaded("snuffleupagus")) print "skip"; ?> |
| 5 | <?php if (PHP_VERSION_ID >= 80000) print "skip"; ?> | ||
| 5 | --INI-- | 6 | --INI-- |
| 6 | sp.configuration_file={PWD}/config/config_disabled_functions_name_type.ini | 7 | sp.configuration_file={PWD}/config/config_disabled_functions_name_type.ini |
| 7 | --FILE-- | 8 | --FILE-- |
| @@ -12,4 +13,4 @@ echo strcmp([1,23], "pouet") . "\n"; | |||
| 12 | --EXPECTF-- | 13 | --EXPECTF-- |
| 13 | 0 | 14 | 0 |
| 14 | 15 | ||
| 15 | Fatal error: [snuffleupagus][0.0.0.0][disabled_function] Aborted execution on call of the function 'strcmp', because its argument '$str1' content (ARRAY) matched a rule in %a/disabled_functions_name_type.php on line 3 \ No newline at end of file | 16 | Fatal error: [snuffleupagus][0.0.0.0][disabled_function][drop] Aborted execution on call of the function 'strcmp', because its argument '$str1' content (ARRAY) matched a rule in %a/disabled_functions_name_type.php on line 3 |
diff --git a/src/tests/disable_function/disabled_functions_namespace.phpt b/src/tests/disable_function/disabled_functions_namespace.phpt index af310c3..c169487 100644 --- a/src/tests/disable_function/disabled_functions_namespace.phpt +++ b/src/tests/disable_function/disabled_functions_namespace.phpt | |||
| @@ -1,7 +1,7 @@ | |||
| 1 | --TEST-- | 1 | --TEST-- |
| 2 | Disable functions in namespaces | 2 | Disable functions in namespaces |
| 3 | --SKIPIF-- | 3 | --SKIPIF-- |
| 4 | <?php if (!extension_loaded("snuffleupagus")) die "skip"; ?> | 4 | <?php if (!extension_loaded("snuffleupagus")) print "skip"; ?> |
| 5 | --INI-- | 5 | --INI-- |
| 6 | sp.configuration_file={PWD}/config/config_disabled_functions_namespace.ini | 6 | sp.configuration_file={PWD}/config/config_disabled_functions_namespace.ini |
| 7 | --FILE-- | 7 | --FILE-- |
| @@ -27,4 +27,4 @@ my_function(); | |||
| 27 | } | 27 | } |
| 28 | ?> | 28 | ?> |
| 29 | --EXPECTF-- | 29 | --EXPECTF-- |
| 30 | Fatal error: [snuffleupagus][0.0.0.0][disabled_function] Aborted execution on call of the function 'strcmp' in %a/disabled_functions_namespace.php on line 16 \ No newline at end of file | 30 | Fatal error: [snuffleupagus][0.0.0.0][disabled_function][drop] Aborted execution on call of the function 'strcmp' in %a/disabled_functions_namespace.php on line 16 \ No newline at end of file |
diff --git a/src/tests/disable_function/disabled_functions_noconf.phpt b/src/tests/disable_function/disabled_functions_noconf.phpt index cb13413..8e2306a 100644 --- a/src/tests/disable_function/disabled_functions_noconf.phpt +++ b/src/tests/disable_function/disabled_functions_noconf.phpt | |||
| @@ -1,7 +1,7 @@ | |||
| 1 | --TEST-- | 1 | --TEST-- |
| 2 | Disable functions | 2 | Disable functions |
| 3 | --SKIPIF-- | 3 | --SKIPIF-- |
| 4 | <?php if (!extension_loaded("snuffleupagus")) die "skip"; ?> | 4 | <?php if (!extension_loaded("snuffleupagus")) print "skip"; ?> |
| 5 | --INI-- | 5 | --INI-- |
| 6 | sp.configuration_file={PWD}/config/empty.ini | 6 | sp.configuration_file={PWD}/config/empty.ini |
| 7 | --FILE-- | 7 | --FILE-- |
diff --git a/src/tests/disable_function/disabled_functions_nul_byte.phpt b/src/tests/disable_function/disabled_functions_nul_byte.phpt index dbb7600..62f4ab5 100644 --- a/src/tests/disable_function/disabled_functions_nul_byte.phpt +++ b/src/tests/disable_function/disabled_functions_nul_byte.phpt | |||
| @@ -1,7 +1,7 @@ | |||
| 1 | --TEST-- | 1 | --TEST-- |
| 2 | Disable functions with nul byte | 2 | Disable functions with nul byte |
| 3 | --SKIPIF-- | 3 | --SKIPIF-- |
| 4 | <?php if (!extension_loaded("snuffleupagus")) die "skip"; ?> | 4 | <?php if (!extension_loaded("snuffleupagus")) print "skip"; ?> |
| 5 | --INI-- | 5 | --INI-- |
| 6 | sp.configuration_file={PWD}/config/config_disabled_functions_nul_byte.ini | 6 | sp.configuration_file={PWD}/config/config_disabled_functions_nul_byte.ini |
| 7 | --FILE-- | 7 | --FILE-- |
| @@ -11,4 +11,4 @@ system("id"); | |||
| 11 | 11 | ||
| 12 | ?> | 12 | ?> |
| 13 | --EXPECTF-- | 13 | --EXPECTF-- |
| 14 | Fatal error: [snuffleupagus][0.0.0.0][disabled_function] Aborted execution on call of the function 'system', because its argument '$command' content (0id) matched a rule in %a/disabled_functions_nul_byte.php on line 2 \ No newline at end of file | 14 | Fatal error: [snuffleupagus][0.0.0.0][disabled_function][drop] Aborted execution on call of the function 'system', because its argument '$command' content (0id) matched a rule in %a/disabled_functions_nul_byte.php on line 2 |
diff --git a/src/tests/disable_function/disabled_functions_param.phpt b/src/tests/disable_function/disabled_functions_param.phpt index 4bc276a..0a9e8eb 100644 --- a/src/tests/disable_function/disabled_functions_param.phpt +++ b/src/tests/disable_function/disabled_functions_param.phpt | |||
| @@ -1,7 +1,7 @@ | |||
| 1 | --TEST-- | 1 | --TEST-- |
| 2 | Disable functions | 2 | Disable functions |
| 3 | --SKIPIF-- | 3 | --SKIPIF-- |
| 4 | <?php if (!extension_loaded("snuffleupagus")) die "skip"; ?> | 4 | <?php if (!extension_loaded("snuffleupagus")) print "skip"; ?> |
| 5 | --INI-- | 5 | --INI-- |
| 6 | sp.configuration_file={PWD}/config/config_disabled_functions_param.ini | 6 | sp.configuration_file={PWD}/config/config_disabled_functions_param.ini |
| 7 | --FILE-- | 7 | --FILE-- |
| @@ -15,4 +15,4 @@ strcmp("bla", "ble"); | |||
| 15 | strncmp("bla", "ble", 2); | 15 | strncmp("bla", "ble", 2); |
| 16 | ?> | 16 | ?> |
| 17 | --EXPECTF-- | 17 | --EXPECTF-- |
| 18 | Fatal error: [snuffleupagus][0.0.0.0][disabled_function] Aborted execution on call of the function 'system', because its argument '$command' content (id) matched the rule '1' in %a/disabled_functions_param.php on line 2 \ No newline at end of file | 18 | Fatal error: [snuffleupagus][0.0.0.0][disabled_function][drop] Aborted execution on call of the function 'system', because its argument '$command' content (id) matched the rule '1' in %a/disabled_functions_param.php on line 2 |
diff --git a/src/tests/disable_function/disabled_functions_param_alias.phpt b/src/tests/disable_function/disabled_functions_param_alias.phpt index 1d44e72..334570b 100644 --- a/src/tests/disable_function/disabled_functions_param_alias.phpt +++ b/src/tests/disable_function/disabled_functions_param_alias.phpt | |||
| @@ -1,7 +1,7 @@ | |||
| 1 | --TEST-- | 1 | --TEST-- |
| 2 | Disable functions - alias | 2 | Disable functions - alias |
| 3 | --SKIPIF-- | 3 | --SKIPIF-- |
| 4 | <?php if (!extension_loaded("snuffleupagus")) die "skip"; ?> | 4 | <?php if (!extension_loaded("snuffleupagus")) print "skip"; ?> |
| 5 | --INI-- | 5 | --INI-- |
| 6 | sp.configuration_file={PWD}/config/config_disabled_functions_param_alias.ini | 6 | sp.configuration_file={PWD}/config/config_disabled_functions_param_alias.ini |
| 7 | --FILE-- | 7 | --FILE-- |
| @@ -10,4 +10,4 @@ system("id"); | |||
| 10 | shell_exec("id"); | 10 | shell_exec("id"); |
| 11 | ?> | 11 | ?> |
| 12 | --EXPECTF-- | 12 | --EXPECTF-- |
| 13 | Fatal error: [snuffleupagus][0.0.0.0][disabled_function] Aborted execution on call of the function 'system', because of the the rule '1' in %a/disabled_functions_param_alias.php on line 2 \ No newline at end of file | 13 | Fatal error: [snuffleupagus][0.0.0.0][disabled_function][drop] Aborted execution on call of the function 'system', because of the the rule '1' in %a/disabled_functions_param_alias.php on line 2 \ No newline at end of file |
diff --git a/src/tests/disable_function/disabled_functions_param_allow.phpt b/src/tests/disable_function/disabled_functions_param_allow.phpt index b0e7de1..3555d19 100644 --- a/src/tests/disable_function/disabled_functions_param_allow.phpt +++ b/src/tests/disable_function/disabled_functions_param_allow.phpt | |||
| @@ -1,7 +1,7 @@ | |||
| 1 | --TEST-- | 1 | --TEST-- |
| 2 | Disable functions - allow | 2 | Disable functions - allow |
| 3 | --SKIPIF-- | 3 | --SKIPIF-- |
| 4 | <?php if (!extension_loaded("snuffleupagus")) die "skip"; ?> | 4 | <?php if (!extension_loaded("snuffleupagus")) print "skip"; ?> |
| 5 | --INI-- | 5 | --INI-- |
| 6 | sp.configuration_file={PWD}/config/config_disabled_functions_param_allow.ini | 6 | sp.configuration_file={PWD}/config/config_disabled_functions_param_allow.ini |
| 7 | --FILE-- | 7 | --FILE-- |
| @@ -12,4 +12,4 @@ system("id"); | |||
| 12 | --EXPECTF-- | 12 | --EXPECTF-- |
| 13 | win | 13 | win |
| 14 | 14 | ||
| 15 | Fatal error: [snuffleupagus][0.0.0.0][disabled_function] Aborted execution on call of the function 'system' in %a/disabled_functions_param_allow.php on line 3 \ No newline at end of file | 15 | Fatal error: [snuffleupagus][0.0.0.0][disabled_function][drop] Aborted execution on call of the function 'system' in %a/disabled_functions_param_allow.php on line 3 |
diff --git a/src/tests/disable_function/disabled_functions_param_array.phpt b/src/tests/disable_function/disabled_functions_param_array.phpt index 2053b14..c8bca3a 100644 --- a/src/tests/disable_function/disabled_functions_param_array.phpt +++ b/src/tests/disable_function/disabled_functions_param_array.phpt | |||
| @@ -1,7 +1,7 @@ | |||
| 1 | --TEST-- | 1 | --TEST-- |
| 2 | Disable functions | 2 | Disable functions |
| 3 | --SKIPIF-- | 3 | --SKIPIF-- |
| 4 | <?php if (!extension_loaded("snuffleupagus")) die "skip"; ?> | 4 | <?php if (!extension_loaded("snuffleupagus")) print "skip"; ?> |
| 5 | --INI-- | 5 | --INI-- |
| 6 | sp.configuration_file={PWD}/config/config_disabled_functions_param_array.ini | 6 | sp.configuration_file={PWD}/config/config_disabled_functions_param_array.ini |
| 7 | --FILE-- | 7 | --FILE-- |
| @@ -22,4 +22,4 @@ foo($a); | |||
| 22 | test1 | 22 | test1 |
| 23 | abcde | 23 | abcde |
| 24 | 24 | ||
| 25 | Fatal error: [snuffleupagus][0.0.0.0][disabled_function] Aborted execution on call of the function 'foo', because its argument '$arr' content (abcd) matched the rule '1' in %a/disabled_functions_param_array.php on line 3 \ No newline at end of file | 25 | Fatal error: [snuffleupagus][0.0.0.0][disabled_function][drop] Aborted execution on call of the function 'foo', because its argument '$arr' content (abcd) matched the rule '1' in %a/disabled_functions_param_array.php on line 3 |
diff --git a/src/tests/disable_function/disabled_functions_param_array_deref.phpt b/src/tests/disable_function/disabled_functions_param_array_deref.phpt index f162d47..e2efc79 100644 --- a/src/tests/disable_function/disabled_functions_param_array_deref.phpt +++ b/src/tests/disable_function/disabled_functions_param_array_deref.phpt | |||
| @@ -1,7 +1,7 @@ | |||
| 1 | --TEST-- | 1 | --TEST-- |
| 2 | Disable functions | 2 | Disable functions |
| 3 | --SKIPIF-- | 3 | --SKIPIF-- |
| 4 | <?php if (!extension_loaded("snuffleupagus")) die "skip"; ?> | 4 | <?php if (!extension_loaded("snuffleupagus")) print "skip"; ?> |
| 5 | --INI-- | 5 | --INI-- |
| 6 | sp.configuration_file={PWD}/config/config_disabled_functions_param_array.ini | 6 | sp.configuration_file={PWD}/config/config_disabled_functions_param_array.ini |
| 7 | --FILE-- | 7 | --FILE-- |
| @@ -23,4 +23,4 @@ foo($a); | |||
| 23 | eee | 23 | eee |
| 24 | abcdef | 24 | abcdef |
| 25 | 25 | ||
| 26 | Fatal error: [snuffleupagus][0.0.0.0][disabled_function] Aborted execution on call of the function 'foo', because its argument '$arr' content (abcdef) matched the rule '2' in %a/disabled_functions_param_array_deref.php on line 3 \ No newline at end of file | 26 | Fatal error: [snuffleupagus][0.0.0.0][disabled_function][drop] Aborted execution on call of the function 'foo', because its argument '$arr' content (abcdef) matched the rule '2' in %a/disabled_functions_param_array_deref.php on line 3 |
diff --git a/src/tests/disable_function/disabled_functions_param_array_no_value.phpt b/src/tests/disable_function/disabled_functions_param_array_no_value.phpt index 549842f..c857aa0 100644 --- a/src/tests/disable_function/disabled_functions_param_array_no_value.phpt +++ b/src/tests/disable_function/disabled_functions_param_array_no_value.phpt | |||
| @@ -1,7 +1,7 @@ | |||
| 1 | --TEST-- | 1 | --TEST-- |
| 2 | Disable functions - matching on an array's variable only | 2 | Disable functions - matching on an array's variable only |
| 3 | --SKIPIF-- | 3 | --SKIPIF-- |
| 4 | <?php if (!extension_loaded("snuffleupagus")) die "skip"; ?> | 4 | <?php if (!extension_loaded("snuffleupagus")) print "skip"; ?> |
| 5 | --INI-- | 5 | --INI-- |
| 6 | sp.configuration_file={PWD}/config/config_disabled_functions_param_array.ini | 6 | sp.configuration_file={PWD}/config/config_disabled_functions_param_array.ini |
| 7 | --FILE-- | 7 | --FILE-- |
| @@ -20,4 +20,4 @@ foo($a); | |||
| 20 | --EXPECTF-- | 20 | --EXPECTF-- |
| 21 | cccc | 21 | cccc |
| 22 | 22 | ||
| 23 | Fatal error: [snuffleupagus][0.0.0.0][disabled_function] Aborted execution on call of the function 'foo', because its argument '$arr' content (aaa) matched the rule '3' in %a/disabled_functions_param_array_no_value.php on line 3 \ No newline at end of file | 23 | Fatal error: [snuffleupagus][0.0.0.0][disabled_function][drop] Aborted execution on call of the function 'foo', because its argument '$arr' content (aaa) matched the rule '3' in %a/disabled_functions_param_array_no_value.php on line 3 |
diff --git a/src/tests/disable_function/disabled_functions_param_array_r.phpt b/src/tests/disable_function/disabled_functions_param_array_r.phpt index 6c11c63..69f729f 100644 --- a/src/tests/disable_function/disabled_functions_param_array_r.phpt +++ b/src/tests/disable_function/disabled_functions_param_array_r.phpt | |||
| @@ -1,7 +1,7 @@ | |||
| 1 | --TEST-- | 1 | --TEST-- |
| 2 | Disable functions - match on an array using regexp | 2 | Disable functions - match on an array using regexp |
| 3 | --SKIPIF-- | 3 | --SKIPIF-- |
| 4 | <?php if (!extension_loaded("snuffleupagus")) die "skip"; ?> | 4 | <?php if (!extension_loaded("snuffleupagus")) print "skip"; ?> |
| 5 | --INI-- | 5 | --INI-- |
| 6 | sp.configuration_file={PWD}/config/config_disabled_functions_param_r_array.ini | 6 | sp.configuration_file={PWD}/config/config_disabled_functions_param_r_array.ini |
| 7 | --FILE-- | 7 | --FILE-- |
| @@ -18,4 +18,4 @@ foo($a); | |||
| 18 | --EXPECTF-- | 18 | --EXPECTF-- |
| 19 | cccc | 19 | cccc |
| 20 | 20 | ||
| 21 | Fatal error: [snuffleupagus][0.0.0.0][disabled_function] Aborted execution on call of the function 'foo', because its argument 'arr' content (ARRAY) matched the rule '1' in %a/disabled_functions_param_array_r.php on line 3 \ No newline at end of file | 21 | Fatal error: [snuffleupagus][0.0.0.0][disabled_function][drop] Aborted execution on call of the function 'foo', because its argument 'arr' content (ARRAY) matched the rule '1' in %a/disabled_functions_param_array_r.php on line 3 |
diff --git a/src/tests/disable_function/disabled_functions_param_array_r_keys.phpt b/src/tests/disable_function/disabled_functions_param_array_r_keys.phpt index 3fdd398..e4912df 100644 --- a/src/tests/disable_function/disabled_functions_param_array_r_keys.phpt +++ b/src/tests/disable_function/disabled_functions_param_array_r_keys.phpt | |||
| @@ -1,7 +1,7 @@ | |||
| 1 | --TEST-- | 1 | --TEST-- |
| 2 | Disable functions - match on an array using regexp | 2 | Disable functions - match on an array using regexp |
| 3 | --SKIPIF-- | 3 | --SKIPIF-- |
| 4 | <?php if (!extension_loaded("snuffleupagus")) die "skip"; ?> | 4 | <?php if (!extension_loaded("snuffleupagus")) print "skip"; ?> |
| 5 | --INI-- | 5 | --INI-- |
| 6 | sp.configuration_file={PWD}/config/config_disabled_functions_param_r_array.ini | 6 | sp.configuration_file={PWD}/config/config_disabled_functions_param_r_array.ini |
| 7 | --FILE-- | 7 | --FILE-- |
| @@ -18,4 +18,4 @@ foo($a); | |||
| 18 | --EXPECTF-- | 18 | --EXPECTF-- |
| 19 | cccc | 19 | cccc |
| 20 | 20 | ||
| 21 | Fatal error: [snuffleupagus][0.0.0.0][disabled_function] Aborted execution on call of the function 'foo', because its argument 'arr' content (ARRAY) matched the rule '2' in %a/disabled_functions_param_array_r_keys.php on line 3 \ No newline at end of file | 21 | Fatal error: [snuffleupagus][0.0.0.0][disabled_function][drop] Aborted execution on call of the function 'foo', because its argument 'arr' content (ARRAY) matched the rule '2' in %a/disabled_functions_param_array_r_keys.php on line 3 \ No newline at end of file |
diff --git a/src/tests/disable_function/disabled_functions_param_array_several_levels.phpt b/src/tests/disable_function/disabled_functions_param_array_several_levels.phpt index 7d7d727..a642f2b 100644 --- a/src/tests/disable_function/disabled_functions_param_array_several_levels.phpt +++ b/src/tests/disable_function/disabled_functions_param_array_several_levels.phpt | |||
| @@ -1,7 +1,7 @@ | |||
| 1 | --TEST-- | 1 | --TEST-- |
| 2 | Disable functions - match on an array value buried in several levels | 2 | Disable functions - match on an array value buried in several levels |
| 3 | --SKIPIF-- | 3 | --SKIPIF-- |
| 4 | <?php if (!extension_loaded("snuffleupagus")) die "skip"; ?> | 4 | <?php if (!extension_loaded("snuffleupagus")) print "skip"; ?> |
| 5 | --INI-- | 5 | --INI-- |
| 6 | sp.configuration_file={PWD}/config/config_disabled_functions_param_array.ini | 6 | sp.configuration_file={PWD}/config/config_disabled_functions_param_array.ini |
| 7 | --FILE-- | 7 | --FILE-- |
| @@ -18,4 +18,4 @@ foo($a); | |||
| 18 | --EXPECTF-- | 18 | --EXPECTF-- |
| 19 | cccc | 19 | cccc |
| 20 | 20 | ||
| 21 | Fatal error: [snuffleupagus][0.0.0.0][disabled_function] Aborted execution on call of the function 'foo', because its argument '$arr' content (ARRAY) matched the rule '4' in %a/disabled_functions_param_array_several_levels.php on line 3 \ No newline at end of file | 21 | Fatal error: [snuffleupagus][0.0.0.0][disabled_function][drop] Aborted execution on call of the function 'foo', because its argument '$arr' content (ARRAY) matched the rule '4' in %a/disabled_functions_param_array_several_levels.php on line 3 |
diff --git a/src/tests/disable_function/disabled_functions_param_array_several_levels_int.phpt b/src/tests/disable_function/disabled_functions_param_array_several_levels_int.phpt index c22b912..01f0a36 100644 --- a/src/tests/disable_function/disabled_functions_param_array_several_levels_int.phpt +++ b/src/tests/disable_function/disabled_functions_param_array_several_levels_int.phpt | |||
| @@ -1,7 +1,7 @@ | |||
| 1 | --TEST-- | 1 | --TEST-- |
| 2 | Disable functions - match on an array value buried in several levels | 2 | Disable functions - match on an array value buried in several levels |
| 3 | --SKIPIF-- | 3 | --SKIPIF-- |
| 4 | <?php if (!extension_loaded("snuffleupagus")) die "skip"; ?> | 4 | <?php if (!extension_loaded("snuffleupagus")) print "skip"; ?> |
| 5 | --INI-- | 5 | --INI-- |
| 6 | sp.configuration_file={PWD}/config/config_disabled_functions_param_array.ini | 6 | sp.configuration_file={PWD}/config/config_disabled_functions_param_array.ini |
| 7 | --FILE-- | 7 | --FILE-- |
| @@ -18,4 +18,4 @@ foo($a); | |||
| 18 | --EXPECTF-- | 18 | --EXPECTF-- |
| 19 | cccc | 19 | cccc |
| 20 | 20 | ||
| 21 | Fatal error: [snuffleupagus][0.0.0.0][disabled_function] Aborted execution on call of the function 'foo', because its argument '$arr' content (ARRAY) matched the rule '4' in %a/disabled_functions_param_array_several_levels_int.php on line 3 \ No newline at end of file | 21 | Fatal error: [snuffleupagus][0.0.0.0][disabled_function][drop] Aborted execution on call of the function 'foo', because its argument '$arr' content (ARRAY) matched the rule '4' in %a/disabled_functions_param_array_several_levels_int.php on line 3 |
diff --git a/src/tests/disable_function/disabled_functions_param_array_several_levels_keys.phpt b/src/tests/disable_function/disabled_functions_param_array_several_levels_keys.phpt index f662d11..c2a66ee 100644 --- a/src/tests/disable_function/disabled_functions_param_array_several_levels_keys.phpt +++ b/src/tests/disable_function/disabled_functions_param_array_several_levels_keys.phpt | |||
| @@ -1,7 +1,7 @@ | |||
| 1 | --TEST-- | 1 | --TEST-- |
| 2 | Disable functions - match on an array value buried in several levels | 2 | Disable functions - match on an array value buried in several levels |
| 3 | --SKIPIF-- | 3 | --SKIPIF-- |
| 4 | <?php if (!extension_loaded("snuffleupagus")) die "skip"; ?> | 4 | <?php if (!extension_loaded("snuffleupagus")) print "skip"; ?> |
| 5 | --INI-- | 5 | --INI-- |
| 6 | sp.configuration_file={PWD}/config/config_disabled_functions_param_array.ini | 6 | sp.configuration_file={PWD}/config/config_disabled_functions_param_array.ini |
| 7 | --FILE-- | 7 | --FILE-- |
| @@ -18,4 +18,4 @@ foo($a); | |||
| 18 | --EXPECTF-- | 18 | --EXPECTF-- |
| 19 | cccc | 19 | cccc |
| 20 | 20 | ||
| 21 | Fatal error: [snuffleupagus][0.0.0.0][disabled_function] Aborted execution on call of the function 'foo', because its argument '$arr' content (ARRAY) matched the rule '5' in %a/disabled_functions_param_array_several_levels_keys.php on line 3 \ No newline at end of file | 21 | Fatal error: [snuffleupagus][0.0.0.0][disabled_function][drop] Aborted execution on call of the function 'foo', because its argument '$arr' content (ARRAY) matched the rule '5' in %a/disabled_functions_param_array_several_levels_keys.php on line 3 |
diff --git a/src/tests/disable_function/disabled_functions_param_array_several_levels_keys_int.phpt b/src/tests/disable_function/disabled_functions_param_array_several_levels_keys_int.phpt index 9ede4d8..27bbe24 100644 --- a/src/tests/disable_function/disabled_functions_param_array_several_levels_keys_int.phpt +++ b/src/tests/disable_function/disabled_functions_param_array_several_levels_keys_int.phpt | |||
| @@ -1,7 +1,7 @@ | |||
| 1 | --TEST-- | 1 | --TEST-- |
| 2 | Disable functions - match on an array value buried in several levels | 2 | Disable functions - match on an array value buried in several levels |
| 3 | --SKIPIF-- | 3 | --SKIPIF-- |
| 4 | <?php if (!extension_loaded("snuffleupagus")) die "skip"; ?> | 4 | <?php if (!extension_loaded("snuffleupagus")) print "skip"; ?> |
| 5 | --INI-- | 5 | --INI-- |
| 6 | sp.configuration_file={PWD}/config/config_disabled_functions_param_array.ini | 6 | sp.configuration_file={PWD}/config/config_disabled_functions_param_array.ini |
| 7 | --FILE-- | 7 | --FILE-- |
| @@ -18,4 +18,4 @@ foo($a); | |||
| 18 | --EXPECTF-- | 18 | --EXPECTF-- |
| 19 | cccc | 19 | cccc |
| 20 | 20 | ||
| 21 | Fatal error: [snuffleupagus][0.0.0.0][disabled_function] Aborted execution on call of the function 'foo', because its argument '$arr' content (ARRAY) matched the rule '6' in %a/disabled_functions_param_array_several_levels_keys_int.php on line 3 \ No newline at end of file | 21 | Fatal error: [snuffleupagus][0.0.0.0][disabled_function][drop] Aborted execution on call of the function 'foo', because its argument '$arr' content (ARRAY) matched the rule '6' in %a/disabled_functions_param_array_several_levels_keys_int.php on line 3 |
diff --git a/src/tests/disable_function/disabled_functions_param_broken_line.phpt b/src/tests/disable_function/disabled_functions_param_broken_line.phpt index f7a379d..806816d 100644 --- a/src/tests/disable_function/disabled_functions_param_broken_line.phpt +++ b/src/tests/disable_function/disabled_functions_param_broken_line.phpt | |||
| @@ -1,7 +1,8 @@ | |||
| 1 | --TEST-- | 1 | --TEST-- |
| 2 | Disable functions - match on a specific line - broken configuration | 2 | Disable functions - match on a specific line - broken configuration |
| 3 | --SKIPIF-- | 3 | --SKIPIF-- |
| 4 | <?php if (!extension_loaded("snuffleupagus")) die "skip"; ?> | 4 | <?php if (!extension_loaded("snuffleupagus")) print "skip"; ?> |
| 5 | <?php if (PHP_VERSION_ID >= 80000) print "skip"; ?> | ||
| 5 | --INI-- | 6 | --INI-- |
| 6 | sp.configuration_file={PWD}/config/disabled_functions_broken_line.ini | 7 | sp.configuration_file={PWD}/config/disabled_functions_broken_line.ini |
| 7 | --FILE-- | 8 | --FILE-- |
| @@ -10,9 +11,9 @@ system("echo 1337"); | |||
| 10 | system("echo 1338"); | 11 | system("echo 1338"); |
| 11 | ?> | 12 | ?> |
| 12 | --EXPECTF-- | 13 | --EXPECTF-- |
| 13 | PHP Fatal error: [snuffleupagus][0.0.0.0][config] Failed to parse arg 'qwe' of `line` on line 1 in Unknown on line 0 | 14 | PHP Fatal error: [snuffleupagus][0.0.0.0][config][log] Failed to parse arg 'qwe' of `line` on line 1 in Unknown on line 0 |
| 14 | 15 | ||
| 15 | Fatal error: [snuffleupagus][0.0.0.0][config] Failed to parse arg 'qwe' of `line` on line 1 in Unknown on line 0 | 16 | Fatal error: [snuffleupagus][0.0.0.0][config][log] Failed to parse arg 'qwe' of `line` on line 1 in Unknown on line 0 |
| 16 | 17 | ||
| 17 | Fatal error: [snuffleupagus][0.0.0.0][config] Invalid configuration file in Unknown on line 0 | 18 | Fatal error: [snuffleupagus][0.0.0.0][config][log] Invalid configuration file in Unknown on line 0 |
| 18 | Could not startup. | 19 | Could not startup. |
diff --git a/src/tests/disable_function/disabled_functions_param_int.phpt b/src/tests/disable_function/disabled_functions_param_int.phpt index 4fa87e1..6c04849 100644 --- a/src/tests/disable_function/disabled_functions_param_int.phpt +++ b/src/tests/disable_function/disabled_functions_param_int.phpt | |||
| @@ -1,7 +1,7 @@ | |||
| 1 | --TEST-- | 1 | --TEST-- |
| 2 | Disable functions | 2 | Disable functions |
| 3 | --SKIPIF-- | 3 | --SKIPIF-- |
| 4 | <?php if (!extension_loaded("snuffleupagus")) die "skip"; ?> | 4 | <?php if (!extension_loaded("snuffleupagus")) print "skip"; ?> |
| 5 | --INI-- | 5 | --INI-- |
| 6 | sp.configuration_file={PWD}/config/config_disabled_functions_param_int.ini | 6 | sp.configuration_file={PWD}/config/config_disabled_functions_param_int.ini |
| 7 | --FILE-- | 7 | --FILE-- |
| @@ -19,4 +19,4 @@ foobar("10"); | |||
| 19 | --EXPECTF-- | 19 | --EXPECTF-- |
| 20 | 1 | 20 | 1 |
| 21 | 21 | ||
| 22 | Fatal error: [snuffleupagus][0.0.0.0][disabled_function] Aborted execution on call of the function 'foobar', because its argument '$id' content (42) matched a rule in %a/disabled_functions_param_int.php on line 3 \ No newline at end of file | 22 | Fatal error: [snuffleupagus][0.0.0.0][disabled_function][drop] Aborted execution on call of the function 'foobar', because its argument '$id' content (42) matched a rule in %a/disabled_functions_param_int.php on line 3 |
diff --git a/src/tests/disable_function/disabled_functions_param_invalid_pos.phpt b/src/tests/disable_function/disabled_functions_param_invalid_pos.phpt index 67da890..e409300 100644 --- a/src/tests/disable_function/disabled_functions_param_invalid_pos.phpt +++ b/src/tests/disable_function/disabled_functions_param_invalid_pos.phpt | |||
| @@ -1,7 +1,8 @@ | |||
| 1 | --TEST-- | 1 | --TEST-- |
| 2 | Disable functions - match on argument's position | 2 | Disable functions - match on argument's position |
| 3 | --SKIPIF-- | 3 | --SKIPIF-- |
| 4 | <?php if (!extension_loaded("snuffleupagus")) die "skip"; ?> | 4 | <?php if (!extension_loaded("snuffleupagus")) print "skip"; ?> |
| 5 | <?php if (PHP_VERSION_ID >= 80000) print "skip"; ?> | ||
| 5 | --INI-- | 6 | --INI-- |
| 6 | sp.configuration_file={PWD}/config/disabled_functions_invalid_pos.ini | 7 | sp.configuration_file={PWD}/config/disabled_functions_invalid_pos.ini |
| 7 | --FILE-- | 8 | --FILE-- |
| @@ -9,9 +10,9 @@ sp.configuration_file={PWD}/config/disabled_functions_invalid_pos.ini | |||
| 9 | system("echo 1"); | 10 | system("echo 1"); |
| 10 | ?> | 11 | ?> |
| 11 | --EXPECTF-- | 12 | --EXPECTF-- |
| 12 | PHP Fatal error: [snuffleupagus][0.0.0.0][config] Failed to parse arg 'qwe' of `pos` on line 1 in Unknown on line 0 | 13 | PHP Fatal error: [snuffleupagus][0.0.0.0][config][log] Failed to parse arg 'qwe' of `pos` on line 1 in Unknown on line 0 |
| 13 | 14 | ||
| 14 | Fatal error: [snuffleupagus][0.0.0.0][config] Failed to parse arg 'qwe' of `pos` on line 1 in Unknown on line 0 | 15 | Fatal error: [snuffleupagus][0.0.0.0][config][log] Failed to parse arg 'qwe' of `pos` on line 1 in Unknown on line 0 |
| 15 | 16 | ||
| 16 | Fatal error: [snuffleupagus][0.0.0.0][config] Invalid configuration file in Unknown on line 0 | 17 | Fatal error: [snuffleupagus][0.0.0.0][config][log] Invalid configuration file in Unknown on line 0 |
| 17 | Could not startup. | 18 | Could not startup. |
diff --git a/src/tests/disable_function/disabled_functions_param_line.phpt b/src/tests/disable_function/disabled_functions_param_line.phpt index 9d2daba..bbd8a9a 100644 --- a/src/tests/disable_function/disabled_functions_param_line.phpt +++ b/src/tests/disable_function/disabled_functions_param_line.phpt | |||
| @@ -1,7 +1,7 @@ | |||
| 1 | --TEST-- | 1 | --TEST-- |
| 2 | Disable functions - match on a specific line | 2 | Disable functions - match on a specific line |
| 3 | --SKIPIF-- | 3 | --SKIPIF-- |
| 4 | <?php if (!extension_loaded("snuffleupagus")) die "skip"; ?> | 4 | <?php if (!extension_loaded("snuffleupagus")) print "skip"; ?> |
| 5 | --INI-- | 5 | --INI-- |
| 6 | sp.configuration_file={PWD}/config/disabled_functions_line.ini | 6 | sp.configuration_file={PWD}/config/disabled_functions_line.ini |
| 7 | --FILE-- | 7 | --FILE-- |
| @@ -12,4 +12,4 @@ system("id"); | |||
| 12 | --EXPECTF-- | 12 | --EXPECTF-- |
| 13 | 1337 | 13 | 1337 |
| 14 | 14 | ||
| 15 | Fatal error: [snuffleupagus][0.0.0.0][disabled_function] Aborted execution on call of the function 'system' in %a/disabled_functions_param_line.php on line 3 \ No newline at end of file | 15 | Fatal error: [snuffleupagus][0.0.0.0][disabled_function][drop] Aborted execution on call of the function 'system' in %a/disabled_functions_param_line.php on line 3 \ No newline at end of file |
diff --git a/src/tests/disable_function/disabled_functions_param_pos.phpt b/src/tests/disable_function/disabled_functions_param_pos.phpt index 468c09e..bacca62 100644 --- a/src/tests/disable_function/disabled_functions_param_pos.phpt +++ b/src/tests/disable_function/disabled_functions_param_pos.phpt | |||
| @@ -1,7 +1,7 @@ | |||
| 1 | --TEST-- | 1 | --TEST-- |
| 2 | Disable functions - match on argument's position | 2 | Disable functions - match on argument's position |
| 3 | --SKIPIF-- | 3 | --SKIPIF-- |
| 4 | <?php if (!extension_loaded("snuffleupagus")) die "skip"; ?> | 4 | <?php if (!extension_loaded("snuffleupagus")) print "skip"; ?> |
| 5 | --INI-- | 5 | --INI-- |
| 6 | sp.configuration_file={PWD}/config/disabled_functions_pos.ini | 6 | sp.configuration_file={PWD}/config/disabled_functions_pos.ini |
| 7 | --FILE-- | 7 | --FILE-- |
| @@ -9,6 +9,6 @@ sp.configuration_file={PWD}/config/disabled_functions_pos.ini | |||
| 9 | system("id"); | 9 | system("id"); |
| 10 | ?> | 10 | ?> |
| 11 | --EXPECTF-- | 11 | --EXPECTF-- |
| 12 | Warning: [snuffleupagus][0.0.0.0][config] It seems that you wrote a rule filtering on the 1337th argument of the function 'system', but it takes only 1 arguments. Matching on _all_ arguments instead. in %a/disabled_functions_param_pos.php on line 2 | 12 | Warning: [snuffleupagus][0.0.0.0][config][log] It seems that you wrote a rule filtering on the 1337th argument of the function 'system', but it takes only 1 arguments. Matching on _all_ arguments instead. in %a/disabled_functions_param_pos.php on line 2 |
| 13 | 13 | ||
| 14 | Fatal error: [snuffleupagus][0.0.0.0][disabled_function] Aborted execution on call of the function 'system', because its argument 'command' content (id) matched a rule in %a/disabled_functions_param_pos.php on line %d | 14 | Fatal error: [snuffleupagus][0.0.0.0][disabled_function][drop] Aborted execution on call of the function 'system', because its argument 'command' content (id) matched a rule in %a/disabled_functions_param_pos.php on line %d |
diff --git a/src/tests/disable_function/disabled_functions_param_pos2.phpt b/src/tests/disable_function/disabled_functions_param_pos2.phpt index a33ffe6..06ab5aa 100644 --- a/src/tests/disable_function/disabled_functions_param_pos2.phpt +++ b/src/tests/disable_function/disabled_functions_param_pos2.phpt | |||
| @@ -1,7 +1,7 @@ | |||
| 1 | --TEST-- | 1 | --TEST-- |
| 2 | Disable functions - match on argument's position, not the first time | 2 | Disable functions - match on argument's position, not the first time |
| 3 | --SKIPIF-- | 3 | --SKIPIF-- |
| 4 | <?php if (!extension_loaded("snuffleupagus")) die "skip"; ?> | 4 | <?php if (!extension_loaded("snuffleupagus")) print "skip"; ?> |
| 5 | --INI-- | 5 | --INI-- |
| 6 | sp.configuration_file={PWD}/config/disabled_functions_pos.ini | 6 | sp.configuration_file={PWD}/config/disabled_functions_pos.ini |
| 7 | --FILE-- | 7 | --FILE-- |
| @@ -10,4 +10,4 @@ strtoupper("od"); | |||
| 10 | strtoupper("id"); | 10 | strtoupper("id"); |
| 11 | ?> | 11 | ?> |
| 12 | --EXPECTF-- | 12 | --EXPECTF-- |
| 13 | Fatal error: [snuffleupagus][0.0.0.0][disabled_function] Aborted execution on call of the function 'strtoupper', because its argument 'str' content (id) matched the rule 'strlen array' in %a/disabled_functions_param_pos2.php on line 3 \ No newline at end of file | 13 | Fatal error: [snuffleupagus][0.0.0.0][disabled_function][drop] Aborted execution on call of the function 'strtoupper', because its argument %s content (id) matched the rule 'strlen array' in %a/disabled_functions_param_pos2.php on line 3 |
diff --git a/src/tests/disable_function/disabled_functions_param_r.phpt b/src/tests/disable_function/disabled_functions_param_r.phpt index 1f066b6..3d8a362 100644 --- a/src/tests/disable_function/disabled_functions_param_r.phpt +++ b/src/tests/disable_function/disabled_functions_param_r.phpt | |||
| @@ -1,7 +1,7 @@ | |||
| 1 | --TEST-- | 1 | --TEST-- |
| 2 | Disable functions | 2 | Disable functions |
| 3 | --SKIPIF-- | 3 | --SKIPIF-- |
| 4 | <?php if (!extension_loaded("snuffleupagus")) die "skip"; ?> | 4 | <?php if (!extension_loaded("snuffleupagus")) print "skip"; ?> |
| 5 | --INI-- | 5 | --INI-- |
| 6 | sp.configuration_file={PWD}/config/config_disabled_functions_param_r.ini | 6 | sp.configuration_file={PWD}/config/config_disabled_functions_param_r.ini |
| 7 | --FILE-- | 7 | --FILE-- |
| @@ -10,4 +10,4 @@ system("id"); | |||
| 10 | system("echo win"); | 10 | system("echo win"); |
| 11 | ?> | 11 | ?> |
| 12 | --EXPECTF-- | 12 | --EXPECTF-- |
| 13 | Fatal error: [snuffleupagus][0.0.0.0][disabled_function] Aborted execution on call of the function 'system', because its argument 'command' content (id) matched a rule in %a/disabled_functions_param_r.php on line 2 \ No newline at end of file | 13 | Fatal error: [snuffleupagus][0.0.0.0][disabled_function][drop] Aborted execution on call of the function 'system', because its argument 'command' content (id) matched a rule in %a/disabled_functions_param_r.php on line 2 |
diff --git a/src/tests/disable_function/disabled_functions_param_str_representation.phpt b/src/tests/disable_function/disabled_functions_param_str_representation.phpt index 7cbdc0f..179ce93 100644 --- a/src/tests/disable_function/disabled_functions_param_str_representation.phpt +++ b/src/tests/disable_function/disabled_functions_param_str_representation.phpt | |||
| @@ -1,7 +1,8 @@ | |||
| 1 | --TEST-- | 1 | --TEST-- |
| 2 | Disable functions - casting various types to string internally | 2 | Disable functions - casting various types to string internally |
| 3 | --SKIPIF-- | 3 | --SKIPIF-- |
| 4 | <?php if (!extension_loaded("snuffleupagus")) die "skip"; ?> | 4 | <?php if (!extension_loaded("snuffleupagus")) print "skip"; ?> |
| 5 | <?php if (PHP_VERSION_ID >= 80000) print "skip"; ?> | ||
| 5 | --INI-- | 6 | --INI-- |
| 6 | sp.configuration_file={PWD}/config/config_disabled_functions_param_str_representation.ini | 7 | sp.configuration_file={PWD}/config/config_disabled_functions_param_str_representation.ini |
| 7 | --FILE-- | 8 | --FILE-- |
diff --git a/src/tests/disable_function/disabled_functions_parse_class.phpt b/src/tests/disable_function/disabled_functions_parse_class.phpt index af9ed88..e62fe40 100644 --- a/src/tests/disable_function/disabled_functions_parse_class.phpt +++ b/src/tests/disable_function/disabled_functions_parse_class.phpt | |||
| @@ -1,7 +1,7 @@ | |||
| 1 | --TEST-- | 1 | --TEST-- |
| 2 | Disable functions - Parsing of an Object as a return value of a function | 2 | Disable functions - Parsing of an Object as a return value of a function |
| 3 | --SKIPIF-- | 3 | --SKIPIF-- |
| 4 | <?php if (!extension_loaded("snuffleupagus")) die "skip"; ?> | 4 | <?php if (!extension_loaded("snuffleupagus")) print "skip"; ?> |
| 5 | --INI-- | 5 | --INI-- |
| 6 | sp.configuration_file={PWD}/config/disabled_functions_ret.ini | 6 | sp.configuration_file={PWD}/config/disabled_functions_ret.ini |
| 7 | --FILE-- | 7 | --FILE-- |
diff --git a/src/tests/disable_function/disabled_functions_pos_type.phpt b/src/tests/disable_function/disabled_functions_pos_type.phpt index b033e8a..ba134ad 100644 --- a/src/tests/disable_function/disabled_functions_pos_type.phpt +++ b/src/tests/disable_function/disabled_functions_pos_type.phpt | |||
| @@ -1,7 +1,7 @@ | |||
| 1 | --TEST-- | 1 | --TEST-- |
| 2 | Disable functions - match on argument's position | 2 | Disable functions - match on argument's position |
| 3 | --SKIPIF-- | 3 | --SKIPIF-- |
| 4 | <?php if (!extension_loaded("snuffleupagus")) die "skip"; ?> | 4 | <?php if (!extension_loaded("snuffleupagus")) print "skip"; ?> |
| 5 | --INI-- | 5 | --INI-- |
| 6 | sp.configuration_file={PWD}/config/disabled_functions_pos.ini | 6 | sp.configuration_file={PWD}/config/disabled_functions_pos.ini |
| 7 | --FILE-- | 7 | --FILE-- |
| @@ -9,8 +9,8 @@ sp.configuration_file={PWD}/config/disabled_functions_pos.ini | |||
| 9 | system([123, 456]); | 9 | system([123, 456]); |
| 10 | ?> | 10 | ?> |
| 11 | --EXPECTF-- | 11 | --EXPECTF-- |
| 12 | Warning: [snuffleupagus][0.0.0.0][config] It seems that you wrote a rule filtering on the 1337th argument of the function 'system', but it takes only 1 arguments. Matching on _all_ arguments instead. in %a/disabled_functions_pos_type.php on line %d | 12 | Warning: [snuffleupagus][0.0.0.0][config][log] It seems that you wrote a rule filtering on the 1337th argument of the function 'system', but it takes only 1 arguments. Matching on _all_ arguments instead. in %a/disabled_functions_pos_type.php on line %d |
| 13 | 13 | ||
| 14 | Warning: [snuffleupagus][0.0.0.0][config] It seems that you wrote a rule filtering on the 1st argument of the function 'system', but it takes only 1 arguments. Matching on _all_ arguments instead. in %a/disabled_functions_pos_type.php on line %d | 14 | Warning: [snuffleupagus][0.0.0.0][config][log] It seems that you wrote a rule filtering on the 1st argument of the function 'system', but it takes only 1 arguments. Matching on _all_ arguments instead. in %a/disabled_functions_pos_type.php on line %d |
| 15 | 15 | ||
| 16 | Fatal error: [snuffleupagus][0.0.0.0][disabled_function] Aborted execution on call of the function 'system', because its argument 'command' content (?) matched the rule '1' in %a/disabled_functions_pos_type.php on line %d | 16 | Fatal error: [snuffleupagus][0.0.0.0][disabled_function][drop] Aborted execution on call of the function 'system', because its argument 'command' content (?) matched the rule '1' in %a/disabled_functions_pos_type.php on line %d |
diff --git a/src/tests/disable_function/disabled_functions_regexp_multiple.phpt b/src/tests/disable_function/disabled_functions_regexp_multiple.phpt index e783c30..5f8b151 100644 --- a/src/tests/disable_function/disabled_functions_regexp_multiple.phpt +++ b/src/tests/disable_function/disabled_functions_regexp_multiple.phpt | |||
| @@ -1,7 +1,7 @@ | |||
| 1 | --TEST-- | 1 | --TEST-- |
| 2 | Disable functions | 2 | Disable functions |
| 3 | --SKIPIF-- | 3 | --SKIPIF-- |
| 4 | <?php if (!extension_loaded("snuffleupagus")) die "skip"; ?> | 4 | <?php if (!extension_loaded("snuffleupagus")) print "skip"; ?> |
| 5 | --INI-- | 5 | --INI-- |
| 6 | sp.configuration_file={PWD}/config/disabled_functions_regexp.ini | 6 | sp.configuration_file={PWD}/config/disabled_functions_regexp.ini |
| 7 | --FILE-- | 7 | --FILE-- |
| @@ -11,9 +11,9 @@ echo strcmp("1", "2") . "\n"; | |||
| 11 | print("After") . "\n"; | 11 | print("After") . "\n"; |
| 12 | ?> | 12 | ?> |
| 13 | --EXPECTF-- | 13 | --EXPECTF-- |
| 14 | Warning: [snuffleupagus][0.0.0.0][disabled_function] Aborted execution on call of the function 'strtoupper' in %a/disabled_functions_regexp_multiple.php on line 2 | 14 | Warning: [snuffleupagus][0.0.0.0][disabled_function][simulation] Aborted execution on call of the function 'strtoupper' in %a/disabled_functions_regexp_multiple.php on line 2 |
| 15 | ID | 15 | ID |
| 16 | 16 | ||
| 17 | Warning: [snuffleupagus][0.0.0.0][disabled_function] Aborted execution on call of the function 'strcmp' in %a/disabled_functions_regexp_multiple.php on line 3 | 17 | Warning: [snuffleupagus][0.0.0.0][disabled_function][simulation] Aborted execution on call of the function 'strcmp' in %a/disabled_functions_regexp_multiple.php on line 3 |
| 18 | -1 | 18 | -1 |
| 19 | After | 19 | After |
diff --git a/src/tests/disable_function/disabled_functions_register_shutdown_function.phpt b/src/tests/disable_function/disabled_functions_register_shutdown_function.phpt index 623cadf..f33bb42 100644 --- a/src/tests/disable_function/disabled_functions_register_shutdown_function.phpt +++ b/src/tests/disable_function/disabled_functions_register_shutdown_function.phpt | |||
| @@ -1,7 +1,7 @@ | |||
| 1 | --TEST-- | 1 | --TEST-- |
| 2 | Disable functions - Called with register_shutdown_function | 2 | Disable functions - Called with register_shutdown_function |
| 3 | --SKIPIF-- | 3 | --SKIPIF-- |
| 4 | <?php if (!extension_loaded("snuffleupagus")) die "skip"; ?> | 4 | <?php if (!extension_loaded("snuffleupagus")) print "skip"; ?> |
| 5 | --INI-- | 5 | --INI-- |
| 6 | sp.configuration_file={PWD}/config/config_disabled_user_functions.ini | 6 | sp.configuration_file={PWD}/config/config_disabled_user_functions.ini |
| 7 | --FILE-- | 7 | --FILE-- |
| @@ -15,4 +15,4 @@ register_shutdown_function('my_super_function'); | |||
| 15 | --EXPECTF-- | 15 | --EXPECTF-- |
| 16 | 1337 | 16 | 1337 |
| 17 | 17 | ||
| 18 | Fatal error: [snuffleupagus][0.0.0.0][disabled_function] Aborted execution on call of the function 'my_super_function' in %a/disabled_functions_register_shutdown_function.php on line 3 \ No newline at end of file | 18 | Fatal error: [snuffleupagus][0.0.0.0][disabled_function][drop] Aborted execution on call of the function 'my_super_function' in %a/disabled_functions_register_shutdown_function.php on line 3 \ No newline at end of file |
diff --git a/src/tests/disable_function/disabled_functions_register_tick_function.phpt b/src/tests/disable_function/disabled_functions_register_tick_function.phpt index 8e6331e..623e424 100644 --- a/src/tests/disable_function/disabled_functions_register_tick_function.phpt +++ b/src/tests/disable_function/disabled_functions_register_tick_function.phpt | |||
| @@ -1,7 +1,7 @@ | |||
| 1 | --TEST-- | 1 | --TEST-- |
| 2 | Disable functions - Called with register_tick_function | 2 | Disable functions - Called with register_tick_function |
| 3 | --SKIPIF-- | 3 | --SKIPIF-- |
| 4 | <?php if (!extension_loaded("snuffleupagus")) die "skip"; ?> | 4 | <?php if (!extension_loaded("snuffleupagus")) print "skip"; ?> |
| 5 | --INI-- | 5 | --INI-- |
| 6 | sp.configuration_file={PWD}/config/config_disabled_user_functions.ini | 6 | sp.configuration_file={PWD}/config/config_disabled_user_functions.ini |
| 7 | --FILE-- | 7 | --FILE-- |
| @@ -16,4 +16,4 @@ register_tick_function('my_super_function'); | |||
| 16 | --EXPECTF-- | 16 | --EXPECTF-- |
| 17 | 1337 | 17 | 1337 |
| 18 | 18 | ||
| 19 | Fatal error: [snuffleupagus][0.0.0.0][disabled_function] Aborted execution on call of the function 'my_super_function' in %a/disabled_functions_register_tick_function.php on line 4 \ No newline at end of file | 19 | Fatal error: [snuffleupagus][0.0.0.0][disabled_function][drop] Aborted execution on call of the function 'my_super_function' in %a/disabled_functions_register_tick_function.php on line 4 \ No newline at end of file |
diff --git a/src/tests/disable_function/disabled_functions_require.phpt b/src/tests/disable_function/disabled_functions_require.phpt index af146d3..df2b2f0 100644 --- a/src/tests/disable_function/disabled_functions_require.phpt +++ b/src/tests/disable_function/disabled_functions_require.phpt | |||
| @@ -1,7 +1,7 @@ | |||
| 1 | --TEST-- | 1 | --TEST-- |
| 2 | Disable functions - Require | 2 | Disable functions - Require |
| 3 | --SKIPIF-- | 3 | --SKIPIF-- |
| 4 | <?php if (!extension_loaded("snuffleupagus")) die "skip"; ?> | 4 | <?php if (!extension_loaded("snuffleupagus")) print "skip"; ?> |
| 5 | --INI-- | 5 | --INI-- |
| 6 | sp.configuration_file={PWD}/config/config_disabled_functions_require.ini | 6 | sp.configuration_file={PWD}/config/config_disabled_functions_require.ini |
| 7 | --FILE-- | 7 | --FILE-- |
| @@ -21,4 +21,4 @@ unlink($dir . '/test.meh'); | |||
| 21 | ?> | 21 | ?> |
| 22 | --EXPECTF-- | 22 | --EXPECTF-- |
| 23 | BLA | 23 | BLA |
| 24 | Fatal error: [snuffleupagus][0.0.0.0][disabled_function] Aborted execution on call of the function 'require', because its argument 'inclusion path' content (%a/test.meh) matched a rule in %a/disabled_functions_require.php on line 6 | 24 | Fatal error: [snuffleupagus][0.0.0.0][disabled_function][drop] Aborted execution on call of the function 'require', because its argument 'inclusion path' content (%a/test.meh) matched a rule in %a/disabled_functions_require.php on line 6 |
diff --git a/src/tests/disable_function/disabled_functions_require_allow.phpt b/src/tests/disable_function/disabled_functions_require_allow.phpt index 1e3bc56..7ab29aa 100644 --- a/src/tests/disable_function/disabled_functions_require_allow.phpt +++ b/src/tests/disable_function/disabled_functions_require_allow.phpt | |||
| @@ -1,7 +1,7 @@ | |||
| 1 | --TEST-- | 1 | --TEST-- |
| 2 | Disable functions - Require (allow) | 2 | Disable functions - Require (allow) |
| 3 | --SKIPIF-- | 3 | --SKIPIF-- |
| 4 | <?php if (!extension_loaded("snuffleupagus")) die "skip"; ?> | 4 | <?php if (!extension_loaded("snuffleupagus")) print "skip"; ?> |
| 5 | --INI-- | 5 | --INI-- |
| 6 | sp.configuration_file={PWD}/config/config_disabled_functions_require_allow.ini | 6 | sp.configuration_file={PWD}/config/config_disabled_functions_require_allow.ini |
| 7 | --FILE-- | 7 | --FILE-- |
diff --git a/src/tests/disable_function/disabled_functions_require_once.phpt b/src/tests/disable_function/disabled_functions_require_once.phpt index cd09671..7356c08 100644 --- a/src/tests/disable_function/disabled_functions_require_once.phpt +++ b/src/tests/disable_function/disabled_functions_require_once.phpt | |||
| @@ -1,7 +1,7 @@ | |||
| 1 | --TEST-- | 1 | --TEST-- |
| 2 | Disable functions - require_once | 2 | Disable functions - require_once |
| 3 | --SKIPIF-- | 3 | --SKIPIF-- |
| 4 | <?php if (!extension_loaded("snuffleupagus")) die "skip"; ?> | 4 | <?php if (!extension_loaded("snuffleupagus")) print "skip"; ?> |
| 5 | --INI-- | 5 | --INI-- |
| 6 | sp.configuration_file={PWD}/config/config_disabled_functions_require.ini | 6 | sp.configuration_file={PWD}/config/config_disabled_functions_require.ini |
| 7 | --FILE-- | 7 | --FILE-- |
| @@ -21,4 +21,4 @@ unlink($dir . '/test.meh'); | |||
| 21 | ?> | 21 | ?> |
| 22 | --EXPECTF-- | 22 | --EXPECTF-- |
| 23 | BLA | 23 | BLA |
| 24 | Fatal error: [snuffleupagus][0.0.0.0][disabled_function] Aborted execution on call of the function 'require_once', because its argument 'inclusion path' content (%a/test.meh) matched a rule in %a/disabled_functions_require_once.php on line 6 | 24 | Fatal error: [snuffleupagus][0.0.0.0][disabled_function][drop] Aborted execution on call of the function 'require_once', because its argument 'inclusion path' content (%a/test.meh) matched a rule in %a/disabled_functions_require_once.php on line 6 |
diff --git a/src/tests/disable_function/disabled_functions_require_simulation.phpt b/src/tests/disable_function/disabled_functions_require_simulation.phpt index 405bc18..fa1523c 100644 --- a/src/tests/disable_function/disabled_functions_require_simulation.phpt +++ b/src/tests/disable_function/disabled_functions_require_simulation.phpt | |||
| @@ -1,7 +1,7 @@ | |||
| 1 | --TEST-- | 1 | --TEST-- |
| 2 | Disable functions - Require (simulation) | 2 | Disable functions - Require (simulation) |
| 3 | --SKIPIF-- | 3 | --SKIPIF-- |
| 4 | <?php if (!extension_loaded("snuffleupagus")) die "skip"; ?> | 4 | <?php if (!extension_loaded("snuffleupagus")) print "skip"; ?> |
| 5 | --INI-- | 5 | --INI-- |
| 6 | sp.configuration_file={PWD}/config/config_disabled_functions_require.ini | 6 | sp.configuration_file={PWD}/config/config_disabled_functions_require.ini |
| 7 | --FILE-- | 7 | --FILE-- |
| @@ -22,6 +22,6 @@ unlink($dir . '/test.sim'); | |||
| 22 | --EXPECTF-- | 22 | --EXPECTF-- |
| 23 | BLA | 23 | BLA |
| 24 | 24 | ||
| 25 | Warning: [snuffleupagus][0.0.0.0][disabled_function] Aborted execution on call of the function 'require', because its argument 'inclusion path' content (%a/test.sim) matched a rule in %a/disabled_functions_require_simulation.php on line 6 | 25 | Warning: [snuffleupagus][0.0.0.0][disabled_function][simulation] Aborted execution on call of the function 'require', because its argument 'inclusion path' content (%a/test.sim) matched a rule in %a/disabled_functions_require_simulation.php on line 6 |
| 26 | MEH | 26 | MEH |
| 27 | 1337 | 27 | 1337 |
diff --git a/src/tests/disable_function/disabled_functions_ret.phpt b/src/tests/disable_function/disabled_functions_ret.phpt index ab1b263..c1f2876 100644 --- a/src/tests/disable_function/disabled_functions_ret.phpt +++ b/src/tests/disable_function/disabled_functions_ret.phpt | |||
| @@ -1,7 +1,7 @@ | |||
| 1 | --TEST-- | 1 | --TEST-- |
| 2 | Disable functions check on `ret`. | 2 | Disable functions check on `ret`. |
| 3 | --SKIPIF-- | 3 | --SKIPIF-- |
| 4 | <?php if (!extension_loaded("snuffleupagus")) die "skip"; ?> | 4 | <?php if (!extension_loaded("snuffleupagus")) print "skip"; ?> |
| 5 | --INI-- | 5 | --INI-- |
| 6 | sp.configuration_file={PWD}/config/disabled_functions_ret.ini | 6 | sp.configuration_file={PWD}/config/disabled_functions_ret.ini |
| 7 | --FILE-- | 7 | --FILE-- |
| @@ -10,4 +10,4 @@ echo strpos("pouet", "p"); | |||
| 10 | echo stripos("pouet", "p"); | 10 | echo stripos("pouet", "p"); |
| 11 | ?> | 11 | ?> |
| 12 | --EXPECTF-- | 12 | --EXPECTF-- |
| 13 | Fatal error: [snuffleupagus][0.0.0.0][disabled_function] Aborted execution on return of the function 'strpos', because the function returned '0', which matched a rule in %a/disabled_functions_ret.php on line 2 \ No newline at end of file | 13 | Fatal error: [snuffleupagus][0.0.0.0][disabled_function][drop] Aborted execution on return of the function 'strpos', because the function returned '0', which matched a rule in %a/disabled_functions_ret.php on line 2 |
diff --git a/src/tests/disable_function/disabled_functions_ret2.phpt b/src/tests/disable_function/disabled_functions_ret2.phpt index 1f3b02d..2cc9b98 100644 --- a/src/tests/disable_function/disabled_functions_ret2.phpt +++ b/src/tests/disable_function/disabled_functions_ret2.phpt | |||
| @@ -1,7 +1,7 @@ | |||
| 1 | --TEST-- | 1 | --TEST-- |
| 2 | Disable functions check on `ret`. | 2 | Disable functions check on `ret`. |
| 3 | --SKIPIF-- | 3 | --SKIPIF-- |
| 4 | <?php if (!extension_loaded("snuffleupagus")) die "skip"; ?> | 4 | <?php if (!extension_loaded("snuffleupagus")) print "skip"; ?> |
| 5 | --INI-- | 5 | --INI-- |
| 6 | sp.configuration_file={PWD}/config/disabled_functions_ret.ini | 6 | sp.configuration_file={PWD}/config/disabled_functions_ret.ini |
| 7 | --FILE-- | 7 | --FILE-- |
| @@ -9,4 +9,4 @@ sp.configuration_file={PWD}/config/disabled_functions_ret.ini | |||
| 9 | echo stripos("pouet", "p"); | 9 | echo stripos("pouet", "p"); |
| 10 | ?> | 10 | ?> |
| 11 | --EXPECTF-- | 11 | --EXPECTF-- |
| 12 | Fatal error: [snuffleupagus][0.0.0.0][disabled_function] Aborted execution on return of the function 'stripos', because the function returned '0', which matched a rule in %a/disabled_functions_ret2.php on line 2 \ No newline at end of file | 12 | Fatal error: [snuffleupagus][0.0.0.0][disabled_function][drop] Aborted execution on return of the function 'stripos', because the function returned '0', which matched a rule in %a/disabled_functions_ret2.php on line 2 |
diff --git a/src/tests/disable_function/disabled_functions_ret3.phpt b/src/tests/disable_function/disabled_functions_ret3.phpt index aa2d7d2..8a8f7cd 100644 --- a/src/tests/disable_function/disabled_functions_ret3.phpt +++ b/src/tests/disable_function/disabled_functions_ret3.phpt | |||
| @@ -1,7 +1,7 @@ | |||
| 1 | --TEST-- | 1 | --TEST-- |
| 2 | Disable functions check on `ret`. | 2 | Disable functions check on `ret`. |
| 3 | --SKIPIF-- | 3 | --SKIPIF-- |
| 4 | <?php if (!extension_loaded("snuffleupagus")) die "skip"; ?> | 4 | <?php if (!extension_loaded("snuffleupagus")) print "skip"; ?> |
| 5 | --INI-- | 5 | --INI-- |
| 6 | sp.configuration_file={PWD}/config/disabled_functions_ret.ini | 6 | sp.configuration_file={PWD}/config/disabled_functions_ret.ini |
| 7 | memory_limit=-1 | 7 | memory_limit=-1 |
| @@ -20,4 +20,4 @@ echo("We're at the end of the execution.\n"); | |||
| 20 | --EXPECTF-- | 20 | --EXPECTF-- |
| 21 | We're in function `a`. | 21 | We're in function `a`. |
| 22 | 22 | ||
| 23 | Fatal error: [snuffleupagus][0.0.0.0][disabled_function] Aborted execution on return of the function 'Bob::a', because the function returned '2', which matched a rule in %a/disabled_functions_ret3.php on line 9 \ No newline at end of file | 23 | Fatal error: [snuffleupagus][0.0.0.0][disabled_function][drop] Aborted execution on return of the function 'Bob::a', because the function returned '2', which matched a rule in %a/disabled_functions_ret3.php on line 9 |
diff --git a/src/tests/disable_function/disabled_functions_ret_allow.phpt b/src/tests/disable_function/disabled_functions_ret_allow.phpt index 1690995..90fe4c7 100644 --- a/src/tests/disable_function/disabled_functions_ret_allow.phpt +++ b/src/tests/disable_function/disabled_functions_ret_allow.phpt | |||
| @@ -1,7 +1,7 @@ | |||
| 1 | --TEST-- | 1 | --TEST-- |
| 2 | Disable functions check on `ret`. | 2 | Disable functions check on `ret`. |
| 3 | --SKIPIF-- | 3 | --SKIPIF-- |
| 4 | <?php if (!extension_loaded("snuffleupagus")) die "skip"; ?> | 4 | <?php if (!extension_loaded("snuffleupagus")) print "skip"; ?> |
| 5 | --INI-- | 5 | --INI-- |
| 6 | sp.configuration_file={PWD}/config/config_disabled_functions_ret_allow.ini | 6 | sp.configuration_file={PWD}/config/config_disabled_functions_ret_allow.ini |
| 7 | --FILE-- | 7 | --FILE-- |
diff --git a/src/tests/disable_function/disabled_functions_ret_allow_value.phpt b/src/tests/disable_function/disabled_functions_ret_allow_value.phpt index 881a006..c7785fd 100644 --- a/src/tests/disable_function/disabled_functions_ret_allow_value.phpt +++ b/src/tests/disable_function/disabled_functions_ret_allow_value.phpt | |||
| @@ -1,7 +1,7 @@ | |||
| 1 | --TEST-- | 1 | --TEST-- |
| 2 | Disable functions check on `ret` allowed | 2 | Disable functions check on `ret` allowed |
| 3 | --SKIPIF-- | 3 | --SKIPIF-- |
| 4 | <?php if (!extension_loaded("snuffleupagus")) die "skip"; ?> | 4 | <?php if (!extension_loaded("snuffleupagus")) print "skip"; ?> |
| 5 | --INI-- | 5 | --INI-- |
| 6 | sp.configuration_file={PWD}/config/config_disabled_functions_ret_allow_value.ini | 6 | sp.configuration_file={PWD}/config/config_disabled_functions_ret_allow_value.ini |
| 7 | --FILE-- | 7 | --FILE-- |
diff --git a/src/tests/disable_function/disabled_functions_ret_right_hash.phpt b/src/tests/disable_function/disabled_functions_ret_right_hash.phpt index b306fb9..f434e25 100644 --- a/src/tests/disable_function/disabled_functions_ret_right_hash.phpt +++ b/src/tests/disable_function/disabled_functions_ret_right_hash.phpt | |||
| @@ -1,7 +1,7 @@ | |||
| 1 | --TEST-- | 1 | --TEST-- |
| 2 | Disable functions | 2 | Disable functions |
| 3 | --SKIPIF-- | 3 | --SKIPIF-- |
| 4 | <?php if (!extension_loaded("snuffleupagus")) die "skip"; ?> | 4 | <?php if (!extension_loaded("snuffleupagus")) print "skip"; ?> |
| 5 | --INI-- | 5 | --INI-- |
| 6 | sp.configuration_file={PWD}/config/config_disabled_functions_ret_right_hash.ini | 6 | sp.configuration_file={PWD}/config/config_disabled_functions_ret_right_hash.ini |
| 7 | --FILE-- | 7 | --FILE-- |
| @@ -11,4 +11,4 @@ system("echo $((1 + 1336))"); | |||
| 11 | --EXPECTF-- | 11 | --EXPECTF-- |
| 12 | 1337 | 12 | 1337 |
| 13 | 13 | ||
| 14 | Fatal error: [snuffleupagus][0.0.0.0][disabled_function] Aborted execution on return of the function 'system', because the function returned '1337', which matched a rule in %a/disabled_functions_ret_right_hash.php on line 2 \ No newline at end of file | 14 | Fatal error: [snuffleupagus][0.0.0.0][disabled_function][drop] Aborted execution on return of the function 'system', because the function returned '1337', which matched a rule in %a/disabled_functions_ret_right_hash.php on line 2 \ No newline at end of file |
diff --git a/src/tests/disable_function/disabled_functions_ret_simulation.phpt b/src/tests/disable_function/disabled_functions_ret_simulation.phpt index 70691ee..ca9dc7f 100644 --- a/src/tests/disable_function/disabled_functions_ret_simulation.phpt +++ b/src/tests/disable_function/disabled_functions_ret_simulation.phpt | |||
| @@ -1,7 +1,7 @@ | |||
| 1 | --TEST-- | 1 | --TEST-- |
| 2 | Disable functions check on `ret` simulation | 2 | Disable functions check on `ret` simulation |
| 3 | --SKIPIF-- | 3 | --SKIPIF-- |
| 4 | <?php if (!extension_loaded("snuffleupagus")) die "skip"; ?> | 4 | <?php if (!extension_loaded("snuffleupagus")) print "skip"; ?> |
| 5 | --INI-- | 5 | --INI-- |
| 6 | sp.configuration_file={PWD}/config/config_disabled_functions_ret_simulation.ini | 6 | sp.configuration_file={PWD}/config/config_disabled_functions_ret_simulation.ini |
| 7 | --FILE-- | 7 | --FILE-- |
| @@ -11,10 +11,10 @@ echo stripos("pouet", "p") . "\n"; | |||
| 11 | strcmp("p", "p") . "\n"; | 11 | strcmp("p", "p") . "\n"; |
| 12 | ?> | 12 | ?> |
| 13 | --EXPECTF-- | 13 | --EXPECTF-- |
| 14 | Warning: [snuffleupagus][0.0.0.0][disabled_function] Aborted execution on return of the function 'strpos', because the function returned '0', which matched a rule in %a/disabled_functions_ret_simulation.php on line 2 | 14 | Warning: [snuffleupagus][0.0.0.0][disabled_function][simulation] Aborted execution on return of the function 'strpos', because the function returned '0', which matched a rule in %a/disabled_functions_ret_simulation.php on line 2 |
| 15 | 0 | 15 | 0 |
| 16 | 16 | ||
| 17 | Warning: [snuffleupagus][0.0.0.0][disabled_function] Aborted execution on return of the function 'stripos', because the function returned '0', which matched the rule '1' in %a/disabled_functions_ret_simulation.php on line 3 | 17 | Warning: [snuffleupagus][0.0.0.0][disabled_function][simulation] Aborted execution on return of the function 'stripos', because the function returned '0', which matched the rule '1' in %a/disabled_functions_ret_simulation.php on line 3 |
| 18 | 0 | 18 | 0 |
| 19 | 19 | ||
| 20 | Fatal error: [snuffleupagus][0.0.0.0][disabled_function] Aborted execution on return of the function 'strcmp', because the function returned '0', which matched a rule in %a/disabled_functions_ret_simulation.php on line 4 \ No newline at end of file | 20 | Fatal error: [snuffleupagus][0.0.0.0][disabled_function][drop] Aborted execution on return of the function 'strcmp', because the function returned '0', which matched a rule in %a/disabled_functions_ret_simulation.php on line 4 \ No newline at end of file |
diff --git a/src/tests/disable_function/disabled_functions_ret_type.phpt b/src/tests/disable_function/disabled_functions_ret_type.phpt index 9679f01..3a9a230 100644 --- a/src/tests/disable_function/disabled_functions_ret_type.phpt +++ b/src/tests/disable_function/disabled_functions_ret_type.phpt | |||
| @@ -1,7 +1,7 @@ | |||
| 1 | --TEST-- | 1 | --TEST-- |
| 2 | Disable functions check on `ret` by type matching (false) | 2 | Disable functions check on `ret` by type matching (false) |
| 3 | --SKIPIF-- | 3 | --SKIPIF-- |
| 4 | <?php if (!extension_loaded("snuffleupagus")) die "skip"; ?> | 4 | <?php if (!extension_loaded("snuffleupagus")) print "skip"; ?> |
| 5 | --INI-- | 5 | --INI-- |
| 6 | sp.configuration_file={PWD}/config/disabled_functions_ret_type.ini | 6 | sp.configuration_file={PWD}/config/disabled_functions_ret_type.ini |
| 7 | --FILE-- | 7 | --FILE-- |
| @@ -14,4 +14,4 @@ echo strpos("pouet", "123"); | |||
| 14 | int(0) | 14 | int(0) |
| 15 | 1337 | 15 | 1337 |
| 16 | 16 | ||
| 17 | Fatal error: [snuffleupagus][0.0.0.0][disabled_function] Aborted execution on return of the function 'strpos', because the function returned 'FALSE', which matched the rule 'Return value is FALSE' in %a/disabled_functions_ret_type.php on line 4 \ No newline at end of file | 17 | Fatal error: [snuffleupagus][0.0.0.0][disabled_function][drop] Aborted execution on return of the function 'strpos', because the function returned 'FALSE', which matched the rule 'Return value is FALSE' in %a/disabled_functions_ret_type.php on line 4 \ No newline at end of file |
diff --git a/src/tests/disable_function/disabled_functions_ret_type_array.phpt b/src/tests/disable_function/disabled_functions_ret_type_array.phpt index 1b20e53..3dcb0f2 100644 --- a/src/tests/disable_function/disabled_functions_ret_type_array.phpt +++ b/src/tests/disable_function/disabled_functions_ret_type_array.phpt | |||
| @@ -1,7 +1,7 @@ | |||
| 1 | --TEST-- | 1 | --TEST-- |
| 2 | Disable functions check on `ret` by type matching (array). | 2 | Disable functions check on `ret` by type matching (array). |
| 3 | --SKIPIF-- | 3 | --SKIPIF-- |
| 4 | <?php if (!extension_loaded("snuffleupagus")) die "skip"; ?> | 4 | <?php if (!extension_loaded("snuffleupagus")) print "skip"; ?> |
| 5 | --INI-- | 5 | --INI-- |
| 6 | sp.configuration_file={PWD}/config/disabled_functions_ret_type_array.ini | 6 | sp.configuration_file={PWD}/config/disabled_functions_ret_type_array.ini |
| 7 | --FILE-- | 7 | --FILE-- |
| @@ -9,4 +9,4 @@ sp.configuration_file={PWD}/config/disabled_functions_ret_type_array.ini | |||
| 9 | echo get_loaded_extensions(); | 9 | echo get_loaded_extensions(); |
| 10 | ?> | 10 | ?> |
| 11 | --EXPECTF-- | 11 | --EXPECTF-- |
| 12 | Fatal error: [snuffleupagus][0.0.0.0][disabled_function] Aborted execution on return of the function 'get_loaded_extensions', because the function returned 'ARRAY', which matched the rule 'Return value is an array' in %a/disabled_functions_ret_type_array.php on line 2 \ No newline at end of file | 12 | Fatal error: [snuffleupagus][0.0.0.0][disabled_function][drop] Aborted execution on return of the function 'get_loaded_extensions', because the function returned 'ARRAY', which matched the rule 'Return value is an array' in %a/disabled_functions_ret_type_array.php on line 2 \ No newline at end of file |
diff --git a/src/tests/disable_function/disabled_functions_ret_type_double.phpt b/src/tests/disable_function/disabled_functions_ret_type_double.phpt index 1810b88..df5b1ae 100644 --- a/src/tests/disable_function/disabled_functions_ret_type_double.phpt +++ b/src/tests/disable_function/disabled_functions_ret_type_double.phpt | |||
| @@ -1,7 +1,7 @@ | |||
| 1 | --TEST-- | 1 | --TEST-- |
| 2 | Disable functions check on `ret` by type matching (double). | 2 | Disable functions check on `ret` by type matching (double). |
| 3 | --SKIPIF-- | 3 | --SKIPIF-- |
| 4 | <?php if (!extension_loaded("snuffleupagus")) die "skip"; ?> | 4 | <?php if (!extension_loaded("snuffleupagus")) print "skip"; ?> |
| 5 | --INI-- | 5 | --INI-- |
| 6 | sp.configuration_file={PWD}/config/disabled_functions_ret_type_double.ini | 6 | sp.configuration_file={PWD}/config/disabled_functions_ret_type_double.ini |
| 7 | --FILE-- | 7 | --FILE-- |
| @@ -9,4 +9,4 @@ sp.configuration_file={PWD}/config/disabled_functions_ret_type_double.ini | |||
| 9 | echo cos(0.5) . "\n"; | 9 | echo cos(0.5) . "\n"; |
| 10 | ?> | 10 | ?> |
| 11 | --EXPECTF-- | 11 | --EXPECTF-- |
| 12 | Fatal error: [snuffleupagus][0.0.0.0][disabled_function] Aborted execution on return of the function 'cos', because the function returned '0.877583', which matched the rule 'Return value is a double' in %a/disabled_functions_ret_type_double.php on line 2 \ No newline at end of file | 12 | Fatal error: [snuffleupagus][0.0.0.0][disabled_function][drop] Aborted execution on return of the function 'cos', because the function returned '0.877583', which matched the rule 'Return value is a double' in %a/disabled_functions_ret_type_double.php on line 2 \ No newline at end of file |
diff --git a/src/tests/disable_function/disabled_functions_ret_type_long.phpt b/src/tests/disable_function/disabled_functions_ret_type_long.phpt index c5c9e38..5da1103 100644 --- a/src/tests/disable_function/disabled_functions_ret_type_long.phpt +++ b/src/tests/disable_function/disabled_functions_ret_type_long.phpt | |||
| @@ -1,7 +1,7 @@ | |||
| 1 | --TEST-- | 1 | --TEST-- |
| 2 | Disable functions check on `ret` by type matching (long). | 2 | Disable functions check on `ret` by type matching (long). |
| 3 | --SKIPIF-- | 3 | --SKIPIF-- |
| 4 | <?php if (!extension_loaded("snuffleupagus")) die "skip"; ?> | 4 | <?php if (!extension_loaded("snuffleupagus")) print "skip"; ?> |
| 5 | --INI-- | 5 | --INI-- |
| 6 | sp.configuration_file={PWD}/config/disabled_functions_ret_type_long.ini | 6 | sp.configuration_file={PWD}/config/disabled_functions_ret_type_long.ini |
| 7 | --FILE-- | 7 | --FILE-- |
| @@ -9,4 +9,4 @@ sp.configuration_file={PWD}/config/disabled_functions_ret_type_long.ini | |||
| 9 | echo strpos("pouet", "o") . "\n"; | 9 | echo strpos("pouet", "o") . "\n"; |
| 10 | ?> | 10 | ?> |
| 11 | --EXPECTF-- | 11 | --EXPECTF-- |
| 12 | Fatal error: [snuffleupagus][0.0.0.0][disabled_function] Aborted execution on return of the function 'strpos', because the function returned '1', which matched the rule 'Return value is a long' in %a/disabled_functions_ret_type_long.php on line 2 | 12 | Fatal error: [snuffleupagus][0.0.0.0][disabled_function][drop] Aborted execution on return of the function 'strpos', because the function returned '1', which matched the rule 'Return value is a long' in %a/disabled_functions_ret_type_long.php on line 2 |
diff --git a/src/tests/disable_function/disabled_functions_ret_type_null.phpt b/src/tests/disable_function/disabled_functions_ret_type_null.phpt index b245a95..c2c6880 100644 --- a/src/tests/disable_function/disabled_functions_ret_type_null.phpt +++ b/src/tests/disable_function/disabled_functions_ret_type_null.phpt | |||
| @@ -1,7 +1,7 @@ | |||
| 1 | --TEST-- | 1 | --TEST-- |
| 2 | Disable functions check on `ret` by type matching (null). | 2 | Disable functions check on `ret` by type matching (null). |
| 3 | --SKIPIF-- | 3 | --SKIPIF-- |
| 4 | <?php if (!extension_loaded("snuffleupagus")) die "skip"; ?> | 4 | <?php if (!extension_loaded("snuffleupagus")) print "skip"; ?> |
| 5 | --INI-- | 5 | --INI-- |
| 6 | sp.configuration_file={PWD}/config/disabled_functions_ret_type_null.ini | 6 | sp.configuration_file={PWD}/config/disabled_functions_ret_type_null.ini |
| 7 | --FILE-- | 7 | --FILE-- |
| @@ -13,4 +13,4 @@ function my_function() { | |||
| 13 | var_dump(my_function()); | 13 | var_dump(my_function()); |
| 14 | ?> | 14 | ?> |
| 15 | --EXPECTF-- | 15 | --EXPECTF-- |
| 16 | Fatal error: [snuffleupagus][0.0.0.0][disabled_function] Aborted execution on return of the function 'my_function', because the function returned 'NULL', which matched the rule 'Return value is null' in %a/disabled_functions_ret_type_null.php on line 6 \ No newline at end of file | 16 | Fatal error: [snuffleupagus][0.0.0.0][disabled_function][drop] Aborted execution on return of the function 'my_function', because the function returned 'NULL', which matched the rule 'Return value is null' in %a/disabled_functions_ret_type_null.php on line 6 \ No newline at end of file |
diff --git a/src/tests/disable_function/disabled_functions_ret_type_object.phpt b/src/tests/disable_function/disabled_functions_ret_type_object.phpt index a4d1c9a..a6a3519 100644 --- a/src/tests/disable_function/disabled_functions_ret_type_object.phpt +++ b/src/tests/disable_function/disabled_functions_ret_type_object.phpt | |||
| @@ -1,7 +1,7 @@ | |||
| 1 | --TEST-- | 1 | --TEST-- |
| 2 | Disable functions check on `ret` by type matching (object). | 2 | Disable functions check on `ret` by type matching (object). |
| 3 | --SKIPIF-- | 3 | --SKIPIF-- |
| 4 | <?php if (!extension_loaded("snuffleupagus")) die "skip"; ?> | 4 | <?php if (!extension_loaded("snuffleupagus")) print "skip"; ?> |
| 5 | --INI-- | 5 | --INI-- |
| 6 | sp.configuration_file={PWD}/config/disabled_functions_ret_type_object.ini | 6 | sp.configuration_file={PWD}/config/disabled_functions_ret_type_object.ini |
| 7 | --FILE-- | 7 | --FILE-- |
| @@ -13,4 +13,4 @@ $var = a(); | |||
| 13 | echo "fail"; | 13 | echo "fail"; |
| 14 | ?> | 14 | ?> |
| 15 | --EXPECTF-- | 15 | --EXPECTF-- |
| 16 | Fatal error: [snuffleupagus][0.0.0.0][disabled_function] Aborted execution on return of the function 'a', because the function returned 'OBJECT', which matched a rule in %a/disabled_functions_ret_type_object.php on line 5 \ No newline at end of file | 16 | Fatal error: [snuffleupagus][0.0.0.0][disabled_function][drop] Aborted execution on return of the function 'a', because the function returned 'OBJECT', which matched a rule in %a/disabled_functions_ret_type_object.php on line 5 \ No newline at end of file |
diff --git a/src/tests/disable_function/disabled_functions_ret_type_resource.phpt b/src/tests/disable_function/disabled_functions_ret_type_resource.phpt index 67ae2a6..cf30d95 100644 --- a/src/tests/disable_function/disabled_functions_ret_type_resource.phpt +++ b/src/tests/disable_function/disabled_functions_ret_type_resource.phpt | |||
| @@ -1,7 +1,7 @@ | |||
| 1 | --TEST-- | 1 | --TEST-- |
| 2 | Disable functions check on `ret` by type matching (resource). | 2 | Disable functions check on `ret` by type matching (resource). |
| 3 | --SKIPIF-- | 3 | --SKIPIF-- |
| 4 | <?php if (!extension_loaded("snuffleupagus")) die "skip"; ?> | 4 | <?php if (!extension_loaded("snuffleupagus")) print "skip"; ?> |
| 5 | --INI-- | 5 | --INI-- |
| 6 | sp.configuration_file={PWD}/config/disabled_functions_ret_type_resource.ini | 6 | sp.configuration_file={PWD}/config/disabled_functions_ret_type_resource.ini |
| 7 | --FILE-- | 7 | --FILE-- |
| @@ -9,4 +9,4 @@ sp.configuration_file={PWD}/config/disabled_functions_ret_type_resource.ini | |||
| 9 | echo fopen("/etc/passwd", "r"); | 9 | echo fopen("/etc/passwd", "r"); |
| 10 | ?> | 10 | ?> |
| 11 | --EXPECTF-- | 11 | --EXPECTF-- |
| 12 | Fatal error: [snuffleupagus][0.0.0.0][disabled_function] Aborted execution on return of the function 'fopen', because the function returned 'RESOURCE', which matched the rule 'Return value is a resource' in %a/disabled_functions_ret_type_resource.php on line 2 \ No newline at end of file | 12 | Fatal error: [snuffleupagus][0.0.0.0][disabled_function][drop] Aborted execution on return of the function 'fopen', because the function returned 'RESOURCE', which matched the rule 'Return value is a resource' in %a/disabled_functions_ret_type_resource.php on line 2 \ No newline at end of file |
diff --git a/src/tests/disable_function/disabled_functions_ret_type_str.phpt b/src/tests/disable_function/disabled_functions_ret_type_str.phpt index 0dcdaaa..48a0c04 100644 --- a/src/tests/disable_function/disabled_functions_ret_type_str.phpt +++ b/src/tests/disable_function/disabled_functions_ret_type_str.phpt | |||
| @@ -1,7 +1,7 @@ | |||
| 1 | --TEST-- | 1 | --TEST-- |
| 2 | Disable functions check on `ret` by type matching (string). | 2 | Disable functions check on `ret` by type matching (string). |
| 3 | --SKIPIF-- | 3 | --SKIPIF-- |
| 4 | <?php if (!extension_loaded("snuffleupagus")) die "skip"; ?> | 4 | <?php if (!extension_loaded("snuffleupagus")) print "skip"; ?> |
| 5 | --INI-- | 5 | --INI-- |
| 6 | sp.configuration_file={PWD}/config/disabled_functions_ret_type_str.ini | 6 | sp.configuration_file={PWD}/config/disabled_functions_ret_type_str.ini |
| 7 | --FILE-- | 7 | --FILE-- |
| @@ -9,4 +9,4 @@ sp.configuration_file={PWD}/config/disabled_functions_ret_type_str.ini | |||
| 9 | echo substr("pouet", 3) . "\n"; | 9 | echo substr("pouet", 3) . "\n"; |
| 10 | ?> | 10 | ?> |
| 11 | --EXPECTF-- | 11 | --EXPECTF-- |
| 12 | Fatal error: [snuffleupagus][0.0.0.0][disabled_function] Aborted execution on return of the function 'substr', because the function returned 'et', which matched the rule 'Return value is a string' in %a/disabled_functions_ret_type_str.php on line 2 \ No newline at end of file | 12 | Fatal error: [snuffleupagus][0.0.0.0][disabled_function][drop] Aborted execution on return of the function 'substr', because the function returned 'et', which matched the rule 'Return value is a string' in %a/disabled_functions_ret_type_str.php on line 2 \ No newline at end of file |
diff --git a/src/tests/disable_function/disabled_functions_ret_type_true.phpt b/src/tests/disable_function/disabled_functions_ret_type_true.phpt index 6a4749a..7cc1e38 100644 --- a/src/tests/disable_function/disabled_functions_ret_type_true.phpt +++ b/src/tests/disable_function/disabled_functions_ret_type_true.phpt | |||
| @@ -1,7 +1,7 @@ | |||
| 1 | --TEST-- | 1 | --TEST-- |
| 2 | Disable functions check on `ret` by type matching (true). | 2 | Disable functions check on `ret` by type matching (true). |
| 3 | --SKIPIF-- | 3 | --SKIPIF-- |
| 4 | <?php if (!extension_loaded("snuffleupagus")) die "skip"; ?> | 4 | <?php if (!extension_loaded("snuffleupagus")) print "skip"; ?> |
| 5 | --INI-- | 5 | --INI-- |
| 6 | sp.configuration_file={PWD}/config/disabled_functions_ret_type_true.ini | 6 | sp.configuration_file={PWD}/config/disabled_functions_ret_type_true.ini |
| 7 | --FILE-- | 7 | --FILE-- |
| @@ -14,4 +14,4 @@ echo is_numeric("1234") . "\n"; | |||
| 14 | bool(false) | 14 | bool(false) |
| 15 | 1337 | 15 | 1337 |
| 16 | 16 | ||
| 17 | Fatal error: [snuffleupagus][0.0.0.0][disabled_function] Aborted execution on return of the function 'is_numeric', because the function returned 'TRUE', which matched the rule 'Return value is a true' in %a/disabled_functions_ret_type_true.php on line 4 \ No newline at end of file | 17 | Fatal error: [snuffleupagus][0.0.0.0][disabled_function][drop] Aborted execution on return of the function 'is_numeric', because the function returned 'TRUE', which matched the rule 'Return value is a true' in %a/disabled_functions_ret_type_true.php on line 4 \ No newline at end of file |
diff --git a/src/tests/disable_function/disabled_functions_ret_user.phpt b/src/tests/disable_function/disabled_functions_ret_user.phpt index 989a7ab..040756c 100644 --- a/src/tests/disable_function/disabled_functions_ret_user.phpt +++ b/src/tests/disable_function/disabled_functions_ret_user.phpt | |||
| @@ -1,7 +1,7 @@ | |||
| 1 | --TEST-- | 1 | --TEST-- |
| 2 | Check NULL return value for user func | 2 | Check NULL return value for user func |
| 3 | --SKIPIF-- | 3 | --SKIPIF-- |
| 4 | <?php if (!extension_loaded("snuffleupagus")) die "skip"; ?> | 4 | <?php if (!extension_loaded("snuffleupagus")) print "skip"; ?> |
| 5 | --INI-- | 5 | --INI-- |
| 6 | sp.configuration_file={PWD}/config/config_disabled_functions_ret_user.ini | 6 | sp.configuration_file={PWD}/config/config_disabled_functions_ret_user.ini |
| 7 | --FILE-- | 7 | --FILE-- |
| @@ -13,4 +13,4 @@ qwe(); | |||
| 13 | echo 1; | 13 | echo 1; |
| 14 | ?> | 14 | ?> |
| 15 | --EXPECTF-- | 15 | --EXPECTF-- |
| 16 | Fatal error: [snuffleupagus][0.0.0.0][disabled_function] Aborted execution on return of the function 'qwe', because the function returned 'asd', which matched a rule in %a/disabled_functions_ret_user.php on line %d | 16 | Fatal error: [snuffleupagus][0.0.0.0][disabled_function][drop] Aborted execution on return of the function 'qwe', because the function returned 'asd', which matched a rule in %a/disabled_functions_ret_user.php on line %d |
diff --git a/src/tests/disable_function/disabled_functions_ret_user_used.phpt b/src/tests/disable_function/disabled_functions_ret_user_used.phpt index 05e1323..7499e1c 100644 --- a/src/tests/disable_function/disabled_functions_ret_user_used.phpt +++ b/src/tests/disable_function/disabled_functions_ret_user_used.phpt | |||
| @@ -1,7 +1,7 @@ | |||
| 1 | --TEST-- | 1 | --TEST-- |
| 2 | Check return value for user func | 2 | Check return value for user func |
| 3 | --SKIPIF-- | 3 | --SKIPIF-- |
| 4 | <?php if (!extension_loaded("snuffleupagus")) die "skip"; ?> | 4 | <?php if (!extension_loaded("snuffleupagus")) print "skip"; ?> |
| 5 | --INI-- | 5 | --INI-- |
| 6 | sp.configuration_file={PWD}/config/config_disabled_functions_ret_user.ini | 6 | sp.configuration_file={PWD}/config/config_disabled_functions_ret_user.ini |
| 7 | --FILE-- | 7 | --FILE-- |
| @@ -12,4 +12,4 @@ function qwe() { | |||
| 12 | echo qwe(); | 12 | echo qwe(); |
| 13 | ?> | 13 | ?> |
| 14 | --EXPECTF-- | 14 | --EXPECTF-- |
| 15 | Fatal error: [snuffleupagus][0.0.0.0][disabled_function] Aborted execution on return of the function 'qwe', because the function returned 'asd', which matched a rule in %a/disabled_functions_ret_user_used.php on line %d | 15 | Fatal error: [snuffleupagus][0.0.0.0][disabled_function][drop] Aborted execution on return of the function 'qwe', because the function returned 'asd', which matched a rule in %a/disabled_functions_ret_user_used.php on line %d |
diff --git a/src/tests/disable_function/disabled_functions_ret_val.phpt b/src/tests/disable_function/disabled_functions_ret_val.phpt index a914c56..0bf39bb 100644 --- a/src/tests/disable_function/disabled_functions_ret_val.phpt +++ b/src/tests/disable_function/disabled_functions_ret_val.phpt | |||
| @@ -1,7 +1,7 @@ | |||
| 1 | --TEST-- | 1 | --TEST-- |
| 2 | Disable functions ret val | 2 | Disable functions ret val |
| 3 | --SKIPIF-- | 3 | --SKIPIF-- |
| 4 | <?php if (!extension_loaded("snuffleupagus")) die "skip"; ?> | 4 | <?php if (!extension_loaded("snuffleupagus")) print "skip"; ?> |
| 5 | --INI-- | 5 | --INI-- |
| 6 | sp.configuration_file={PWD}/config/disabled_functions_retval.ini | 6 | sp.configuration_file={PWD}/config/disabled_functions_retval.ini |
| 7 | --FILE-- | 7 | --FILE-- |
| @@ -12,4 +12,4 @@ echo str_repeat("fufufu",1); | |||
| 12 | --EXPECTF-- | 12 | --EXPECTF-- |
| 13 | fufu | 13 | fufu |
| 14 | 14 | ||
| 15 | Fatal error: [snuffleupagus][0.0.0.0][disabled_function] Aborted execution on return of the function 'str_repeat', because the function returned 'fufufu', which matched a rule in %a/disabled_functions_ret_val.php on line 3 \ No newline at end of file | 15 | Fatal error: [snuffleupagus][0.0.0.0][disabled_function][drop] Aborted execution on return of the function 'str_repeat', because the function returned 'fufufu', which matched a rule in %a/disabled_functions_ret_val.php on line 3 \ No newline at end of file |
diff --git a/src/tests/disable_function/disabled_functions_ret_val_dump.phpt b/src/tests/disable_function/disabled_functions_ret_val_dump.phpt index c8fb2c3..5e36900 100644 --- a/src/tests/disable_function/disabled_functions_ret_val_dump.phpt +++ b/src/tests/disable_function/disabled_functions_ret_val_dump.phpt | |||
| @@ -1,7 +1,7 @@ | |||
| 1 | --TEST-- | 1 | --TEST-- |
| 2 | Disable functions ret val - dump | 2 | Disable functions ret val - dump |
| 3 | --SKIPIF-- | 3 | --SKIPIF-- |
| 4 | <?php if (!extension_loaded("snuffleupagus")) die "skip"; ?> | 4 | <?php if (!extension_loaded("snuffleupagus")) print "skip"; ?> |
| 5 | --INI-- | 5 | --INI-- |
| 6 | sp.configuration_file={PWD}/config/disabled_functions_retval_dump.ini | 6 | sp.configuration_file={PWD}/config/disabled_functions_retval_dump.ini |
| 7 | --ENV-- | 7 | --ENV-- |
| @@ -20,4 +20,4 @@ echo str_repeat("fufufu",1); | |||
| 20 | --EXPECTF-- | 20 | --EXPECTF-- |
| 21 | fufu | 21 | fufu |
| 22 | 22 | ||
| 23 | Fatal error: [snuffleupagus][0.0.0.0][disabled_function] Aborted execution on return of the function 'str_repeat', because the function returned 'fufufu', which matched a rule in %a/disabled_functions_ret_val_dump.php on line 3 | 23 | Fatal error: [snuffleupagus][0.0.0.0][disabled_function][drop] Aborted execution on return of the function 'str_repeat', because the function returned 'fufufu', which matched a rule in %a/disabled_functions_ret_val_dump.php on line 3 |
diff --git a/src/tests/disable_function/disabled_functions_ret_val_rx.phpt b/src/tests/disable_function/disabled_functions_ret_val_rx.phpt index 9623ef4..fa3f5ca 100644 --- a/src/tests/disable_function/disabled_functions_ret_val_rx.phpt +++ b/src/tests/disable_function/disabled_functions_ret_val_rx.phpt | |||
| @@ -1,7 +1,7 @@ | |||
| 1 | --TEST-- | 1 | --TEST-- |
| 2 | Disable functions ret val rx | 2 | Disable functions ret val rx |
| 3 | --SKIPIF-- | 3 | --SKIPIF-- |
| 4 | <?php if (!extension_loaded("snuffleupagus")) die "skip"; ?> | 4 | <?php if (!extension_loaded("snuffleupagus")) print "skip"; ?> |
| 5 | --INI-- | 5 | --INI-- |
| 6 | sp.configuration_file={PWD}/config/disabled_functions_retval_rx.ini | 6 | sp.configuration_file={PWD}/config/disabled_functions_retval_rx.ini |
| 7 | --FILE-- | 7 | --FILE-- |
| @@ -12,4 +12,4 @@ echo str_repeat("fufufu",1); | |||
| 12 | --EXPECTF-- | 12 | --EXPECTF-- |
| 13 | fufu | 13 | fufu |
| 14 | 14 | ||
| 15 | Fatal error: [snuffleupagus][0.0.0.0][disabled_function] Aborted execution on return of the function 'str_repeat', because the function returned 'fufufu', which matched a rule in %a/disabled_functions_ret_val_rx.php on line 3 \ No newline at end of file | 15 | Fatal error: [snuffleupagus][0.0.0.0][disabled_function][drop] Aborted execution on return of the function 'str_repeat', because the function returned 'fufufu', which matched a rule in %a/disabled_functions_ret_val_rx.php on line 3 |
diff --git a/src/tests/disable_function/disabled_functions_right_hash.phpt b/src/tests/disable_function/disabled_functions_right_hash.phpt index f3c5fb3..1c6e3d1 100644 --- a/src/tests/disable_function/disabled_functions_right_hash.phpt +++ b/src/tests/disable_function/disabled_functions_right_hash.phpt | |||
| @@ -1,7 +1,7 @@ | |||
| 1 | --TEST-- | 1 | --TEST-- |
| 2 | Disable functions | 2 | Disable functions |
| 3 | --SKIPIF-- | 3 | --SKIPIF-- |
| 4 | <?php if (!extension_loaded("snuffleupagus")) die "skip"; ?> | 4 | <?php if (!extension_loaded("snuffleupagus")) print "skip"; ?> |
| 5 | --INI-- | 5 | --INI-- |
| 6 | sp.configuration_file={PWD}/config/config_disabled_functions_right_hash.ini | 6 | sp.configuration_file={PWD}/config/config_disabled_functions_right_hash.ini |
| 7 | --FILE-- | 7 | --FILE-- |
diff --git a/src/tests/disable_function/disabled_functions_runtime.phpt b/src/tests/disable_function/disabled_functions_runtime.phpt index cd6f44d..3d74b40 100644 --- a/src/tests/disable_function/disabled_functions_runtime.phpt +++ b/src/tests/disable_function/disabled_functions_runtime.phpt | |||
| @@ -1,7 +1,7 @@ | |||
| 1 | --TEST-- | 1 | --TEST-- |
| 2 | Disable functions - runtime inclusion | 2 | Disable functions - runtime inclusion |
| 3 | --SKIPIF-- | 3 | --SKIPIF-- |
| 4 | <?php if (!extension_loaded("snuffleupagus")) die "skip"; ?> | 4 | <?php if (!extension_loaded("snuffleupagus")) print "skip"; ?> |
| 5 | --INI-- | 5 | --INI-- |
| 6 | sp.configuration_file={PWD}/config/config_disabled_functions_param_runtime.ini | 6 | sp.configuration_file={PWD}/config/config_disabled_functions_param_runtime.ini |
| 7 | --FILE-- | 7 | --FILE-- |
| @@ -29,4 +29,4 @@ unlink("file_to_include2.php"); | |||
| 29 | --EXPECTF-- | 29 | --EXPECTF-- |
| 30 | 1338 | 30 | 1338 |
| 31 | 31 | ||
| 32 | Fatal error: [snuffleupagus][0.0.0.0][disabled_function] Aborted execution on call of the function 'test', because its argument '$param' content (1337) matched a rule in %a/src/file_to_include%d.php on line 1 | 32 | Fatal error: [snuffleupagus][0.0.0.0][disabled_function][drop] Aborted execution on call of the function 'test', because its argument '$param' content (1337) matched a rule in %a/src/file_to_include%d.php on line 1 |
diff --git a/src/tests/disable_function/disabled_functions_upper.phpt b/src/tests/disable_function/disabled_functions_upper.phpt index f7cdcbb..412eb7d 100644 --- a/src/tests/disable_function/disabled_functions_upper.phpt +++ b/src/tests/disable_function/disabled_functions_upper.phpt | |||
| @@ -1,7 +1,7 @@ | |||
| 1 | --TEST-- | 1 | --TEST-- |
| 2 | Disable functions - uppercase | 2 | Disable functions - uppercase |
| 3 | --SKIPIF-- | 3 | --SKIPIF-- |
| 4 | <?php if (!extension_loaded("snuffleupagus")) die "skip"; ?> | 4 | <?php if (!extension_loaded("snuffleupagus")) print "skip"; ?> |
| 5 | --INI-- | 5 | --INI-- |
| 6 | sp.configuration_file={PWD}/config/disabled_functions.ini | 6 | sp.configuration_file={PWD}/config/disabled_functions.ini |
| 7 | --FILE-- | 7 | --FILE-- |
| @@ -13,4 +13,4 @@ vaR_DUmp("this is a super test"); | |||
| 13 | echo sTRPOs("pouet", "o"); | 13 | echo sTRPOs("pouet", "o"); |
| 14 | ?> | 14 | ?> |
| 15 | --EXPECTF-- | 15 | --EXPECTF-- |
| 16 | Fatal error: [snuffleupagus][0.0.0.0][disabled_function] Aborted execution on call of the function 'system' in %a/disabled_functions_upper.php on line 2 \ No newline at end of file | 16 | Fatal error: [snuffleupagus][0.0.0.0][disabled_function][drop] Aborted execution on call of the function 'system' in %a/disabled_functions_upper.php on line 2 |
diff --git a/src/tests/disable_function/disabled_functions_variadic.phpt b/src/tests/disable_function/disabled_functions_variadic.phpt index 32b6b0e..7658ec8 100644 --- a/src/tests/disable_function/disabled_functions_variadic.phpt +++ b/src/tests/disable_function/disabled_functions_variadic.phpt | |||
| @@ -1,7 +1,7 @@ | |||
| 1 | --TEST-- | 1 | --TEST-- |
| 2 | Disable functions - support for variadic functions | 2 | Disable functions - support for variadic functions |
| 3 | --SKIPIF-- | 3 | --SKIPIF-- |
| 4 | <?php if (!extension_loaded("snuffleupagus")) die "skip"; ?> | 4 | <?php if (!extension_loaded("snuffleupagus")) print "skip"; ?> |
| 5 | --INI-- | 5 | --INI-- |
| 6 | sp.configuration_file={PWD}/config/config_disabled_functions_variadic.ini | 6 | sp.configuration_file={PWD}/config/config_disabled_functions_variadic.ini |
| 7 | --FILE-- | 7 | --FILE-- |
| @@ -13,6 +13,6 @@ function foo(...$b) { | |||
| 13 | echo foo(5, 4, 3, 2, 1); | 13 | echo foo(5, 4, 3, 2, 1); |
| 14 | ?> | 14 | ?> |
| 15 | --EXPECTF-- | 15 | --EXPECTF-- |
| 16 | Warning: [snuffleupagus][0.0.0.0][disable_function] Snuffleupagus doesn't support variadic functions yet, sorry. Check https://github.com/jvoisin/snuffleupagus/issues/164 for details. in %a/disabled_functions_variadic.php on line %d | 16 | Warning: [snuffleupagus][0.0.0.0][disable_function][log] Snuffleupagus doesn't support variadic functions yet, sorry. Check https://github.com/jvoisin/snuffleupagus/issues/164 for details. in %a/disabled_functions_variadic.php on line %d |
| 17 | 17 | ||
| 18 | Fatal error: [snuffleupagus][0.0.0.0][disabled_function] Aborted execution on call of the function 'foo' in %a/disabled_functions_variadic.php on line %d | 18 | Fatal error: [snuffleupagus][0.0.0.0][disabled_function][drop] Aborted execution on call of the function 'foo' in %a/disabled_functions_variadic.php on line %d |
diff --git a/src/tests/disable_function/disabled_functions_zero_cidr.phpt b/src/tests/disable_function/disabled_functions_zero_cidr.phpt index 0ec596c..4fd0bb9 100644 --- a/src/tests/disable_function/disabled_functions_zero_cidr.phpt +++ b/src/tests/disable_function/disabled_functions_zero_cidr.phpt | |||
| @@ -1,7 +1,7 @@ | |||
| 1 | --TEST-- | 1 | --TEST-- |
| 2 | Disable functions | 2 | Disable functions |
| 3 | --SKIPIF-- | 3 | --SKIPIF-- |
| 4 | <?php if (!extension_loaded("snuffleupagus")) die "skip"; ?> | 4 | <?php if (!extension_loaded("snuffleupagus")) print "skip"; ?> |
| 5 | --ENV-- | 5 | --ENV-- |
| 6 | return <<<EOF | 6 | return <<<EOF |
| 7 | REMOTE_ADDR=127.0.0.1 | 7 | REMOTE_ADDR=127.0.0.1 |
| @@ -14,4 +14,4 @@ system("echo 42"); | |||
| 14 | printf("1337"); | 14 | printf("1337"); |
| 15 | ?> | 15 | ?> |
| 16 | --EXPECTF-- | 16 | --EXPECTF-- |
| 17 | Fatal error: [snuffleupagus][127.0.0.1][disabled_function] Aborted execution on call of the function 'system' in %a/disabled_functions_zero_cidr.php on line 2 \ No newline at end of file | 17 | Fatal error: [snuffleupagus][127.0.0.1][disabled_function][drop] Aborted execution on call of the function 'system' in %a/disabled_functions_zero_cidr.php on line 2 \ No newline at end of file |
diff --git a/src/tests/disable_function/disabled_native_functions_indirect.phpt b/src/tests/disable_function/disabled_native_functions_indirect.phpt index bcbb1eb..ebb1c74 100644 --- a/src/tests/disable_function/disabled_native_functions_indirect.phpt +++ b/src/tests/disable_function/disabled_native_functions_indirect.phpt | |||
| @@ -1,7 +1,7 @@ | |||
| 1 | --TEST-- | 1 | --TEST-- |
| 2 | Disabled native functions, called indirectly | 2 | Disabled native functions, called indirectly |
| 3 | --SKIPIF-- | 3 | --SKIPIF-- |
| 4 | <?php if (!extension_loaded("snuffleupagus")) die "skip"; ?> | 4 | <?php if (!extension_loaded("snuffleupagus")) print "skip"; ?> |
| 5 | --INI-- | 5 | --INI-- |
| 6 | sp.configuration_file={PWD}/config/disabled_functions.ini | 6 | sp.configuration_file={PWD}/config/disabled_functions.ini |
| 7 | --FILE-- | 7 | --FILE-- |
| @@ -9,4 +9,4 @@ sp.configuration_file={PWD}/config/disabled_functions.ini | |||
| 9 | array_map('system', [1,2,3,4]); | 9 | array_map('system', [1,2,3,4]); |
| 10 | ?> | 10 | ?> |
| 11 | --EXPECTF-- | 11 | --EXPECTF-- |
| 12 | Fatal error: [snuffleupagus][0.0.0.0][disabled_function] Aborted execution on call of the function 'system' in %a/disabled_native_functions_indirect.php on line 2 \ No newline at end of file | 12 | Fatal error: [snuffleupagus][0.0.0.0][disabled_function][drop] Aborted execution on call of the function 'system' in %a/disabled_native_functions_indirect.php on line 2 |
diff --git a/src/tests/disable_function/disabled_user_functions.phpt b/src/tests/disable_function/disabled_user_functions.phpt index 66303ec..62c357b 100644 --- a/src/tests/disable_function/disabled_user_functions.phpt +++ b/src/tests/disable_function/disabled_user_functions.phpt | |||
| @@ -1,7 +1,7 @@ | |||
| 1 | --TEST-- | 1 | --TEST-- |
| 2 | Disabled user-created functions | 2 | Disabled user-created functions |
| 3 | --SKIPIF-- | 3 | --SKIPIF-- |
| 4 | <?php if (!extension_loaded("snuffleupagus")) die "skip"; ?> | 4 | <?php if (!extension_loaded("snuffleupagus")) print "skip"; ?> |
| 5 | --INI-- | 5 | --INI-- |
| 6 | sp.configuration_file={PWD}/config/config_disabled_user_functions.ini | 6 | sp.configuration_file={PWD}/config/config_disabled_user_functions.ini |
| 7 | --FILE-- | 7 | --FILE-- |
| @@ -12,4 +12,4 @@ function my_super_function() { | |||
| 12 | my_super_function(); | 12 | my_super_function(); |
| 13 | ?> | 13 | ?> |
| 14 | --EXPECTF-- | 14 | --EXPECTF-- |
| 15 | Fatal error: [snuffleupagus][0.0.0.0][disabled_function] Aborted execution on call of the function 'my_super_function' in %a/disabled_user_functions.php on line 3 \ No newline at end of file | 15 | Fatal error: [snuffleupagus][0.0.0.0][disabled_function][drop] Aborted execution on call of the function 'my_super_function' in %a/disabled_user_functions.php on line 3 \ No newline at end of file |
diff --git a/src/tests/disable_function/disabled_user_functions_indirect.phpt b/src/tests/disable_function/disabled_user_functions_indirect.phpt index 6631866..bc57871 100644 --- a/src/tests/disable_function/disabled_user_functions_indirect.phpt +++ b/src/tests/disable_function/disabled_user_functions_indirect.phpt | |||
| @@ -1,7 +1,7 @@ | |||
| 1 | --TEST-- | 1 | --TEST-- |
| 2 | Disabled user-created functions, called indirectly | 2 | Disabled user-created functions, called indirectly |
| 3 | --SKIPIF-- | 3 | --SKIPIF-- |
| 4 | <?php if (!extension_loaded("snuffleupagus")) die "skip"; ?> | 4 | <?php if (!extension_loaded("snuffleupagus")) print "skip"; ?> |
| 5 | --INI-- | 5 | --INI-- |
| 6 | sp.configuration_file={PWD}/config/config_disabled_user_functions.ini | 6 | sp.configuration_file={PWD}/config/config_disabled_user_functions.ini |
| 7 | --FILE-- | 7 | --FILE-- |
| @@ -12,4 +12,4 @@ function my_super_function() { | |||
| 12 | array_map('my_super_function', [1,2,3,4]); | 12 | array_map('my_super_function', [1,2,3,4]); |
| 13 | ?> | 13 | ?> |
| 14 | --EXPECTF-- | 14 | --EXPECTF-- |
| 15 | Fatal error: [snuffleupagus][0.0.0.0][disabled_function] Aborted execution on call of the function 'my_super_function' in %a/disabled_user_functions_indirect.php on line 3 \ No newline at end of file | 15 | Fatal error: [snuffleupagus][0.0.0.0][disabled_function][drop] Aborted execution on call of the function 'my_super_function' in %a/disabled_user_functions_indirect.php on line 3 \ No newline at end of file |
diff --git a/src/tests/disable_function/noncore_function_hooking.phpt b/src/tests/disable_function/noncore_function_hooking.phpt index a1639e5..ac7d987 100644 --- a/src/tests/disable_function/noncore_function_hooking.phpt +++ b/src/tests/disable_function/noncore_function_hooking.phpt | |||
| @@ -12,4 +12,4 @@ function custom_fun($a) { | |||
| 12 | custom_fun("hello"); | 12 | custom_fun("hello"); |
| 13 | ?> | 13 | ?> |
| 14 | --EXPECTF-- | 14 | --EXPECTF-- |
| 15 | Fatal error: [snuffleupagus][0.0.0.0][disabled_function] Aborted execution on call of the function 'custom_fun' in %a/noncore_function_hooking.php on line 3 \ No newline at end of file | 15 | Fatal error: [snuffleupagus][0.0.0.0][disabled_function][drop] Aborted execution on call of the function 'custom_fun' in %a/noncore_function_hooking.php on line 3 \ No newline at end of file |
diff --git a/src/tests/dump_request/config/dump_request.ini b/src/tests/dump_request/config/dump_request.ini index 974601d..734b718 100644 --- a/src/tests/dump_request/config/dump_request.ini +++ b/src/tests/dump_request/config/dump_request.ini | |||
| @@ -1 +1,2 @@ | |||
| 1 | sp.disable_function.function("system").drop().dump("/tmp/dump_result/").simulation(); | 1 | sp.disable_function.function("system").drop().dump("/tmp/dump_result/").simulation(); |
| 2 | sp.disable_function.function("a").drop().dump("/tmp/dump_result/").simulation(); | ||
diff --git a/src/tests/dump_request/dump_eval_blacklist.phpt b/src/tests/dump_request/dump_eval_blacklist.phpt index f3c0b2b..07c17f2 100644 --- a/src/tests/dump_request/dump_eval_blacklist.phpt +++ b/src/tests/dump_request/dump_eval_blacklist.phpt | |||
| @@ -2,7 +2,7 @@ | |||
| 2 | Dump eval blacklist | 2 | Dump eval blacklist |
| 3 | --SKIPIF-- | 3 | --SKIPIF-- |
| 4 | <?php | 4 | <?php |
| 5 | if (!extension_loaded("snuffleupagus")) die "skip"; | 5 | if (!extension_loaded("snuffleupagus")) print "skip"; |
| 6 | ?> | 6 | ?> |
| 7 | --POST-- | 7 | --POST-- |
| 8 | post_a=data_post_a&post_b=data_post_b | 8 | post_a=data_post_a&post_b=data_post_b |
| @@ -25,16 +25,16 @@ eval('$a = strtoupper("1234");'); | |||
| 25 | echo "After eval: $a\n"; | 25 | echo "After eval: $a\n"; |
| 26 | $filename = glob('/tmp/dump_result/sp_dump.*')[0]; | 26 | $filename = glob('/tmp/dump_result/sp_dump.*')[0]; |
| 27 | $res = file($filename); | 27 | $res = file($filename); |
| 28 | if ($res[2] != "GET:get_a='data_get_a' get_b='data_get_b' \n") { | 28 | if ($res[3] != "GET:get_a='data_get_a' get_b='data_get_b' \n") { |
| 29 | echo "1\n"; | 29 | echo "Invalid GET"; |
| 30 | } elseif ($res[3] != "POST:post_a='data_post_a' post_b='data_post_b' \n") { | 30 | } elseif ($res[4] != "POST:post_a='data_post_a' post_b='data_post_b' \n") { |
| 31 | echo "2\n"; | 31 | echo "Invalid POST"; |
| 32 | } elseif ($res[4] != "COOKIE:cookie_a='data_cookie_a&cookie_b=data_cookie_b' \n") { | 32 | } elseif ($res[5] != "COOKIE:cookie_a='data_cookie_a&cookie_b=data_cookie_b' \n") { |
| 33 | echo "3\n"; | 33 | echo "Invalid COOKIE"; |
| 34 | } | 34 | } |
| 35 | ?> | 35 | ?> |
| 36 | --EXPECTF-- | 36 | --EXPECTF-- |
| 37 | Outside of eval: 1337 1337 1337 | 37 | Outside of eval: 1337 1337 1337 |
| 38 | 38 | ||
| 39 | Warning: [snuffleupagus][0.0.0.0][eval] A call to strtoupper was tried in eval, in %a/dump_eval_blacklist.php:1, logging it. in %a/dump_eval_blacklist.php(9) : eval()'d code on line 1 | 39 | Warning: [snuffleupagus][0.0.0.0][eval][simulation] A call to strtoupper was tried in eval, in %a/dump_eval_blacklist.php:1, logging it. in %a/dump_eval_blacklist.php(9) : eval()'d code on line 1 |
| 40 | After eval: 1234 | 40 | After eval: 1234 |
diff --git a/src/tests/dump_request/dump_eval_whitelist.phpt b/src/tests/dump_request/dump_eval_whitelist.phpt index d4f5305..09f5523 100644 --- a/src/tests/dump_request/dump_eval_whitelist.phpt +++ b/src/tests/dump_request/dump_eval_whitelist.phpt | |||
| @@ -2,7 +2,7 @@ | |||
| 2 | Dump eval whitelist | 2 | Dump eval whitelist |
| 3 | --SKIPIF-- | 3 | --SKIPIF-- |
| 4 | <?php | 4 | <?php |
| 5 | if (!extension_loaded("snuffleupagus")) die "skip"; | 5 | if (!extension_loaded("snuffleupagus")) print "skip"; |
| 6 | ?> | 6 | ?> |
| 7 | --POST-- | 7 | --POST-- |
| 8 | post_a=data_post_a&post_b=data_post_b | 8 | post_a=data_post_a&post_b=data_post_b |
| @@ -35,12 +35,12 @@ eval('$a = my_other_fun("1234");'); | |||
| 35 | echo "After eval: $a\n"; | 35 | echo "After eval: $a\n"; |
| 36 | $filename = glob('/tmp/dump_result/sp_dump.*')[0]; | 36 | $filename = glob('/tmp/dump_result/sp_dump.*')[0]; |
| 37 | $res = file($filename); | 37 | $res = file($filename); |
| 38 | if ($res[2] != "GET:get_a='data_get_a' get_b='data_get_b' \n") { | 38 | if ($res[3] != "GET:get_a='data_get_a' get_b='data_get_b' \n") { |
| 39 | echo "1\n"; | 39 | echo "Invalid GETn"; |
| 40 | } elseif ($res[3] != "POST:post_a='data_post_a' post_b='data_post_b' \n") { | 40 | } elseif ($res[4] != "POST:post_a='data_post_a' post_b='data_post_b' \n") { |
| 41 | echo "2\n"; | 41 | echo "Invalid POST\n"; |
| 42 | } elseif ($res[4] != "COOKIE:cookie_a='data_cookie_a&cookie_b=data_cookie_b' \n") { | 42 | } elseif ($res[5] != "COOKIE:cookie_a='data_cookie_a&cookie_b=data_cookie_b' \n") { |
| 43 | echo "3\n"; | 43 | echo "Invalid COOKIE\n"; |
| 44 | } | 44 | } |
| 45 | 45 | ||
| 46 | ?> | 46 | ?> |
| @@ -48,5 +48,5 @@ if ($res[2] != "GET:get_a='data_get_a' get_b='data_get_b' \n") { | |||
| 48 | Outside of eval: my_fun: 1337 1337 1337 | 48 | Outside of eval: my_fun: 1337 1337 1337 |
| 49 | After allowed eval: my_fun: 1234 | 49 | After allowed eval: my_fun: 1234 |
| 50 | 50 | ||
| 51 | Warning: [snuffleupagus][0.0.0.0][Eval_whitelist] The function 'my_other_fun' isn't in the eval whitelist, logging its call. in %a/dump_eval_whitelist.php on line 12 | 51 | Warning: [snuffleupagus][0.0.0.0][Eval_whitelist][simulation] The function 'my_other_fun' isn't in the eval whitelist, logging its call. in %a/dump_eval_whitelist.php on line 12 |
| 52 | After eval: my_other_fun: 1234 | 52 | After eval: my_other_fun: 1234 |
diff --git a/src/tests/dump_request/dump_request.phpt b/src/tests/dump_request/dump_request.phpt index 8e174f8..d18580b 100644 --- a/src/tests/dump_request/dump_request.phpt +++ b/src/tests/dump_request/dump_request.phpt | |||
| @@ -29,16 +29,16 @@ echo "1\n"; | |||
| 29 | system("echo 1337;"); | 29 | system("echo 1337;"); |
| 30 | $filename = glob('/tmp/dump_result/sp_dump.*')[0]; | 30 | $filename = glob('/tmp/dump_result/sp_dump.*')[0]; |
| 31 | $res = file($filename); | 31 | $res = file($filename); |
| 32 | if ($res[2] != "GET:get_a='data_get_a' get_b='data_get_b' \n") { | 32 | if ($res[3] != "GET:get_a='data_get_a' get_b='data_get_b' \n") { |
| 33 | echo "1\n"; | 33 | echo "Invalid GET"; |
| 34 | } elseif ($res[3] != "POST:post_a='data_post_a' post_b='data_post_b' \n") { | 34 | } elseif ($res[4] != "POST:post_a='data_post_a' post_b='data_post_b' \n") { |
| 35 | echo "2\n"; | 35 | echo "Invalid POST"; |
| 36 | } elseif ($res[4] != "COOKIE:cookie_a='data_cookie_a&cookie_b=data_cookie_b' \n") { | 36 | } elseif ($res[5] != "COOKIE:cookie_a='data_cookie_a&cookie_b=data_cookie_b' \n") { |
| 37 | echo "3\n"; | 37 | echo "Invalid COOKIE"; |
| 38 | } | 38 | } |
| 39 | ?> | 39 | ?> |
| 40 | --EXPECTF-- | 40 | --EXPECTF-- |
| 41 | 1 | 41 | 1 |
| 42 | 42 | ||
| 43 | Warning: [snuffleupagus][0.0.0.0][disabled_function] Aborted execution on call of the function 'system' in %a/dump_request.php on line 7 | 43 | Warning: [snuffleupagus][0.0.0.0][disabled_function][simulation] Aborted execution on call of the function 'system' in %a/dump_request.php on line 7 |
| 44 | 1337 | 44 | 1337 |
diff --git a/src/tests/dump_request/dump_request_invalid_folder.phpt b/src/tests/dump_request/dump_request_invalid_folder.phpt index 79a1935..2eea791 100644 --- a/src/tests/dump_request/dump_request_invalid_folder.phpt +++ b/src/tests/dump_request/dump_request_invalid_folder.phpt | |||
| @@ -21,6 +21,6 @@ echo "2\n"; | |||
| 21 | --EXPECTF-- | 21 | --EXPECTF-- |
| 22 | 1 | 22 | 1 |
| 23 | 23 | ||
| 24 | Warning: [snuffleupagus][0.0.0.0][request_logging] Unable to create the folder '/root/NON_EXISTENT/FOLDER/PLEASE/' in %a/dump_request_invalid_folder.php on line %d | 24 | Warning: [snuffleupagus][0.0.0.0][request_logging][log] Unable to create the folder '/root/NON_EXISTENT/FOLDER/PLEASE/' in %a/dump_request_invalid_folder.php on line %d |
| 25 | 25 | ||
| 26 | Fatal error: [snuffleupagus][0.0.0.0][disabled_function] Aborted execution on call of the function 'system' in %a/dump_request_invalid_folder.php on line %d | 26 | Fatal error: [snuffleupagus][0.0.0.0][disabled_function][drop] Aborted execution on call of the function 'system' in %a/dump_request_invalid_folder.php on line %d |
diff --git a/src/tests/dump_request/dump_request_nonwriteable_folder.phpt b/src/tests/dump_request/dump_request_nonwriteable_folder.phpt index 5292467..fc70341 100644 --- a/src/tests/dump_request/dump_request_nonwriteable_folder.phpt +++ b/src/tests/dump_request/dump_request_nonwriteable_folder.phpt | |||
| @@ -3,6 +3,7 @@ Dump request - nonwriteable folder. | |||
| 3 | --SKIPIF-- | 3 | --SKIPIF-- |
| 4 | <?php | 4 | <?php |
| 5 | if (!extension_loaded("snuffleupagus")) { print "skip"; } | 5 | if (!extension_loaded("snuffleupagus")) { print "skip"; } |
| 6 | if ("ubuntu" == getenv("CI_JOB_IMAGE")) { print "skip"; } | ||
| 6 | 7 | ||
| 7 | // root has write privileges "any" folders | 8 | // root has write privileges "any" folders |
| 8 | if (TRUE == function_exists("posix_getuid")) { | 9 | if (TRUE == function_exists("posix_getuid")) { |
| @@ -33,6 +34,6 @@ echo "2\n"; | |||
| 33 | --EXPECTF-- | 34 | --EXPECTF-- |
| 34 | 1 | 35 | 1 |
| 35 | 36 | ||
| 36 | Warning: [snuffleupagus][0.0.0.0][request_logging] Unable to open %a: Permission denied in %a/dump_request_nonwriteable_folder.php on line %d | 37 | Warning: [snuffleupagus][0.0.0.0][request_logging][log] Unable to open %a: Permission denied in %a/dump_request_nonwriteable_folder.php on line %d |
| 37 | 38 | ||
| 38 | Fatal error: [snuffleupagus][0.0.0.0][disabled_function] Aborted execution on call of the function 'system' in %a/dump_request_nonwriteable_folder.php on line 3 | 39 | Fatal error: [snuffleupagus][0.0.0.0][disabled_function][drop] Aborted execution on call of the function 'system' in %a/dump_request_nonwriteable_folder.php on line 3 |
diff --git a/src/tests/dump_request/dump_request_stacktrace.phpt b/src/tests/dump_request/dump_request_stacktrace.phpt new file mode 100644 index 0000000..0a8b94e --- /dev/null +++ b/src/tests/dump_request/dump_request_stacktrace.phpt | |||
| @@ -0,0 +1,58 @@ | |||
| 1 | --TEST-- | ||
| 2 | Dump request | ||
| 3 | --SKIPIF-- | ||
| 4 | <?php | ||
| 5 | if (!extension_loaded("snuffleupagus")) { | ||
| 6 | print "skip"; | ||
| 7 | } | ||
| 8 | |||
| 9 | foreach (glob("/tmp/dump_result/sp_dump.*") as $dump) { | ||
| 10 | @unlink($dump); | ||
| 11 | } | ||
| 12 | @rmdir("/tmp/dump_result/"); | ||
| 13 | ?> | ||
| 14 | --POST-- | ||
| 15 | post_a=data_post_a&post_b=data_post_b | ||
| 16 | --GET-- | ||
| 17 | get_a=data_get_a&get_b=data_get_b | ||
| 18 | --COOKIE-- | ||
| 19 | cookie_a=data_cookie_a&cookie_b=data_cookie_b | ||
| 20 | --INI-- | ||
| 21 | sp.configuration_file={PWD}/config/dump_request.ini | ||
| 22 | --FILE-- | ||
| 23 | <?php | ||
| 24 | @mkdir("/tmp/dump_result/"); | ||
| 25 | foreach (glob("/tmp/dump_result/sp_dump.*") as $dump) { | ||
| 26 | @unlink($dump); | ||
| 27 | } | ||
| 28 | echo "1\n"; | ||
| 29 | function a(){ echo "a"; } | ||
| 30 | function b(){ a(); } | ||
| 31 | function c(){ b(); } | ||
| 32 | function d(){ c(); } | ||
| 33 | d(); | ||
| 34 | |||
| 35 | $filename = glob('/tmp/dump_result/sp_dump.*')[0]; | ||
| 36 | $res = file($filename); | ||
| 37 | //var_dump($res) . "\n"; | ||
| 38 | if ($res[2] != "STACKTRACE: a:7\n") { | ||
| 39 | echo "Invalid STACKTRACE for a"; | ||
| 40 | } elseif ($res[3] != "STACKTRACE: b:8\n") { | ||
| 41 | echo "Invalid STACKTRACE for b"; | ||
| 42 | } elseif ($res[4] != "STACKTRACE: c:9\n") { | ||
| 43 | echo "Invalid STACKTRACE for c"; | ||
| 44 | } elseif ($res[5] != "STACKTRACE: d:10\n") { | ||
| 45 | echo "Invalid STACKTRACE for d"; | ||
| 46 | } elseif ($res[6] != "GET:get_a='data_get_a' get_b='data_get_b' \n") { | ||
| 47 | echo "Invalid GET"; | ||
| 48 | } elseif ($res[7] != "POST:post_a='data_post_a' post_b='data_post_b' \n") { | ||
| 49 | echo "Invalid POST"; | ||
| 50 | } elseif ($res[8] != "COOKIE:cookie_a='data_cookie_a&cookie_b=data_cookie_b' \n") { | ||
| 51 | echo "Invalid COOKIE"; | ||
| 52 | } | ||
| 53 | ?> | ||
| 54 | --EXPECTF-- | ||
| 55 | 1 | ||
| 56 | |||
| 57 | Warning: [snuffleupagus][0.0.0.0][disabled_function][simulation] Aborted execution on call of the function 'a' in %a/dump_request_stacktrace.php on line 7 | ||
| 58 | a | ||
diff --git a/src/tests/dump_request/dump_request_too_big.phpt b/src/tests/dump_request/dump_request_too_big.phpt index 6a3f590..e82ddc4 100644 --- a/src/tests/dump_request/dump_request_too_big.phpt +++ b/src/tests/dump_request/dump_request_too_big.phpt | |||
| @@ -29,16 +29,16 @@ echo "1\n"; | |||
| 29 | system("echo 1337;"); | 29 | system("echo 1337;"); |
| 30 | $filename = glob('/tmp/dump_result/*')[0]; | 30 | $filename = glob('/tmp/dump_result/*')[0]; |
| 31 | $res = file($filename); | 31 | $res = file($filename); |
| 32 | if ($res[2] != "GET:get_a='data_get_a' get_b='data_get_b' get_c='aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa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aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaBBBB' \n") { |
| 33 | echo "1\n"; | 33 | echo "Invalid GET"; |
| 34 | } elseif ($res[3] != "POST:post_a='data_post_a' post_b='data_post_b' post_c='c' \n") { | 34 | } elseif ($res[4] != "POST:post_a='data_post_a' post_b='data_post_b' post_c='c' \n") { |
| 35 | echo "2\n"; | 35 | echo "Invalid POST"; |
| 36 | } elseif ($res[4] != "COOKIE:cookie_a='data_cookie_a&cookie_b=data_cookie_b&data_cookie_c=cookie_c' \n") { | 36 | } elseif ($res[5] != "COOKIE:cookie_a='data_cookie_a&cookie_b=data_cookie_b&data_cookie_c=cookie_c' \n") { |
| 37 | echo "3\n"; | 37 | echo "Invalid COOKIE"; |
| 38 | } | 38 | } |
| 39 | ?> | 39 | ?> |
| 40 | --EXPECTF-- | 40 | --EXPECTF-- |
| 41 | 1 | 41 | 1 |
| 42 | 42 | ||
| 43 | Warning: [snuffleupagus][127.0.0.1][disabled_function] Aborted execution on call of the function 'system' in %a/dump_request_too_big.php on line 8 | 43 | Warning: [snuffleupagus][127.0.0.1][disabled_function][simulation] Aborted execution on call of the function 'system' in %a/dump_request_too_big.php on line 8 |
| 44 | 1337 | 44 | 1337 |
diff --git a/src/tests/dump_request/dump_segfault1.phpt b/src/tests/dump_request/dump_segfault1.phpt index 27f8af8..4e241d7 100644 --- a/src/tests/dump_request/dump_segfault1.phpt +++ b/src/tests/dump_request/dump_segfault1.phpt | |||
| @@ -1,7 +1,7 @@ | |||
| 1 | --TEST-- | 1 | --TEST-- |
| 2 | Disable functions check on `ret` with an alias | 2 | Disable functions check on `ret` with an alias |
| 3 | --SKIPIF-- | 3 | --SKIPIF-- |
| 4 | <?php if (!extension_loaded("snuffleupagus")) die "skip"; ?> | 4 | <?php if (!extension_loaded("snuffleupagus")) print "skip"; ?> |
| 5 | --INI-- | 5 | --INI-- |
| 6 | sp.configuration_file={PWD}/config/config_dump_segfault1.ini | 6 | sp.configuration_file={PWD}/config/config_dump_segfault1.ini |
| 7 | --FILE-- | 7 | --FILE-- |
| @@ -9,4 +9,4 @@ sp.configuration_file={PWD}/config/config_dump_segfault1.ini | |||
| 9 | echo strpos("pouet", "p") . "\n"; | 9 | echo strpos("pouet", "p") . "\n"; |
| 10 | ?> | 10 | ?> |
| 11 | --EXPECTF-- | 11 | --EXPECTF-- |
| 12 | Fatal error: [snuffleupagus][0.0.0.0][disabled_function] Aborted execution on return of the function 'strpos', because the function returned '0', which matched the rule 'test' in %a/dump_segfault1.php on line 2 \ No newline at end of file | 12 | Fatal error: [snuffleupagus][0.0.0.0][disabled_function][drop] Aborted execution on return of the function 'strpos', because the function returned '0', which matched the rule 'test' in %a/dump_segfault1.php on line 2 \ No newline at end of file |
diff --git a/src/tests/eval_blacklist/eval_backlist.phpt b/src/tests/eval_blacklist/eval_backlist.phpt index 67643d7..fa32b4b 100644 --- a/src/tests/eval_blacklist/eval_backlist.phpt +++ b/src/tests/eval_blacklist/eval_backlist.phpt | |||
| @@ -1,7 +1,7 @@ | |||
| 1 | --TEST-- | 1 | --TEST-- |
| 2 | Eval blacklist | 2 | Eval blacklist |
| 3 | --SKIPIF-- | 3 | --SKIPIF-- |
| 4 | <?php if (!extension_loaded("snuffleupagus")) die "skip"; ?> | 4 | <?php if (!extension_loaded("snuffleupagus")) print "skip"; ?> |
| 5 | --INI-- | 5 | --INI-- |
| 6 | sp.configuration_file={PWD}/config/eval_backlist.ini | 6 | sp.configuration_file={PWD}/config/eval_backlist.ini |
| 7 | --FILE-- | 7 | --FILE-- |
| @@ -14,4 +14,4 @@ echo "After eval: $a\n"; | |||
| 14 | --EXPECTF-- | 14 | --EXPECTF-- |
| 15 | Outside of eval: 1337 1337 1337 | 15 | Outside of eval: 1337 1337 1337 |
| 16 | 16 | ||
| 17 | Fatal error: [snuffleupagus][0.0.0.0][eval] A call to strtoupper was tried in eval, in %a/eval_backlist.php:1, dropping it. in %a/eval_backlist.php(4) : eval()'d code on line 1 | 17 | Fatal error: [snuffleupagus][0.0.0.0][eval][drop] A call to strtoupper was tried in eval, in %a/eval_backlist.php:1, dropping it. in %a/eval_backlist.php(4) : eval()'d code on line 1 |
diff --git a/src/tests/eval_blacklist/eval_backlist_call_user_func.phpt b/src/tests/eval_blacklist/eval_backlist_call_user_func.phpt index 7578eac..4c37263 100644 --- a/src/tests/eval_blacklist/eval_backlist_call_user_func.phpt +++ b/src/tests/eval_blacklist/eval_backlist_call_user_func.phpt | |||
| @@ -1,7 +1,7 @@ | |||
| 1 | --TEST-- | 1 | --TEST-- |
| 2 | Eval blacklist - with several calls in an eval. | 2 | Eval blacklist - with several calls in an eval. |
| 3 | --SKIPIF-- | 3 | --SKIPIF-- |
| 4 | <?php if (!extension_loaded("snuffleupagus")) die "skip"; ?> | 4 | <?php if (!extension_loaded("snuffleupagus")) print "skip"; ?> |
| 5 | --INI-- | 5 | --INI-- |
| 6 | sp.configuration_file={PWD}/config/eval_backlist.ini | 6 | sp.configuration_file={PWD}/config/eval_backlist.ini |
| 7 | --FILE-- | 7 | --FILE-- |
| @@ -11,4 +11,4 @@ eval(' | |||
| 11 | ') | 11 | ') |
| 12 | ?> | 12 | ?> |
| 13 | --EXPECTF-- | 13 | --EXPECTF-- |
| 14 | Fatal error: [snuffleupagus][0.0.0.0][eval] A call to strtoupper was tried in eval, in %s/eval_backlist_call_user_func.php:%d, dropping it. in %s/eval_backlist_call_user_func.php(%d) : eval()'d code on line %d | 14 | Fatal error: [snuffleupagus][0.0.0.0][eval][drop] A call to strtoupper was tried in eval, in %s/eval_backlist_call_user_func.php:%d, dropping it. in %s/eval_backlist_call_user_func.php(%d) : eval()'d code on line %d |
diff --git a/src/tests/eval_blacklist/eval_backlist_chained.phpt b/src/tests/eval_blacklist/eval_backlist_chained.phpt index 7eabc02..820ef1d 100644 --- a/src/tests/eval_blacklist/eval_backlist_chained.phpt +++ b/src/tests/eval_blacklist/eval_backlist_chained.phpt | |||
| @@ -1,7 +1,7 @@ | |||
| 1 | --TEST-- | 1 | --TEST-- |
| 2 | Eval blacklist - with several calls in an eval. | 2 | Eval blacklist - with several calls in an eval. |
| 3 | --SKIPIF-- | 3 | --SKIPIF-- |
| 4 | <?php if (!extension_loaded("snuffleupagus")) die "skip"; ?> | 4 | <?php if (!extension_loaded("snuffleupagus")) print "skip"; ?> |
| 5 | --INI-- | 5 | --INI-- |
| 6 | sp.configuration_file={PWD}/config/eval_backlist.ini | 6 | sp.configuration_file={PWD}/config/eval_backlist.ini |
| 7 | --FILE-- | 7 | --FILE-- |
| @@ -13,4 +13,4 @@ eval(' | |||
| 13 | ') | 13 | ') |
| 14 | ?> | 14 | ?> |
| 15 | --EXPECTF-- | 15 | --EXPECTF-- |
| 16 | Fatal error: [snuffleupagus][0.0.0.0][eval] A call to strtoupper was tried in eval, in %s/eval_backlist_chained.php:%d, dropping it. in %s/eval_backlist_chained.php(%d) : eval()'d code on line %d | 16 | Fatal error: [snuffleupagus][0.0.0.0][eval][drop] A call to strtoupper was tried in eval, in %s/eval_backlist_chained.php:%d, dropping it. in %s/eval_backlist_chained.php(%d) : eval()'d code on line %d |
diff --git a/src/tests/eval_blacklist/eval_backlist_list.phpt b/src/tests/eval_blacklist/eval_backlist_list.phpt index 7cb0183..725a9bb 100644 --- a/src/tests/eval_blacklist/eval_backlist_list.phpt +++ b/src/tests/eval_blacklist/eval_backlist_list.phpt | |||
| @@ -1,7 +1,7 @@ | |||
| 1 | --TEST-- | 1 | --TEST-- |
| 2 | Eval blacklist - with a list of functions | 2 | Eval blacklist - with a list of functions |
| 3 | --SKIPIF-- | 3 | --SKIPIF-- |
| 4 | <?php if (!extension_loaded("snuffleupagus")) die "skip"; ?> | 4 | <?php if (!extension_loaded("snuffleupagus")) print "skip"; ?> |
| 5 | --INI-- | 5 | --INI-- |
| 6 | sp.configuration_file={PWD}/config/eval_backlist_list.ini | 6 | sp.configuration_file={PWD}/config/eval_backlist_list.ini |
| 7 | --FILE-- | 7 | --FILE-- |
| @@ -14,4 +14,4 @@ echo "After eval: $a\n"; | |||
| 14 | --EXPECTF-- | 14 | --EXPECTF-- |
| 15 | Outside of eval: 1337 1337 1337 | 15 | Outside of eval: 1337 1337 1337 |
| 16 | 16 | ||
| 17 | Fatal error: [snuffleupagus][0.0.0.0][eval] A call to strtoupper was tried in eval, in %a/eval_backlist_list.php:1, dropping it. in %a/eval_backlist_list.php(4) : eval()'d code on line 1 | 17 | Fatal error: [snuffleupagus][0.0.0.0][eval][drop] A call to strtoupper was tried in eval, in %a/eval_backlist_list.php:1, dropping it. in %a/eval_backlist_list.php(4) : eval()'d code on line 1 |
diff --git a/src/tests/eval_blacklist/eval_backlist_simulation.phpt b/src/tests/eval_blacklist/eval_backlist_simulation.phpt index d81398c..f09370d 100644 --- a/src/tests/eval_blacklist/eval_backlist_simulation.phpt +++ b/src/tests/eval_blacklist/eval_backlist_simulation.phpt | |||
| @@ -1,7 +1,7 @@ | |||
| 1 | --TEST-- | 1 | --TEST-- |
| 2 | Eval blacklist simulation | 2 | Eval blacklist simulation |
| 3 | --SKIPIF-- | 3 | --SKIPIF-- |
| 4 | <?php if (!extension_loaded("snuffleupagus")) die "skip"; ?> | 4 | <?php if (!extension_loaded("snuffleupagus")) print "skip"; ?> |
| 5 | --INI-- | 5 | --INI-- |
| 6 | sp.configuration_file={PWD}/config/eval_backlist_simulation.ini | 6 | sp.configuration_file={PWD}/config/eval_backlist_simulation.ini |
| 7 | --FILE-- | 7 | --FILE-- |
| @@ -14,5 +14,5 @@ echo "After eval: $a\n"; | |||
| 14 | --EXPECTF-- | 14 | --EXPECTF-- |
| 15 | Outside of eval: 1337 1337 1337 | 15 | Outside of eval: 1337 1337 1337 |
| 16 | 16 | ||
| 17 | Warning: [snuffleupagus][0.0.0.0][eval] A call to strtoupper was tried in eval, in %a/eval_backlist_simulation.php:1, logging it. in %a/eval_backlist_simulation.php(4) : eval()'d code on line 1 | 17 | Warning: [snuffleupagus][0.0.0.0][eval][simulation] A call to strtoupper was tried in eval, in %a/eval_backlist_simulation.php:1, logging it. in %a/eval_backlist_simulation.php(4) : eval()'d code on line 1 |
| 18 | After eval: 1234 | 18 | After eval: 1234 |
diff --git a/src/tests/eval_blacklist/eval_backlist_whitelist.phpt b/src/tests/eval_blacklist/eval_backlist_whitelist.phpt index 7e6524b..de81402 100644 --- a/src/tests/eval_blacklist/eval_backlist_whitelist.phpt +++ b/src/tests/eval_blacklist/eval_backlist_whitelist.phpt | |||
| @@ -1,7 +1,7 @@ | |||
| 1 | --TEST-- | 1 | --TEST-- |
| 2 | Eval whitelist | 2 | Eval whitelist |
| 3 | --SKIPIF-- | 3 | --SKIPIF-- |
| 4 | <?php if (!extension_loaded("snuffleupagus")) die "skip"; ?> | 4 | <?php if (!extension_loaded("snuffleupagus")) print "skip"; ?> |
| 5 | --INI-- | 5 | --INI-- |
| 6 | sp.configuration_file={PWD}/config/eval_whitelist_blacklist.ini | 6 | sp.configuration_file={PWD}/config/eval_whitelist_blacklist.ini |
| 7 | --FILE-- | 7 | --FILE-- |
| @@ -21,4 +21,4 @@ echo "After eval: $a\n"; | |||
| 21 | Outside of eval: my_fun: 1337 1337 1337 | 21 | Outside of eval: my_fun: 1337 1337 1337 |
| 22 | After allowed eval: my_fun: 1234 | 22 | After allowed eval: my_fun: 1234 |
| 23 | 23 | ||
| 24 | Fatal error: [snuffleupagus][0.0.0.0][Eval_whitelist] The function 'cos' isn't in the eval whitelist, dropping its call. in %a/eval_backlist_whitelist.php(10) : eval()'d code on line 1 \ No newline at end of file | 24 | Fatal error: [snuffleupagus][0.0.0.0][Eval_whitelist][drop] The function 'cos' isn't in the eval whitelist, dropping its call. in %a/eval_backlist_whitelist.php(10) : eval()'d code on line 1 \ No newline at end of file |
diff --git a/src/tests/eval_blacklist/eval_backlist_whitelist_builtin.phpt b/src/tests/eval_blacklist/eval_backlist_whitelist_builtin.phpt index 8b05821..82abe02 100644 --- a/src/tests/eval_blacklist/eval_backlist_whitelist_builtin.phpt +++ b/src/tests/eval_blacklist/eval_backlist_whitelist_builtin.phpt | |||
| @@ -1,7 +1,7 @@ | |||
| 1 | --TEST-- | 1 | --TEST-- |
| 2 | Eval whitelist/blacklist, on builtin functions | 2 | Eval whitelist/blacklist, on builtin functions |
| 3 | --SKIPIF-- | 3 | --SKIPIF-- |
| 4 | <?php if (!extension_loaded("snuffleupagus")) die "skip"; ?> | 4 | <?php if (!extension_loaded("snuffleupagus")) print "skip"; ?> |
| 5 | --INI-- | 5 | --INI-- |
| 6 | sp.configuration_file={PWD}/config/eval_whitelist_blacklist.ini | 6 | sp.configuration_file={PWD}/config/eval_whitelist_blacklist.ini |
| 7 | --FILE-- | 7 | --FILE-- |
| @@ -21,4 +21,4 @@ echo "After eval: $a\n"; | |||
| 21 | Outside of eval: 1.5574077246549 | 21 | Outside of eval: 1.5574077246549 |
| 22 | After allowed eval: 1.5574077246549 | 22 | After allowed eval: 1.5574077246549 |
| 23 | 23 | ||
| 24 | Fatal error: [snuffleupagus][0.0.0.0][Eval_whitelist] The function 'cos' isn't in the eval whitelist, dropping its call. in %a/eval_backlist_whitelist_builtin.php(10) : eval()'d code on line 1 \ No newline at end of file | 24 | Fatal error: [snuffleupagus][0.0.0.0][Eval_whitelist][drop] The function 'cos' isn't in the eval whitelist, dropping its call. in %a/eval_backlist_whitelist_builtin.php(10) : eval()'d code on line 1 \ No newline at end of file |
diff --git a/src/tests/eval_blacklist/eval_whitelist.phpt b/src/tests/eval_blacklist/eval_whitelist.phpt index d5b9d1c..016b599 100644 --- a/src/tests/eval_blacklist/eval_whitelist.phpt +++ b/src/tests/eval_blacklist/eval_whitelist.phpt | |||
| @@ -1,7 +1,7 @@ | |||
| 1 | --TEST-- | 1 | --TEST-- |
| 2 | Eval whitelist | 2 | Eval whitelist |
| 3 | --SKIPIF-- | 3 | --SKIPIF-- |
| 4 | <?php if (!extension_loaded("snuffleupagus")) die "skip"; ?> | 4 | <?php if (!extension_loaded("snuffleupagus")) print "skip"; ?> |
| 5 | --INI-- | 5 | --INI-- |
| 6 | sp.configuration_file={PWD}/config/eval_whitelist.ini | 6 | sp.configuration_file={PWD}/config/eval_whitelist.ini |
| 7 | --FILE-- | 7 | --FILE-- |
| @@ -25,4 +25,4 @@ echo "After eval: $a\n"; | |||
| 25 | Outside of eval: my_fun: 1337 1337 1337 | 25 | Outside of eval: my_fun: 1337 1337 1337 |
| 26 | After allowed eval: my_fun: 1234 | 26 | After allowed eval: my_fun: 1234 |
| 27 | 27 | ||
| 28 | Fatal error: [snuffleupagus][0.0.0.0][Eval_whitelist] The function 'my_other_fun' isn't in the eval whitelist, dropping its call. in %a/eval_whitelist.php on line 7 \ No newline at end of file | 28 | Fatal error: [snuffleupagus][0.0.0.0][Eval_whitelist][drop] The function 'my_other_fun' isn't in the eval whitelist, dropping its call. in %a/eval_whitelist.php on line 7 \ No newline at end of file |
diff --git a/src/tests/eval_blacklist/eval_whitelist_builtin.phpt b/src/tests/eval_blacklist/eval_whitelist_builtin.phpt index 9b406b5..4494878 100644 --- a/src/tests/eval_blacklist/eval_whitelist_builtin.phpt +++ b/src/tests/eval_blacklist/eval_whitelist_builtin.phpt | |||
| @@ -1,7 +1,7 @@ | |||
| 1 | --TEST-- | 1 | --TEST-- |
| 2 | Eval whitelist - builtin function | 2 | Eval whitelist - builtin function |
| 3 | --SKIPIF-- | 3 | --SKIPIF-- |
| 4 | <?php if (!extension_loaded("snuffleupagus")) die "skip"; ?> | 4 | <?php if (!extension_loaded("snuffleupagus")) print "skip"; ?> |
| 5 | --INI-- | 5 | --INI-- |
| 6 | sp.configuration_file={PWD}/config/eval_whitelist.ini | 6 | sp.configuration_file={PWD}/config/eval_whitelist.ini |
| 7 | --FILE-- | 7 | --FILE-- |
| @@ -17,4 +17,4 @@ echo "After eval: $a\n"; | |||
| 17 | Outside of eval: 0.54030230586814 | 17 | Outside of eval: 0.54030230586814 |
| 18 | After allowed eval: 0.28366218546323 | 18 | After allowed eval: 0.28366218546323 |
| 19 | 19 | ||
| 20 | Fatal error: [snuffleupagus][0.0.0.0][Eval_whitelist] The function 'sin' isn't in the eval whitelist, dropping its call. in %a/eval_whitelist_builtin.php(6) : eval()'d code on line 1 \ No newline at end of file | 20 | Fatal error: [snuffleupagus][0.0.0.0][Eval_whitelist][drop] The function 'sin' isn't in the eval whitelist, dropping its call. in %a/eval_whitelist_builtin.php(6) : eval()'d code on line 1 \ No newline at end of file |
diff --git a/src/tests/eval_blacklist/eval_whitelist_include_then_user.phpt b/src/tests/eval_blacklist/eval_whitelist_include_then_user.phpt index f3be8a8..825480f 100644 --- a/src/tests/eval_blacklist/eval_whitelist_include_then_user.phpt +++ b/src/tests/eval_blacklist/eval_whitelist_include_then_user.phpt | |||
| @@ -1,7 +1,7 @@ | |||
| 1 | --TEST-- | 1 | --TEST-- |
| 2 | Eval whitelist - builtin function | 2 | Eval whitelist - builtin function |
| 3 | --SKIPIF-- | 3 | --SKIPIF-- |
| 4 | <?php if (!extension_loaded("snuffleupagus")) die "skip"; ?> | 4 | <?php if (!extension_loaded("snuffleupagus")) print "skip"; ?> |
| 5 | --INI-- | 5 | --INI-- |
| 6 | sp.configuration_file={PWD}/config/eval_whitelist.ini | 6 | sp.configuration_file={PWD}/config/eval_whitelist.ini |
| 7 | --FILE-- | 7 | --FILE-- |
| @@ -27,4 +27,4 @@ unlink($dir . '/test.bla'); | |||
| 27 | Outside of eval: 0.54030230586814 | 27 | Outside of eval: 0.54030230586814 |
| 28 | After allowed eval: 0.28366218546323 | 28 | After allowed eval: 0.28366218546323 |
| 29 | 29 | ||
| 30 | Fatal error: [snuffleupagus][0.0.0.0][Eval_whitelist] The function 'sin' isn't in the eval whitelist, dropping its call. in %a/test.bla on line 1 \ No newline at end of file | 30 | Fatal error: [snuffleupagus][0.0.0.0][Eval_whitelist][drop] The function 'sin' isn't in the eval whitelist, dropping its call. in %a/test.bla on line 1 \ No newline at end of file |
diff --git a/src/tests/eval_blacklist/eval_whitelist_simulation.phpt b/src/tests/eval_blacklist/eval_whitelist_simulation.phpt index 7648dad..0f6f879 100644 --- a/src/tests/eval_blacklist/eval_whitelist_simulation.phpt +++ b/src/tests/eval_blacklist/eval_whitelist_simulation.phpt | |||
| @@ -1,7 +1,7 @@ | |||
| 1 | --TEST-- | 1 | --TEST-- |
| 2 | Eval whitelist simulation | 2 | Eval whitelist simulation |
| 3 | --SKIPIF-- | 3 | --SKIPIF-- |
| 4 | <?php if (!extension_loaded("snuffleupagus")) die "skip"; ?> | 4 | <?php if (!extension_loaded("snuffleupagus")) print "skip"; ?> |
| 5 | --INI-- | 5 | --INI-- |
| 6 | sp.configuration_file={PWD}/config/eval_whitelist_simulation.ini | 6 | sp.configuration_file={PWD}/config/eval_whitelist_simulation.ini |
| 7 | --FILE-- | 7 | --FILE-- |
| @@ -25,5 +25,5 @@ echo "After eval: $a\n"; | |||
| 25 | Outside of eval: my_fun: 1337 1337 1337 | 25 | Outside of eval: my_fun: 1337 1337 1337 |
| 26 | After allowed eval: my_fun: 1234 | 26 | After allowed eval: my_fun: 1234 |
| 27 | 27 | ||
| 28 | Warning: [snuffleupagus][0.0.0.0][Eval_whitelist] The function 'my_other_fun' isn't in the eval whitelist, logging its call. in %a/eval_whitelist_simulation.php on line 7 | 28 | Warning: [snuffleupagus][0.0.0.0][Eval_whitelist][simulation] The function 'my_other_fun' isn't in the eval whitelist, logging its call. in %a/eval_whitelist_simulation.php on line 7 |
| 29 | After eval: my_other_fun: 1234 \ No newline at end of file | 29 | After eval: my_other_fun: 1234 \ No newline at end of file |
diff --git a/src/tests/eval_blacklist/eval_whitelist_user_then_builtin.phpt b/src/tests/eval_blacklist/eval_whitelist_user_then_builtin.phpt index aeb4d70..6d4a579 100644 --- a/src/tests/eval_blacklist/eval_whitelist_user_then_builtin.phpt +++ b/src/tests/eval_blacklist/eval_whitelist_user_then_builtin.phpt | |||
| @@ -1,7 +1,7 @@ | |||
| 1 | --TEST-- | 1 | --TEST-- |
| 2 | Eval whitelist - builtin function | 2 | Eval whitelist - builtin function |
| 3 | --SKIPIF-- | 3 | --SKIPIF-- |
| 4 | <?php if (!extension_loaded("snuffleupagus")) die "skip"; ?> | 4 | <?php if (!extension_loaded("snuffleupagus")) print "skip"; ?> |
| 5 | --INI-- | 5 | --INI-- |
| 6 | sp.configuration_file={PWD}/config/eval_whitelist.ini | 6 | sp.configuration_file={PWD}/config/eval_whitelist.ini |
| 7 | --FILE-- | 7 | --FILE-- |
| @@ -21,4 +21,4 @@ echo "After eval: $a\n"; | |||
| 21 | --EXPECTF-- | 21 | --EXPECTF-- |
| 22 | Outside of eval: -0.54402111088937 | 22 | Outside of eval: -0.54402111088937 |
| 23 | 23 | ||
| 24 | Fatal error: [snuffleupagus][0.0.0.0][Eval_whitelist] The function 'sin' isn't in the eval whitelist, dropping its call. in %a/eval_whitelist_user_then_builtin.php on line 4 \ No newline at end of file | 24 | Fatal error: [snuffleupagus][0.0.0.0][Eval_whitelist][drop] The function 'sin' isn't in the eval whitelist, dropping its call. in %a/eval_whitelist_user_then_builtin.php on line 4 \ No newline at end of file |
diff --git a/src/tests/eval_blacklist/nested_eval_blacklist.phpt b/src/tests/eval_blacklist/nested_eval_blacklist.phpt index 2d99449..8ff0b6d 100644 --- a/src/tests/eval_blacklist/nested_eval_blacklist.phpt +++ b/src/tests/eval_blacklist/nested_eval_blacklist.phpt | |||
| @@ -1,7 +1,7 @@ | |||
| 1 | --TEST-- | 1 | --TEST-- |
| 2 | Eval blacklist - nested eval | 2 | Eval blacklist - nested eval |
| 3 | --SKIPIF-- | 3 | --SKIPIF-- |
| 4 | <?php if (!extension_loaded("snuffleupagus")) die "skip"; ?> | 4 | <?php if (!extension_loaded("snuffleupagus")) print "skip"; ?> |
| 5 | --INI-- | 5 | --INI-- |
| 6 | sp.configuration_file={PWD}/config/eval_backlist.ini | 6 | sp.configuration_file={PWD}/config/eval_backlist.ini |
| 7 | --FILE-- | 7 | --FILE-- |
| @@ -26,4 +26,4 @@ Inception lvl 1... | |||
| 26 | Inception lvl 2... | 26 | Inception lvl 2... |
| 27 | Inception lvl 3... | 27 | Inception lvl 3... |
| 28 | 28 | ||
| 29 | Fatal error: [snuffleupagus][0.0.0.0][eval] A call to strtoupper was tried in eval, in %a/nested_eval_blacklist.php(5) : eval()'d code(4) : eval()'d code:3, dropping it. in %a/nested_eval_blacklist.php(5) : eval()'d code(4) : eval()'d code(4) : eval()'d code on line 3 | 29 | Fatal error: [snuffleupagus][0.0.0.0][eval][drop] A call to strtoupper was tried in eval, in %a/nested_eval_blacklist.php(5) : eval()'d code(4) : eval()'d code:3, dropping it. in %a/nested_eval_blacklist.php(5) : eval()'d code(4) : eval()'d code(4) : eval()'d code on line 3 |
diff --git a/src/tests/eval_blacklist/nested_eval_blacklist2.phpt b/src/tests/eval_blacklist/nested_eval_blacklist2.phpt index d84a1f6..37f8967 100644 --- a/src/tests/eval_blacklist/nested_eval_blacklist2.phpt +++ b/src/tests/eval_blacklist/nested_eval_blacklist2.phpt | |||
| @@ -1,7 +1,7 @@ | |||
| 1 | --TEST-- | 1 | --TEST-- |
| 2 | Eval blacklist - nested eval, with a twist | 2 | Eval blacklist - nested eval, with a twist |
| 3 | --SKIPIF-- | 3 | --SKIPIF-- |
| 4 | <?php if (!extension_loaded("snuffleupagus")) die "skip"; ?> | 4 | <?php if (!extension_loaded("snuffleupagus")) print "skip"; ?> |
| 5 | --INI-- | 5 | --INI-- |
| 6 | sp.configuration_file={PWD}/config/eval_backlist.ini | 6 | sp.configuration_file={PWD}/config/eval_backlist.ini |
| 7 | --FILE-- | 7 | --FILE-- |
| @@ -26,4 +26,4 @@ Inception lvl 1... | |||
| 26 | Inception lvl 2... | 26 | Inception lvl 2... |
| 27 | Inception lvl 3... | 27 | Inception lvl 3... |
| 28 | 28 | ||
| 29 | Fatal error: [snuffleupagus][0.0.0.0][eval] A call to strtoupper was tried in eval, in %a/nested_eval_blacklist2.php(5) : eval()'d code:7, dropping it. in %a/nested_eval_blacklist2.php(5) : eval()'d code(4) : eval()'d code on line 7 | 29 | Fatal error: [snuffleupagus][0.0.0.0][eval][drop] A call to strtoupper was tried in eval, in %a/nested_eval_blacklist2.php(5) : eval()'d code:7, dropping it. in %a/nested_eval_blacklist2.php(5) : eval()'d code(4) : eval()'d code on line 7 |
diff --git a/src/tests/glob_config.phpt b/src/tests/glob_config.phpt index 2d62c3a..499d20b 100644 --- a/src/tests/glob_config.phpt +++ b/src/tests/glob_config.phpt | |||
| @@ -1,7 +1,7 @@ | |||
| 1 | --TEST-- | 1 | --TEST-- |
| 2 | Multiple configuration files | 2 | Multiple configuration files |
| 3 | --SKIPIF-- | 3 | --SKIPIF-- |
| 4 | <?php if (!extension_loaded("snuffleupagus")) die "skip"; ?> | 4 | <?php if (!extension_loaded("snuffleupagus")) print "skip"; ?> |
| 5 | --INI-- | 5 | --INI-- |
| 6 | sp.configuration_file={PWD}/config/config_multi*.ini | 6 | sp.configuration_file={PWD}/config/config_multi*.ini |
| 7 | --FILE-- | 7 | --FILE-- |
| @@ -16,8 +16,8 @@ foo(); | |||
| 16 | bla(); | 16 | bla(); |
| 17 | ?> | 17 | ?> |
| 18 | --EXPECTF-- | 18 | --EXPECTF-- |
| 19 | Warning: [snuffleupagus][0.0.0.0][disabled_function] Aborted execution on call of the function 'foo' in %a/glob_config.php on line 3 | 19 | Warning: [snuffleupagus][0.0.0.0][disabled_function][simulation] Aborted execution on call of the function 'foo' in %a/glob_config.php on line 3 |
| 20 | 1 | 20 | 1 |
| 21 | 21 | ||
| 22 | Warning: [snuffleupagus][0.0.0.0][disabled_function] Aborted execution on call of the function 'bla' in %a/glob_config.php on line 6 | 22 | Warning: [snuffleupagus][0.0.0.0][disabled_function][simulation] Aborted execution on call of the function 'bla' in %a/glob_config.php on line 6 |
| 23 | 2 \ No newline at end of file | 23 | 2 \ No newline at end of file |
diff --git a/src/tests/global_strict/global_strict.phpt b/src/tests/global_strict/global_strict.phpt index e06721c..07dc979 100644 --- a/src/tests/global_strict/global_strict.phpt +++ b/src/tests/global_strict/global_strict.phpt | |||
| @@ -2,6 +2,7 @@ | |||
| 2 | Global strict mode | 2 | Global strict mode |
| 3 | --SKIPIF-- | 3 | --SKIPIF-- |
| 4 | <?php if (!extension_loaded("snuffleupagus")) print "skip"; ?> | 4 | <?php if (!extension_loaded("snuffleupagus")) print "skip"; ?> |
| 5 | <?php if (PHP_VERSION_ID >= 80000) print "skip"; ?> | ||
| 5 | --INI-- | 6 | --INI-- |
| 6 | sp.configuration_file={PWD}/config/global_strict.ini | 7 | sp.configuration_file={PWD}/config/global_strict.ini |
| 7 | --FILE-- | 8 | --FILE-- |
diff --git a/src/tests/global_strict/global_strict_disabled.phpt b/src/tests/global_strict/global_strict_disabled.phpt index ca3ddfa..c948444 100644 --- a/src/tests/global_strict/global_strict_disabled.phpt +++ b/src/tests/global_strict/global_strict_disabled.phpt | |||
| @@ -2,6 +2,7 @@ | |||
| 2 | Global strict mode | 2 | Global strict mode |
| 3 | --SKIPIF-- | 3 | --SKIPIF-- |
| 4 | <?php if (!extension_loaded("snuffleupagus")) print "skip"; ?> | 4 | <?php if (!extension_loaded("snuffleupagus")) print "skip"; ?> |
| 5 | <?php if (PHP_VERSION_ID >= 80000) print "skip"; ?> | ||
| 5 | --INI-- | 6 | --INI-- |
| 6 | sp.configuration_file={PWD}/config/global_strict_disabled.ini | 7 | sp.configuration_file={PWD}/config/global_strict_disabled.ini |
| 7 | --FILE-- | 8 | --FILE-- |
diff --git a/src/tests/harden_rand/harden_rand_noargs.phpt b/src/tests/harden_rand/harden_rand_noargs.phpt index dc7d832..9abbffa 100644 --- a/src/tests/harden_rand/harden_rand_noargs.phpt +++ b/src/tests/harden_rand/harden_rand_noargs.phpt | |||
| @@ -2,6 +2,7 @@ | |||
| 2 | Harden rand without any arguments | 2 | Harden rand without any arguments |
| 3 | --SKIPIF-- | 3 | --SKIPIF-- |
| 4 | <?php if (!extension_loaded("snuffleupagus")) print "skip"; ?> | 4 | <?php if (!extension_loaded("snuffleupagus")) print "skip"; ?> |
| 5 | <?php if (PHP_VERSION_ID >= 80000) print "skip"; ?> | ||
| 5 | --INI-- | 6 | --INI-- |
| 6 | sp.configuration_file={PWD}/config/harden_rand.ini | 7 | sp.configuration_file={PWD}/config/harden_rand.ini |
| 7 | We should fix this | 8 | We should fix this |
diff --git a/src/tests/harden_rand_php8/config/harden_rand.ini b/src/tests/harden_rand_php8/config/harden_rand.ini new file mode 100644 index 0000000..89e19be --- /dev/null +++ b/src/tests/harden_rand_php8/config/harden_rand.ini | |||
| @@ -0,0 +1 @@ | |||
| sp.harden_random.enable(); | |||
diff --git a/src/tests/harden_rand_php8/harden_rand_noargs.phpt b/src/tests/harden_rand_php8/harden_rand_noargs.phpt new file mode 100644 index 0000000..5f00c8f --- /dev/null +++ b/src/tests/harden_rand_php8/harden_rand_noargs.phpt | |||
| @@ -0,0 +1,43 @@ | |||
| 1 | --TEST-- | ||
| 2 | Harden rand without any arguments | ||
| 3 | --SKIPIF-- | ||
| 4 | <?php if (!extension_loaded("snuffleupagus")) print "skip"; ?> | ||
| 5 | <?php if (PHP_VERSION_ID < 80000) print "skip"; ?> | ||
| 6 | --INI-- | ||
| 7 | sp.configuration_file={PWD}/config/harden_rand.ini | ||
| 8 | --FILE-- | ||
| 9 | <?php | ||
| 10 | rand(); | ||
| 11 | mt_rand(); | ||
| 12 | |||
| 13 | rand(1); | ||
| 14 | mt_rand(1); | ||
| 15 | |||
| 16 | rand(1, 2); | ||
| 17 | mt_rand(1, 2); | ||
| 18 | |||
| 19 | rand(2, 1); | ||
| 20 | mt_rand(2, 1); | ||
| 21 | |||
| 22 | rand(2, 1, 0); | ||
| 23 | mt_rand(2, 1, 0); | ||
| 24 | |||
| 25 | rand("test", 1); | ||
| 26 | mt_rand("test", 1); | ||
| 27 | |||
| 28 | rand(1, "test"); | ||
| 29 | mt_rand(1, "test"); | ||
| 30 | |||
| 31 | rand(1, 2, "test"); | ||
| 32 | mt_rand(1, 2, "test"); | ||
| 33 | |||
| 34 | echo "Everything is fine\n"; | ||
| 35 | echo "Absolutely everything\n"; | ||
| 36 | echo 'Even with single quotes'; | ||
| 37 | ?> | ||
| 38 | --EXPECTF-- | ||
| 39 | Fatal error: Uncaught ArgumentCountError: rand() expects exactly 2 arguments, 1 given in %s/tests/harden_rand_php8/harden_rand_noargs.php:5 | ||
| 40 | Stack trace: | ||
| 41 | #0 %s/tests/harden_rand_php8/harden_rand_noargs.php(5): rand(1) | ||
| 42 | #1 {main} | ||
| 43 | thrown in %s/tests/harden_rand_php8/harden_rand_noargs.php on line 5 | ||
diff --git a/src/tests/inexistent_conf_file.phpt b/src/tests/inexistent_conf_file.phpt index 9b5e3d6..cd10665 100644 --- a/src/tests/inexistent_conf_file.phpt +++ b/src/tests/inexistent_conf_file.phpt | |||
| @@ -2,14 +2,15 @@ | |||
| 2 | Check for snuffleupagus presence | 2 | Check for snuffleupagus presence |
| 3 | --SKIPIF-- | 3 | --SKIPIF-- |
| 4 | <?php if (!extension_loaded("snuffleupagus")) print "skip"; ?> | 4 | <?php if (!extension_loaded("snuffleupagus")) print "skip"; ?> |
| 5 | <?php if (PHP_VERSION_ID >= 80000) print "skip"; ?> | ||
| 5 | --INI-- | 6 | --INI-- |
| 6 | sp.configuration_file={PWD}/config/unexistent_configuration_file.ini | 7 | sp.configuration_file={PWD}/config/unexistent_configuration_file.ini |
| 7 | --FILE-- | 8 | --FILE-- |
| 8 | <?php ?> | 9 | <?php ?> |
| 9 | --EXPECTF-- | 10 | --EXPECTF-- |
| 10 | PHP Fatal error: [snuffleupagus][0.0.0.0][config] Could not open configuration file %a/config/unexistent_configuration_file.ini : No such file or directory in Unknown on line 0 | 11 | PHP Fatal error: [snuffleupagus][0.0.0.0][config][log] Could not open configuration file %a/config/unexistent_configuration_file.ini : No such file or directory in Unknown on line 0 |
| 11 | 12 | ||
| 12 | Fatal error: [snuffleupagus][0.0.0.0][config] Could not open configuration file %a/config/unexistent_configuration_file.ini : No such file or directory in Unknown on line 0 | 13 | Fatal error: [snuffleupagus][0.0.0.0][config][log] Could not open configuration file %a/config/unexistent_configuration_file.ini : No such file or directory in Unknown on line 0 |
| 13 | 14 | ||
| 14 | Fatal error: [snuffleupagus][0.0.0.0][config] Invalid configuration file in Unknown on line 0 | 15 | Fatal error: [snuffleupagus][0.0.0.0][config][log] Invalid configuration file in Unknown on line 0 |
| 15 | Could not startup. \ No newline at end of file | 16 | Could not startup. |
diff --git a/src/tests/inexistent_conf_file_list.phpt b/src/tests/inexistent_conf_file_list.phpt index b8b3bea..6cac934 100644 --- a/src/tests/inexistent_conf_file_list.phpt +++ b/src/tests/inexistent_conf_file_list.phpt | |||
| @@ -2,14 +2,15 @@ | |||
| 2 | Non-existent configuration file in a list | 2 | Non-existent configuration file in a list |
| 3 | --SKIPIF-- | 3 | --SKIPIF-- |
| 4 | <?php if (!extension_loaded("snuffleupagus")) print "skip"; ?> | 4 | <?php if (!extension_loaded("snuffleupagus")) print "skip"; ?> |
| 5 | <?php if (PHP_VERSION_ID >= 80000) print "skip"; ?> | ||
| 5 | --INI-- | 6 | --INI-- |
| 6 | sp.configuration_file={PWD}/../../config/default.rules,{PWD}/non_existent_configuration_file | 7 | sp.configuration_file={PWD}/../../config/default.rules,{PWD}/non_existent_configuration_file |
| 7 | --FILE-- | 8 | --FILE-- |
| 8 | <?php ?> | 9 | <?php ?> |
| 9 | --EXPECTF-- | 10 | --EXPECTF-- |
| 10 | PHP Fatal error: [snuffleupagus][0.0.0.0][config] Could not open configuration file %a/non_existent_configuration_file : No such file or directory in Unknown on line 0 | 11 | PHP Fatal error: [snuffleupagus][0.0.0.0][config][log] Could not open configuration file %a/non_existent_configuration_file : No such file or directory in Unknown on line 0 |
| 11 | 12 | ||
| 12 | Fatal error: [snuffleupagus][0.0.0.0][config] Could not open configuration file %a/non_existent_configuration_file : No such file or directory in Unknown on line 0 | 13 | Fatal error: [snuffleupagus][0.0.0.0][config][log] Could not open configuration file %a/non_existent_configuration_file : No such file or directory in Unknown on line 0 |
| 13 | 14 | ||
| 14 | Fatal error: [snuffleupagus][0.0.0.0][config] Invalid configuration file in Unknown on line 0 | 15 | Fatal error: [snuffleupagus][0.0.0.0][config][log] Invalid configuration file in Unknown on line 0 |
| 15 | Could not startup. \ No newline at end of file | 16 | Could not startup. |
diff --git a/src/tests/loading.phpt b/src/tests/loading.phpt index d48703e..2514ec5 100644 --- a/src/tests/loading.phpt +++ b/src/tests/loading.phpt | |||
| @@ -7,5 +7,5 @@ Check for snuffleupagus presence | |||
| 7 | echo "snuffleupagus extension is available"; | 7 | echo "snuffleupagus extension is available"; |
| 8 | ?> | 8 | ?> |
| 9 | --EXPECT-- | 9 | --EXPECT-- |
| 10 | Fatal error: [snuffleupagus][0.0.0.0][config] Invalid configuration file in Unknown on line 0 | 10 | Warning: [snuffleupagus][0.0.0.0][config][log] No configuration specificed via sp.configuration_file in Unknown on line 0 |
| 11 | Could not startup. | 11 | snuffleupagus extension is available |
diff --git a/src/tests/multi_config.phpt b/src/tests/multi_config.phpt index 558d9a1..dbd38c0 100644 --- a/src/tests/multi_config.phpt +++ b/src/tests/multi_config.phpt | |||
| @@ -1,7 +1,7 @@ | |||
| 1 | --TEST-- | 1 | --TEST-- |
| 2 | Multiple configuration files | 2 | Multiple configuration files |
| 3 | --SKIPIF-- | 3 | --SKIPIF-- |
| 4 | <?php if (!extension_loaded("snuffleupagus")) die "skip"; ?> | 4 | <?php if (!extension_loaded("snuffleupagus")) print "skip"; ?> |
| 5 | --INI-- | 5 | --INI-- |
| 6 | sp.configuration_file={PWD}/config/config_multi2.ini,{PWD}/config/config_multi1.ini | 6 | sp.configuration_file={PWD}/config/config_multi2.ini,{PWD}/config/config_multi1.ini |
| 7 | --FILE-- | 7 | --FILE-- |
| @@ -16,8 +16,8 @@ foo(); | |||
| 16 | bla(); | 16 | bla(); |
| 17 | ?> | 17 | ?> |
| 18 | --EXPECTF-- | 18 | --EXPECTF-- |
| 19 | Warning: [snuffleupagus][0.0.0.0][disabled_function] Aborted execution on call of the function 'foo' in %a/multi_config.php on line 3 | 19 | Warning: [snuffleupagus][0.0.0.0][disabled_function][simulation] Aborted execution on call of the function 'foo' in %a/multi_config.php on line 3 |
| 20 | 1 | 20 | 1 |
| 21 | 21 | ||
| 22 | Warning: [snuffleupagus][0.0.0.0][disabled_function] Aborted execution on call of the function 'bla' in %a/multi_config.php on line 6 | 22 | Warning: [snuffleupagus][0.0.0.0][disabled_function][simulation] Aborted execution on call of the function 'bla' in %a/multi_config.php on line 6 |
| 23 | 2 \ No newline at end of file | 23 | 2 \ No newline at end of file |
diff --git a/src/tests/php8/inexistent_conf_file.phpt b/src/tests/php8/inexistent_conf_file.phpt new file mode 100644 index 0000000..ac763aa --- /dev/null +++ b/src/tests/php8/inexistent_conf_file.phpt | |||
| @@ -0,0 +1,14 @@ | |||
| 1 | --TEST-- | ||
| 2 | Test for unexistent configuration file, in php8 | ||
| 3 | --SKIPIF-- | ||
| 4 | <?php if (!extension_loaded("snuffleupagus")) print "skip"; ?> | ||
| 5 | <?php if (PHP_VERSION_ID < 80000) print "skip"; ?> | ||
| 6 | --INI-- | ||
| 7 | sp.configuration_file={PWD}/config/unexistent_configuration_file.ini | ||
| 8 | --FILE-- | ||
| 9 | <?php ?> | ||
| 10 | --EXPECTF-- | ||
| 11 | Fatal error: [snuffleupagus][0.0.0.0][config][log] Could not open configuration file %a/config/unexistent_configuration_file.ini : No such file or directory in Unknown on line 0 | ||
| 12 | |||
| 13 | Fatal error: [snuffleupagus][0.0.0.0][config][log] Invalid configuration file in Unknown on line 0 | ||
| 14 | Could not startup. | ||
diff --git a/src/tests/php8/inexistent_conf_file_list.phpt b/src/tests/php8/inexistent_conf_file_list.phpt new file mode 100644 index 0000000..2309fc6 --- /dev/null +++ b/src/tests/php8/inexistent_conf_file_list.phpt | |||
| @@ -0,0 +1,14 @@ | |||
| 1 | --TEST-- | ||
| 2 | Non-existent configuration file in a list in php8 | ||
| 3 | --SKIPIF-- | ||
| 4 | <?php if (!extension_loaded("snuffleupagus")) print "skip"; ?> | ||
| 5 | <?php if (PHP_VERSION_ID < 80000) print "skip"; ?> | ||
| 6 | --INI-- | ||
| 7 | sp.configuration_file={PWD}/../../../config/default.rules,{PWD}/non_existent_configuration_file | ||
| 8 | --FILE-- | ||
| 9 | <?php ?> | ||
| 10 | --EXPECTF-- | ||
| 11 | Fatal error: [snuffleupagus][0.0.0.0][config][log] Could not open configuration file %a/non_existent_configuration_file : No such file or directory in Unknown on line 0 | ||
| 12 | |||
| 13 | Fatal error: [snuffleupagus][0.0.0.0][config][log] Invalid configuration file in Unknown on line 0 | ||
| 14 | Could not startup. | ||
diff --git a/src/tests/phplog.phpt b/src/tests/phplog.phpt new file mode 100644 index 0000000..9c5600e --- /dev/null +++ b/src/tests/phplog.phpt | |||
| @@ -0,0 +1,13 @@ | |||
| 1 | --TEST-- | ||
| 2 | Check the phplog output | ||
| 3 | --SKIPIF-- | ||
| 4 | <?php if (!extension_loaded("snuffleupagus")) print "skip"; ?> | ||
| 5 | --INI-- | ||
| 6 | sp.configuration_file={PWD}/config/phplog.ini | ||
| 7 | --FILE-- | ||
| 8 | <?php | ||
| 9 | var_dump(unserialize('s:1:"a";')); | ||
| 10 | ?> | ||
| 11 | --EXPECTF-- | ||
| 12 | Fatal error: [snuffleupagus][0.0.0.0][unserialize][drop] The serialized object is too small. in %s/tests/phplog.php on line 2 | ||
| 13 | |||
diff --git a/src/tests/rips_configuration.phpt b/src/tests/rips_configuration.phpt index 31d1266..7c197e5 100644 --- a/src/tests/rips_configuration.phpt +++ b/src/tests/rips_configuration.phpt | |||
| @@ -1,7 +1,7 @@ | |||
| 1 | --TEST-- | 1 | --TEST-- |
| 2 | Shipped configuration (rips) | 2 | Shipped configuration (rips) |
| 3 | --SKIPIF-- | 3 | --SKIPIF-- |
| 4 | <?php if (!extension_loaded("snuffleupagus")) die "skip"; ?> | 4 | <?php if (!extension_loaded("snuffleupagus")) print "skip"; ?> |
| 5 | --INI-- | 5 | --INI-- |
| 6 | sp.configuration_file={PWD}/../../config/rips.rules | 6 | sp.configuration_file={PWD}/../../config/rips.rules |
| 7 | --FILE-- | 7 | --FILE-- |
diff --git a/src/tests/samesite_cookies.phpt b/src/tests/samesite_cookies.phpt index 5ba92a3..ffe0a0b 100644 --- a/src/tests/samesite_cookies.phpt +++ b/src/tests/samesite_cookies.phpt | |||
| @@ -2,7 +2,7 @@ | |||
| 2 | Cookie samesite | 2 | Cookie samesite |
| 3 | --SKIPIF-- | 3 | --SKIPIF-- |
| 4 | <?php | 4 | <?php |
| 5 | if (!extension_loaded("snuffleupagus")) die("skip"); | 5 | if (!extension_loaded("snuffleupagus")) print("skip"); |
| 6 | ?> | 6 | ?> |
| 7 | --INI-- | 7 | --INI-- |
| 8 | sp.configuration_file={PWD}/config/config_samesite_cookies.ini | 8 | sp.configuration_file={PWD}/config/config_samesite_cookies.ini |
diff --git a/src/tests/session_encryption/crypt_session_corrupted_session.phpt b/src/tests/session_encryption/crypt_session_corrupted_session.phpt index 2c4f085..a89faf4 100644 --- a/src/tests/session_encryption/crypt_session_corrupted_session.phpt +++ b/src/tests/session_encryption/crypt_session_corrupted_session.phpt | |||
| @@ -1,7 +1,7 @@ | |||
| 1 | --TEST-- | 1 | --TEST-- |
| 2 | Set a custom session handler | 2 | Set a custom session handler |
| 3 | --SKIPIF-- | 3 | --SKIPIF-- |
| 4 | <?php if (!extension_loaded("snuffleupagus")) die "skip"; ?> | 4 | <?php if (!extension_loaded("snuffleupagus")) print "skip"; ?> |
| 5 | --INI-- | 5 | --INI-- |
| 6 | sp.configuration_file={PWD}/config/config_crypt_session.ini | 6 | sp.configuration_file={PWD}/config/config_crypt_session.ini |
| 7 | session.save_path = "/tmp" | 7 | session.save_path = "/tmp" |
| @@ -27,4 +27,4 @@ session_start(); | |||
| 27 | var_dump($_SESSION); | 27 | var_dump($_SESSION); |
| 28 | ?> | 28 | ?> |
| 29 | --EXPECTF-- | 29 | --EXPECTF-- |
| 30 | Fatal error: [snuffleupagus][127.0.0.1][cookie_encryption] Buffer underflow tentative detected in cookie encryption handling in %s/crypt_session_corrupted_session.php on line %s | 30 | Fatal error: [snuffleupagus][127.0.0.1][cookie_encryption][drop] Buffer underflow tentative detected in cookie encryption handling in %s/crypt_session_corrupted_session.php on line %s |
diff --git a/src/tests/session_encryption/crypt_session_invalid.phpt b/src/tests/session_encryption/crypt_session_invalid.phpt index 9d9a88a..9ec7c50 100644 --- a/src/tests/session_encryption/crypt_session_invalid.phpt +++ b/src/tests/session_encryption/crypt_session_invalid.phpt | |||
| @@ -1,7 +1,7 @@ | |||
| 1 | --TEST-- | 1 | --TEST-- |
| 2 | SESSION crypt and bad decrypt | 2 | SESSION crypt and bad decrypt |
| 3 | --SKIPIF-- | 3 | --SKIPIF-- |
| 4 | <?php if (!extension_loaded("snuffleupagus")) die "skip"; ?> | 4 | <?php if (!extension_loaded("snuffleupagus")) print "skip"; ?> |
| 5 | --INI-- | 5 | --INI-- |
| 6 | sp.configuration_file={PWD}/config/config_crypt_session.ini | 6 | sp.configuration_file={PWD}/config/config_crypt_session.ini |
| 7 | --ENV-- | 7 | --ENV-- |
| @@ -21,4 +21,4 @@ session_start(); // Re start the session, It will read and decrypt the non em | |||
| 21 | var_dump($_SESSION); // Dump the session | 21 | var_dump($_SESSION); // Dump the session |
| 22 | ?> | 22 | ?> |
| 23 | --EXPECTF-- | 23 | --EXPECTF-- |
| 24 | Warning: [snuffleupagus][127.0.0.2][cookie_encryption] Something went wrong with the decryption of the session in %s/crypt_session_invalid.php on line %d | 24 | Warning: [snuffleupagus][127.0.0.2][cookie_encryption][log] Something went wrong with the decryption of the session in %s/crypt_session_invalid.php on line %d |
diff --git a/src/tests/session_encryption/crypt_session_invalid_simul.phpt b/src/tests/session_encryption/crypt_session_invalid_simul.phpt index 7bfefcb..cbb80dc 100644 --- a/src/tests/session_encryption/crypt_session_invalid_simul.phpt +++ b/src/tests/session_encryption/crypt_session_invalid_simul.phpt | |||
| @@ -1,7 +1,7 @@ | |||
| 1 | --TEST-- | 1 | --TEST-- |
| 2 | SESSION crypt and bad decrypt | 2 | SESSION crypt and bad decrypt |
| 3 | --SKIPIF-- | 3 | --SKIPIF-- |
| 4 | <?php if (!extension_loaded("snuffleupagus")) die "skip"; ?> | 4 | <?php if (!extension_loaded("snuffleupagus")) print "skip"; ?> |
| 5 | --INI-- | 5 | --INI-- |
| 6 | sp.configuration_file={PWD}/config/config_crypt_session_simul.ini | 6 | sp.configuration_file={PWD}/config/config_crypt_session_simul.ini |
| 7 | --ENV-- | 7 | --ENV-- |
diff --git a/src/tests/session_encryption/crypt_session_read_uncrypt.phpt b/src/tests/session_encryption/crypt_session_read_uncrypt.phpt index f15d8b6..5e81b52 100644 --- a/src/tests/session_encryption/crypt_session_read_uncrypt.phpt +++ b/src/tests/session_encryption/crypt_session_read_uncrypt.phpt | |||
| @@ -1,7 +1,7 @@ | |||
| 1 | --TEST-- | 1 | --TEST-- |
| 2 | SESSION crypt/decrypt valid | 2 | SESSION crypt/decrypt valid |
| 3 | --SKIPIF-- | 3 | --SKIPIF-- |
| 4 | <?php if (!extension_loaded("snuffleupagus")) die "skip"; ?> | 4 | <?php if (!extension_loaded("snuffleupagus")) print "skip"; ?> |
| 5 | --INI-- | 5 | --INI-- |
| 6 | sp.configuration_file={PWD}/config/config_crypt_session_simul.ini | 6 | sp.configuration_file={PWD}/config/config_crypt_session_simul.ini |
| 7 | --ENV-- | 7 | --ENV-- |
diff --git a/src/tests/session_encryption/crypt_session_valid.phpt b/src/tests/session_encryption/crypt_session_valid.phpt index bf9fea0..c272486 100644 --- a/src/tests/session_encryption/crypt_session_valid.phpt +++ b/src/tests/session_encryption/crypt_session_valid.phpt | |||
| @@ -1,7 +1,7 @@ | |||
| 1 | --TEST-- | 1 | --TEST-- |
| 2 | SESSION crypt/decrypt valid | 2 | SESSION crypt/decrypt valid |
| 3 | --SKIPIF-- | 3 | --SKIPIF-- |
| 4 | <?php if (!extension_loaded("snuffleupagus")) die "skip"; ?> | 4 | <?php if (!extension_loaded("snuffleupagus")) print "skip"; ?> |
| 5 | --INI-- | 5 | --INI-- |
| 6 | sp.configuration_file={PWD}/config/config_crypt_session.ini | 6 | sp.configuration_file={PWD}/config/config_crypt_session.ini |
| 7 | --ENV-- | 7 | --ENV-- |
diff --git a/src/tests/session_encryption/crypt_session_valid_simul.phpt b/src/tests/session_encryption/crypt_session_valid_simul.phpt index 28083cf..d63277d 100644 --- a/src/tests/session_encryption/crypt_session_valid_simul.phpt +++ b/src/tests/session_encryption/crypt_session_valid_simul.phpt | |||
| @@ -1,7 +1,7 @@ | |||
| 1 | --TEST-- | 1 | --TEST-- |
| 2 | SESSION crypt/decrypt valid | 2 | SESSION crypt/decrypt valid |
| 3 | --SKIPIF-- | 3 | --SKIPIF-- |
| 4 | <?php if (!extension_loaded("snuffleupagus")) die "skip"; ?> | 4 | <?php if (!extension_loaded("snuffleupagus")) print "skip"; ?> |
| 5 | --INI-- | 5 | --INI-- |
| 6 | sp.configuration_file={PWD}/config/config_crypt_session_simul.ini | 6 | sp.configuration_file={PWD}/config/config_crypt_session_simul.ini |
| 7 | --ENV-- | 7 | --ENV-- |
diff --git a/src/tests/session_encryption/set_custom_session_handler.phpt b/src/tests/session_encryption/set_custom_session_handler.phpt index 5b46fbc..725ee43 100644 --- a/src/tests/session_encryption/set_custom_session_handler.phpt +++ b/src/tests/session_encryption/set_custom_session_handler.phpt | |||
| @@ -1,7 +1,7 @@ | |||
| 1 | --TEST-- | 1 | --TEST-- |
| 2 | Set a custom session handler | 2 | Set a custom session handler |
| 3 | --SKIPIF-- | 3 | --SKIPIF-- |
| 4 | <?php if (!extension_loaded("snuffleupagus")) die "skip"; ?> | 4 | <?php if (!extension_loaded("snuffleupagus")) print "skip"; ?> |
| 5 | --INI-- | 5 | --INI-- |
| 6 | sp.configuration_file={PWD}/config/config_crypt_session.ini | 6 | sp.configuration_file={PWD}/config/config_crypt_session.ini |
| 7 | session.save_path = "/tmp" | 7 | session.save_path = "/tmp" |
diff --git a/src/tests/session_encryption/set_custom_session_handler2.phpt b/src/tests/session_encryption/set_custom_session_handler2.phpt index 18bc3f7..8cc6786 100644 --- a/src/tests/session_encryption/set_custom_session_handler2.phpt +++ b/src/tests/session_encryption/set_custom_session_handler2.phpt | |||
| @@ -1,7 +1,7 @@ | |||
| 1 | --TEST-- | 1 | --TEST-- |
| 2 | Set a custom session handler, twice | 2 | Set a custom session handler, twice |
| 3 | --SKIPIF-- | 3 | --SKIPIF-- |
| 4 | <?php if (!extension_loaded("snuffleupagus")) die "skip"; ?> | 4 | <?php if (!extension_loaded("snuffleupagus")) print "skip"; ?> |
| 5 | --INI-- | 5 | --INI-- |
| 6 | sp.configuration_file={PWD}/config/config_crypt_session.ini | 6 | sp.configuration_file={PWD}/config/config_crypt_session.ini |
| 7 | session.save_path = "/tmp" | 7 | session.save_path = "/tmp" |
diff --git a/src/tests/session_encryption/set_custom_session_handler_ini.phpt b/src/tests/session_encryption/set_custom_session_handler_ini.phpt index 7ed56d6..f9fbfb2 100644 --- a/src/tests/session_encryption/set_custom_session_handler_ini.phpt +++ b/src/tests/session_encryption/set_custom_session_handler_ini.phpt | |||
| @@ -1,7 +1,7 @@ | |||
| 1 | --TEST-- | 1 | --TEST-- |
| 2 | Set a custom session handler | 2 | Set a custom session handler |
| 3 | --SKIPIF-- | 3 | --SKIPIF-- |
| 4 | <?php if (!extension_loaded("snuffleupagus")) die "skip"; ?> | 4 | <?php if (!extension_loaded("snuffleupagus")) print "skip"; ?> |
| 5 | --INI-- | 5 | --INI-- |
| 6 | sp.configuration_file={PWD}/config/config_crypt_session.ini | 6 | sp.configuration_file={PWD}/config/config_crypt_session.ini |
| 7 | session.save_handler = | 7 | session.save_handler = |
diff --git a/src/tests/shipped_configuration.phpt b/src/tests/shipped_configuration.phpt index dd6b92b..b171304 100644 --- a/src/tests/shipped_configuration.phpt +++ b/src/tests/shipped_configuration.phpt | |||
| @@ -1,7 +1,7 @@ | |||
| 1 | --TEST-- | 1 | --TEST-- |
| 2 | Shipped configuration | 2 | Shipped configuration |
| 3 | --SKIPIF-- | 3 | --SKIPIF-- |
| 4 | <?php if (!extension_loaded("snuffleupagus")) die "skip"; ?> | 4 | <?php if (!extension_loaded("snuffleupagus")) print "skip"; ?> |
| 5 | --INI-- | 5 | --INI-- |
| 6 | sp.configuration_file={PWD}/../../config/default.rules | 6 | sp.configuration_file={PWD}/../../config/default.rules |
| 7 | --FILE-- | 7 | --FILE-- |
diff --git a/src/tests/sloppy_comparison/sloppy_comparison_array_disabled.phpt b/src/tests/sloppy_comparison/sloppy_comparison_array_disabled.phpt index e8cd77b..e292f5e 100644 --- a/src/tests/sloppy_comparison/sloppy_comparison_array_disabled.phpt +++ b/src/tests/sloppy_comparison/sloppy_comparison_array_disabled.phpt | |||
| @@ -2,6 +2,7 @@ | |||
| 2 | Sloppy comparison in_array disabled | 2 | Sloppy comparison in_array disabled |
| 3 | --SKIPIF-- | 3 | --SKIPIF-- |
| 4 | <?php if (!extension_loaded("snuffleupagus")) print "skip"; ?> | 4 | <?php if (!extension_loaded("snuffleupagus")) print "skip"; ?> |
| 5 | <?php if (PHP_VERSION_ID >= 80000) print "skip"; ?> | ||
| 5 | --INI-- | 6 | --INI-- |
| 6 | sp.allow_broken_configuration=On | 7 | sp.allow_broken_configuration=On |
| 7 | --FILE-- | 8 | --FILE-- |
diff --git a/src/tests/sloppy_comparison/sloppy_comparison_array_keys_disabled.phpt b/src/tests/sloppy_comparison/sloppy_comparison_array_keys_disabled.phpt index 8841b4c..3cc02c2 100644 --- a/src/tests/sloppy_comparison/sloppy_comparison_array_keys_disabled.phpt +++ b/src/tests/sloppy_comparison/sloppy_comparison_array_keys_disabled.phpt | |||
| @@ -2,6 +2,7 @@ | |||
| 2 | Sloppy comparison array_keys disabled | 2 | Sloppy comparison array_keys disabled |
| 3 | --SKIPIF-- | 3 | --SKIPIF-- |
| 4 | <?php if (!extension_loaded("snuffleupagus")) print "skip"; ?> | 4 | <?php if (!extension_loaded("snuffleupagus")) print "skip"; ?> |
| 5 | <?php if (PHP_VERSION_ID >= 80000) print "skip"; ?> | ||
| 5 | --INI-- | 6 | --INI-- |
| 6 | sp.allow_broken_configuration=On | 7 | sp.allow_broken_configuration=On |
| 7 | --FILE-- | 8 | --FILE-- |
diff --git a/src/tests/sloppy_comparison/sloppy_comparison_array_search_disabled.phpt b/src/tests/sloppy_comparison/sloppy_comparison_array_search_disabled.phpt index bee3752..2da4a17 100644 --- a/src/tests/sloppy_comparison/sloppy_comparison_array_search_disabled.phpt +++ b/src/tests/sloppy_comparison/sloppy_comparison_array_search_disabled.phpt | |||
| @@ -2,6 +2,7 @@ | |||
| 2 | Sloppy comparison array_search disabled | 2 | Sloppy comparison array_search disabled |
| 3 | --SKIPIF-- | 3 | --SKIPIF-- |
| 4 | <?php if (!extension_loaded("snuffleupagus")) print "skip"; ?> | 4 | <?php if (!extension_loaded("snuffleupagus")) print "skip"; ?> |
| 5 | <?php if (PHP_VERSION_ID >= 80000) print "skip"; ?> | ||
| 5 | --INI-- | 6 | --INI-- |
| 6 | sp.allow_broken_configuration=On | 7 | sp.allow_broken_configuration=On |
| 7 | --FILE-- | 8 | --FILE-- |
diff --git a/src/tests/sloppy_comparison/sloppy_comparison_disable.phpt b/src/tests/sloppy_comparison/sloppy_comparison_disable.phpt index e42c919..cdcd9a8 100644 --- a/src/tests/sloppy_comparison/sloppy_comparison_disable.phpt +++ b/src/tests/sloppy_comparison/sloppy_comparison_disable.phpt | |||
| @@ -2,6 +2,7 @@ | |||
| 2 | Sloppy comparison | 2 | Sloppy comparison |
| 3 | --SKIPIF-- | 3 | --SKIPIF-- |
| 4 | <?php if (!extension_loaded("snuffleupagus")) print "skip"; ?> | 4 | <?php if (!extension_loaded("snuffleupagus")) print "skip"; ?> |
| 5 | <?php if (PHP_VERSION_ID >= 80000) print "skip"; ?> | ||
| 5 | --INI-- | 6 | --INI-- |
| 6 | sp.allow_broken_configuration=On | 7 | sp.allow_broken_configuration=On |
| 7 | --FILE-- | 8 | --FILE-- |
diff --git a/src/tests/stream_wrapper/stream_wrapper.phpt b/src/tests/stream_wrapper/stream_wrapper.phpt index 3336ef6..588a10d 100644 --- a/src/tests/stream_wrapper/stream_wrapper.phpt +++ b/src/tests/stream_wrapper/stream_wrapper.phpt | |||
| @@ -25,10 +25,10 @@ Warning: file_get_contents(): Unable to find the wrapper "http" - did you forget | |||
| 25 | 25 | ||
| 26 | Warning: file_get_contents(): php_network_getaddresses: getaddrinfo failed: %s | 26 | Warning: file_get_contents(): php_network_getaddresses: getaddrinfo failed: %s |
| 27 | 27 | ||
| 28 | Warning: file_get_contents(https://qweqwezxc): failed to open stream: php_network_getaddresses: getaddrinfo failed: %s | 28 | Warning: file_get_contents(https://qweqwezxc): %s to open stream: php_network_getaddresses: getaddrinfo failed: %s |
| 29 | 29 | ||
| 30 | Warning: file_get_contents(ftp://qweqwezxc): failed to open stream: operation failed in %a/stream_wrapper.php on line %d | 30 | Warning: file_get_contents(ftp://qweqwezxc): %s to open stream: operation failed in %a/stream_wrapper.php on line %d |
| 31 | 31 | ||
| 32 | Warning: file_get_contents(): Unable to find the wrapper "lelel" - did you forget to enable it when you configured PHP? in %a/stream_wrapper.php on line %d | 32 | Warning: file_get_contents(): Unable to find the wrapper "lelel" - did you forget to enable it when you configured PHP? in %a/stream_wrapper.php on line %d |
| 33 | 33 | ||
| 34 | Warning: file_get_contents(lelel://qweqwezxc): failed to open stream: No such file or directory in %a/stream_wrapper.php on line %d | 34 | Warning: file_get_contents(lelel://qweqwezxc): %s to open stream: No such file or directory in %a/stream_wrapper.php on line %d |
diff --git a/src/tests/stream_wrapper/stream_wrapper_register.phpt b/src/tests/stream_wrapper/stream_wrapper_register.phpt index 39514e9..27d8afb 100644 --- a/src/tests/stream_wrapper/stream_wrapper_register.phpt +++ b/src/tests/stream_wrapper/stream_wrapper_register.phpt | |||
| @@ -22,4 +22,4 @@ Warning: fopen(): Unable to find the wrapper "lolol" - did you forget to enable | |||
| 22 | 22 | ||
| 23 | Warning: fopen(): file:// wrapper is disabled in the server configuration in %a/stream_wrapper_register.php on line %d | 23 | Warning: fopen(): file:// wrapper is disabled in the server configuration in %a/stream_wrapper_register.php on line %d |
| 24 | 24 | ||
| 25 | Warning: fopen(lolol://asdasd): failed to open stream: no suitable wrapper could be found in %a/stream_wrapper_register.php on line %d | 25 | Warning: fopen(lolol://asdasd): %s to open stream: no suitable wrapper could be found in %a/stream_wrapper_register.php on line %d |
diff --git a/src/tests/stream_wrapper/stream_wrapper_restore.phpt b/src/tests/stream_wrapper/stream_wrapper_restore.phpt index b4a29c8..4f110ee 100644 --- a/src/tests/stream_wrapper/stream_wrapper_restore.phpt +++ b/src/tests/stream_wrapper/stream_wrapper_restore.phpt | |||
| @@ -2,16 +2,17 @@ | |||
| 2 | Stream wrapper | 2 | Stream wrapper |
| 3 | --SKIPIF-- | 3 | --SKIPIF-- |
| 4 | <?php if (!extension_loaded("snuffleupagus")) print "skip"; ?> | 4 | <?php if (!extension_loaded("snuffleupagus")) print "skip"; ?> |
| 5 | <?php if (PHP_VERSION_ID >= 80000) print "skip"; ?> | ||
| 5 | --INI-- | 6 | --INI-- |
| 6 | sp.configuration_file={PWD}/config/config_stream_wrapper_register.ini | 7 | sp.configuration_file={PWD}/config/config_stream_wrapper_register.ini |
| 7 | --FILE-- | 8 | --FILE-- |
| 8 | <?php | 9 | <?php |
| 9 | stream_wrapper_restore("file"); | 10 | stream_wrapper_restore("stdin"); |
| 10 | fopen("file://asdasd", "r"); | 11 | fopen("stdin://asdasd", "r"); |
| 11 | ?> | 12 | ?> |
| 12 | --EXPECTF-- | 13 | --EXPECTF-- |
| 13 | Notice: stream_wrapper_restore(): file:// was never changed, nothing to restore in %a/stream_wrapper_restore.php on line %d | 14 | %s |
| 14 | 15 | ||
| 15 | Warning: fopen(): Unable to find the wrapper "file" - did you forget to enable it when you configured PHP? in %a/stream_wrapper_restore.php on line %d | 16 | Warning: fopen(): Unable to find the wrapper "stdin" - did you forget to enable it when you configured PHP? in %a/stream_wrapper_restore.php on line %d |
| 16 | 17 | ||
| 17 | Warning: fopen(file://asdasd): failed to open stream: No such file or directory in %a/stream_wrapper_restore.php on line %d | 18 | Warning: fopen(stdin://asdasd): failed to open stream: No such file or directory in %a/stream_wrapper_restore.php on line %d |
diff --git a/src/tests/stream_wrapper/stream_wrapper_without_openssl.phpt b/src/tests/stream_wrapper/stream_wrapper_without_openssl.phpt index 5a11c8f..54fd067 100644 --- a/src/tests/stream_wrapper/stream_wrapper_without_openssl.phpt +++ b/src/tests/stream_wrapper/stream_wrapper_without_openssl.phpt | |||
| @@ -19,10 +19,10 @@ Warning: Unknown: Unable to find the wrapper "php" - did you forget to enable it | |||
| 19 | 19 | ||
| 20 | Warning: file_get_contents(): Unable to find the wrapper "http" - did you forget to enable it when you configured PHP? in %a/stream_wrapper_without_openssl.php on line 2 | 20 | Warning: file_get_contents(): Unable to find the wrapper "http" - did you forget to enable it when you configured PHP? in %a/stream_wrapper_without_openssl.php on line 2 |
| 21 | 21 | ||
| 22 | Warning: file_get_contents(http://qweqwezxc): failed to open stream: No such file or directory in %a/stream_wrapper_without_openssl.php on line 2 | 22 | Warning: file_get_contents(http://qweqwezxc): %s to open stream: No such file or directory in %a/stream_wrapper_without_openssl.php on line 2 |
| 23 | 23 | ||
| 24 | Warning: file_get_contents(ftp://qweqwezxc): failed to open stream: operation failed in %a/stream_wrapper_without_openssl.php on line 3 | 24 | Warning: file_get_contents(ftp://qweqwezxc): %s to open stream: operation failed in %a/stream_wrapper_without_openssl.php on line 3 |
| 25 | 25 | ||
| 26 | Warning: file_get_contents(): Unable to find the wrapper "lelel" - did you forget to enable it when you configured PHP? in %a/stream_wrapper_without_openssl.php on line 4 | 26 | Warning: file_get_contents(): Unable to find the wrapper "lelel" - did you forget to enable it when you configured PHP? in %a/stream_wrapper_without_openssl.php on line 4 |
| 27 | 27 | ||
| 28 | Warning: file_get_contents(lelel://qweqwezxc): failed to open stream: No such file or directory in %a/stream_wrapper_without_openssl.php on line 4 | 28 | Warning: file_get_contents(lelel://qweqwezxc): %s to open stream: No such file or directory in %a/stream_wrapper_without_openssl.php on line 4 |
diff --git a/src/tests/strict_mode/config/config_strict_mode_disabled.ini b/src/tests/strict_mode/config/config_strict_mode_disabled.ini new file mode 100644 index 0000000..2e68471 --- /dev/null +++ b/src/tests/strict_mode/config/config_strict_mode_disabled.ini | |||
| @@ -0,0 +1 @@ | |||
| sp.global_strict.disable(); | |||
diff --git a/src/tests/strict_mode/config/config_strict_mode_enabled.ini b/src/tests/strict_mode/config/config_strict_mode_enabled.ini new file mode 100644 index 0000000..2dc11fc --- /dev/null +++ b/src/tests/strict_mode/config/config_strict_mode_enabled.ini | |||
| @@ -0,0 +1 @@ | |||
| sp.global_strict.enable(); | |||
diff --git a/src/tests/strict_mode/strict_mode_disabled.phpt b/src/tests/strict_mode/strict_mode_disabled.phpt new file mode 100644 index 0000000..105f43c --- /dev/null +++ b/src/tests/strict_mode/strict_mode_disabled.phpt | |||
| @@ -0,0 +1,13 @@ | |||
| 1 | --TEST-- | ||
| 2 | Strict mode disabled | ||
| 3 | --SKIPIF-- | ||
| 4 | <?php | ||
| 5 | if (!extension_loaded("snuffleupagus")) print "skip snuffleupagus extension missing"; | ||
| 6 | ?> | ||
| 7 | --INI-- | ||
| 8 | sp.configuration_file={PWD}/config/config_strict_mode_disabled.ini | ||
| 9 | --FILE-- | ||
| 10 | <?php | ||
| 11 | ini_set('display_errors', 1); | ||
| 12 | ?> | ||
| 13 | --EXPECTF-- | ||
diff --git a/src/tests/strict_mode/strict_mode_enabled.phpt b/src/tests/strict_mode/strict_mode_enabled.phpt new file mode 100644 index 0000000..a986987 --- /dev/null +++ b/src/tests/strict_mode/strict_mode_enabled.phpt | |||
| @@ -0,0 +1,18 @@ | |||
| 1 | --TEST-- | ||
| 2 | Strict mode enabled | ||
| 3 | --SKIPIF-- | ||
| 4 | <?php | ||
| 5 | if (!extension_loaded("snuffleupagus")) print "skip snuffleupagus extension missing"; | ||
| 6 | ?> | ||
| 7 | --INI-- | ||
| 8 | sp.configuration_file={PWD}/config/config_strict_mode_enabled.ini | ||
| 9 | --FILE-- | ||
| 10 | <?php | ||
| 11 | ini_set('display_errors', 1); | ||
| 12 | ?> | ||
| 13 | --EXPECTF-- | ||
| 14 | Fatal error: Uncaught TypeError: ini_set()%s given in %s/tests/strict_mode/strict_mode_enabled.php:%d | ||
| 15 | Stack trace: | ||
| 16 | #0 %s/tests/strict_mode/strict_mode_enabled.php(2): ini_set('display_errors', 1) | ||
| 17 | #1 {main} | ||
| 18 | thrown in %s/tests/strict_mode/strict_mode_enabled.php on line 2 | ||
diff --git a/src/tests/syslog.phpt b/src/tests/syslog.phpt new file mode 100644 index 0000000..5585677 --- /dev/null +++ b/src/tests/syslog.phpt | |||
| @@ -0,0 +1,11 @@ | |||
| 1 | --TEST-- | ||
| 2 | Check the syslog output | ||
| 3 | --SKIPIF-- | ||
| 4 | <?php if (!extension_loaded("snuffleupagus")) print "skip"; ?> | ||
| 5 | --INI-- | ||
| 6 | sp.configuration_file={PWD}/config/syslog.ini | ||
| 7 | --FILE-- | ||
| 8 | <?php | ||
| 9 | var_dump(unserialize('s:1:"a";')); | ||
| 10 | ?> | ||
| 11 | --EXPECTF-- | ||
diff --git a/src/tests/syslog_simulation.phpt b/src/tests/syslog_simulation.phpt new file mode 100644 index 0000000..4b12f58 --- /dev/null +++ b/src/tests/syslog_simulation.phpt | |||
| @@ -0,0 +1,11 @@ | |||
| 1 | --TEST-- | ||
| 2 | Check the syslog output, in simulation mode. | ||
| 3 | --SKIPIF-- | ||
| 4 | <?php if (!extension_loaded("snuffleupagus")) print "skip"; ?> | ||
| 5 | --INI-- | ||
| 6 | sp.configuration_file={PWD}/config/syslog_simulation.ini | ||
| 7 | --FILE-- | ||
| 8 | <?php | ||
| 9 | var_dump(unserialize('s:1:"a";')); | ||
| 10 | ?> | ||
| 11 | --EXPECTF-- | ||
diff --git a/src/tests/unserialize/dump_unserialize.phpt b/src/tests/unserialize/dump_unserialize.phpt index d07fcbe..1ef8dcb 100644 --- a/src/tests/unserialize/dump_unserialize.phpt +++ b/src/tests/unserialize/dump_unserialize.phpt | |||
| @@ -25,15 +25,15 @@ echo "1\n"; | |||
| 25 | var_dump(unserialize('s:1:"a";alyualskdufyhalkdjsfhalkjdhflaksjdfhlkasdhflkahdawkuerylksjdfhlkssjgdflaksjdhflkasjdf')); | 25 | var_dump(unserialize('s:1:"a";alyualskdufyhalkdjsfhalkjdhflaksjdfhlkasdhflkahdawkuerylksjdfhlkssjgdflaksjdhflkasjdf')); |
| 26 | $filename = glob('/tmp/dump_result/sp_dump.*')[0]; | 26 | $filename = glob('/tmp/dump_result/sp_dump.*')[0]; |
| 27 | $res = file($filename); | 27 | $res = file($filename); |
| 28 | if ($res[2] != "GET:get_a='data_get_a' get_b='data_get_b' \n") { | 28 | if ($res[3] != "GET:get_a='data_get_a' get_b='data_get_b' \n") { |
| 29 | echo "1\n"; | 29 | echo "Invalid GET\n"; |
| 30 | } elseif ($res[3] != "POST:post_a='data_post_a' post_b='data_post_b' \n") { | 30 | } elseif ($res[4] != "POST:post_a='data_post_a' post_b='data_post_b' \n") { |
| 31 | echo "2\n"; | 31 | echo "Invalid POST\n"; |
| 32 | } elseif ($res[4] != "COOKIE:cookie_a='data_cookie_a&cookie_b=data_cookie_b' \n") { | 32 | } elseif ($res[5] != "COOKIE:cookie_a='data_cookie_a&cookie_b=data_cookie_b' \n") { |
| 33 | echo "3\n"; | 33 | echo "Invalid COOKIE\n"; |
| 34 | } | 34 | } |
| 35 | ?> | 35 | ?> |
| 36 | --EXPECTF-- | 36 | --EXPECTF-- |
| 37 | 1 | 37 | 1 |
| 38 | 38 | ||
| 39 | Fatal error: [snuffleupagus][0.0.0.0][unserialize] Invalid HMAC for s:1:"a";alyualskdufyhalkdjsfh in %a/dump_unserialize.php on line 8 | 39 | Fatal error: [snuffleupagus][0.0.0.0][unserialize][drop] Invalid HMAC for s:1:"a";alyualskdufyhalkdjsfh in %a/dump_unserialize.php on line 8 |
diff --git a/src/tests/unserialize/unserialize_fail.phpt b/src/tests/unserialize/unserialize_fail.phpt index 5e7912c..88dabda 100644 --- a/src/tests/unserialize/unserialize_fail.phpt +++ b/src/tests/unserialize/unserialize_fail.phpt | |||
| @@ -12,4 +12,4 @@ var_dump(unserialize('s:1:"a";dslfjklfjfkjfdjffjfjads')); | |||
| 12 | var_dump(unserialize(1,2,3,4)); | 12 | var_dump(unserialize(1,2,3,4)); |
| 13 | ?> | 13 | ?> |
| 14 | --EXPECTF-- | 14 | --EXPECTF-- |
| 15 | Fatal error: [snuffleupagus][0.0.0.0][unserialize] The serialized object is too small. in %a/unserialize_fail.php on line 2 \ No newline at end of file | 15 | Fatal error: [snuffleupagus][0.0.0.0][unserialize][drop] The serialized object is too small. in %a/unserialize_fail.php on line 2 \ No newline at end of file |
diff --git a/src/tests/unserialize/unserialize_sim.phpt b/src/tests/unserialize/unserialize_sim.phpt index cbc02a4..9bff2c1 100644 --- a/src/tests/unserialize/unserialize_sim.phpt +++ b/src/tests/unserialize/unserialize_sim.phpt | |||
| @@ -14,5 +14,5 @@ var_dump(unserialize('s:1:"a";alyualskdufyhalkdjsfhalkjdhflaksjdfhlkasdhflkahdaw | |||
| 14 | --EXPECTF-- | 14 | --EXPECTF-- |
| 15 | s:1:"a";650609b417904d0d9bbf1fc44a975d13ecdf6b02b715c1a06271fb3b673f25b1string(1) "a" | 15 | s:1:"a";650609b417904d0d9bbf1fc44a975d13ecdf6b02b715c1a06271fb3b673f25b1string(1) "a" |
| 16 | 16 | ||
| 17 | Warning: [snuffleupagus][0.0.0.0][unserialize] Invalid HMAC for s:1:"a";alyualskdufyhalkdjsfh in %a/unserialize_sim.php on line 5 | 17 | Warning: [snuffleupagus][0.0.0.0][unserialize][simulation] Invalid HMAC for s:1:"a";alyualskdufyhalkdjsfh in %a/unserialize_sim.php on line 5 |
| 18 | string(1) "a" | 18 | string(1) "a" |
diff --git a/src/tests/unserialize/unserialize_wrong_call.phpt b/src/tests/unserialize/unserialize_wrong_call.phpt index 729d020..a6fe140 100644 --- a/src/tests/unserialize/unserialize_wrong_call.phpt +++ b/src/tests/unserialize/unserialize_wrong_call.phpt | |||
| @@ -2,6 +2,7 @@ | |||
| 2 | Unserialize ok, but called with the wrong numeber of aguments | 2 | Unserialize ok, but called with the wrong numeber of aguments |
| 3 | --SKIPIF-- | 3 | --SKIPIF-- |
| 4 | <?php if (!extension_loaded("snuffleupagus")) print "skip"; ?> | 4 | <?php if (!extension_loaded("snuffleupagus")) print "skip"; ?> |
| 5 | <?php if (PHP_VERSION_ID >= 80000) print "skip"; ?> | ||
| 5 | --INI-- | 6 | --INI-- |
| 6 | sp.configuration_file={PWD}/config/config_serialize.ini | 7 | sp.configuration_file={PWD}/config/config_serialize.ini |
| 7 | --FILE-- | 8 | --FILE-- |
diff --git a/src/tests/unserialize_php8/config/config_serialize.ini b/src/tests/unserialize_php8/config/config_serialize.ini new file mode 100644 index 0000000..7de4438 --- /dev/null +++ b/src/tests/unserialize_php8/config/config_serialize.ini | |||
| @@ -0,0 +1 @@ | |||
| sp.global.secret_key("abcdef"); | |||
diff --git a/src/tests/unserialize_php8/unserialize_wrong_call.phpt b/src/tests/unserialize_php8/unserialize_wrong_call.phpt new file mode 100644 index 0000000..4c62356 --- /dev/null +++ b/src/tests/unserialize_php8/unserialize_wrong_call.phpt | |||
| @@ -0,0 +1,18 @@ | |||
| 1 | --TEST-- | ||
| 2 | Unserialize ok, but called with the wrong number of arguments | ||
| 3 | --SKIPIF-- | ||
| 4 | <?php if (!extension_loaded("snuffleupagus")) print "skip"; ?> | ||
| 5 | <?php if (PHP_VERSION_ID < 80000) print "skip"; ?> | ||
| 6 | --INI-- | ||
| 7 | sp.configuration_file={PWD}/config/config_serialize.ini | ||
| 8 | --FILE-- | ||
| 9 | <?php | ||
| 10 | $a=serialize("a"); | ||
| 11 | var_dump(unserialize($a, "too", "many", "aaaaaaaarguments!")); | ||
| 12 | ?> | ||
| 13 | --EXPECTF-- | ||
| 14 | Fatal error: Uncaught ArgumentCountError: unserialize() expects at most 2 arguments, 4 given in %s/tests/unserialize_php8/unserialize_wrong_call.php:3 | ||
| 15 | Stack trace: | ||
| 16 | #0 %s/tests/unserialize_php8/unserialize_wrong_call.php(3): unserialize('s:1:"a";', 'too', 'many', 'aaaaaaaargument...') | ||
| 17 | #1 {main} | ||
| 18 | thrown in %s/tests/unserialize_php8/unserialize_wrong_call.php on line 3 | ||
diff --git a/src/tests/upload_validation/upload_validation.phpt b/src/tests/upload_validation/upload_validation.phpt index 4a45771..965d3aa 100644 --- a/src/tests/upload_validation/upload_validation.phpt +++ b/src/tests/upload_validation/upload_validation.phpt | |||
| @@ -13,6 +13,6 @@ Content-Disposition: form-data; name="test"; filename="test.php" | |||
| 13 | echo 1; | 13 | echo 1; |
| 14 | ?> | 14 | ?> |
| 15 | --EXPECTF-- | 15 | --EXPECTF-- |
| 16 | Fatal error: [snuffleupagus][0.0.0.0][config] Invalid configuration file in Unknown on line 0 | 16 | Fatal error: [snuffleupagus][0.0.0.0][config][log] Invalid configuration file in Unknown on line 0 |
| 17 | 17 | ||
| 18 | Fatal error: [snuffleupagus][0.0.0.0][config] A rule can't be enabled and disabled on line 1 in Unknown on line 0 | 18 | Fatal error: [snuffleupagus][0.0.0.0][config][log] A rule can't be enabled and disabled on line 1 in Unknown on line 0 |
diff --git a/src/tests/upload_validation/upload_validation_invalid.phpt b/src/tests/upload_validation/upload_validation_invalid.phpt index 5d64f57..242bcee 100644 --- a/src/tests/upload_validation/upload_validation_invalid.phpt +++ b/src/tests/upload_validation/upload_validation_invalid.phpt | |||
| @@ -13,9 +13,9 @@ Content-Disposition: form-data; name="test"; filename="test.php" | |||
| 13 | echo 1; | 13 | echo 1; |
| 14 | ?> | 14 | ?> |
| 15 | --EXPECTF-- | 15 | --EXPECTF-- |
| 16 | Warning: [snuffleupagus][0.0.0.0][upload_validation] Could not call './tests/data/upload_invalid.sh' : Exec format error in Unknown on line 0 | 16 | Warning: [snuffleupagus][0.0.0.0][upload_validation][log] Could not call './tests/data/upload_invalid.sh' : Exec format error in Unknown on line 0 |
| 17 | X-Powered-By: PHP/%a | 17 | X-Powered-By: PHP/%a |
| 18 | Content-type: text/html; charset=UTF-8%a | 18 | Content-type: text/html; charset=UTF-8%a |
| 19 | %a | 19 | %a |
| 20 | 20 | ||
| 21 | Fatal error: [snuffleupagus][0.0.0.0][upload_validation] The upload of test.php on ? was rejected. in Unknown on line 0 | 21 | Fatal error: [snuffleupagus][0.0.0.0][upload_validation][drop] The upload of test.php on ? was rejected. in Unknown on line 0 |
diff --git a/src/tests/upload_validation/upload_validation_ko.phpt b/src/tests/upload_validation/upload_validation_ko.phpt index 54f384a..0877861 100644 --- a/src/tests/upload_validation/upload_validation_ko.phpt +++ b/src/tests/upload_validation/upload_validation_ko.phpt | |||
| @@ -11,4 +11,4 @@ Content-Disposition: form-data; name="test"; filename="test.php" | |||
| 11 | --blabla-- | 11 | --blabla-- |
| 12 | --FILE-- | 12 | --FILE-- |
| 13 | --EXPECTF-- | 13 | --EXPECTF-- |
| 14 | Fatal error: [snuffleupagus][0.0.0.0][upload_validation] The upload of test.php on ? was rejected. in Unknown on line 0 \ No newline at end of file | 14 | Fatal error: [snuffleupagus][0.0.0.0][upload_validation][drop] The upload of test.php on ? was rejected. in Unknown on line 0 \ No newline at end of file |
diff --git a/src/tests/upload_validation/upload_validation_ko_simulation.phpt b/src/tests/upload_validation/upload_validation_ko_simulation.phpt index 553874c..a099641 100644 --- a/src/tests/upload_validation/upload_validation_ko_simulation.phpt +++ b/src/tests/upload_validation/upload_validation_ko_simulation.phpt | |||
| @@ -12,5 +12,5 @@ Content-Disposition: form-data; name="test"; filename="test.php" | |||
| 12 | --FILE-- | 12 | --FILE-- |
| 13 | <?php echo 1337; ?> | 13 | <?php echo 1337; ?> |
| 14 | --EXPECTF-- | 14 | --EXPECTF-- |
| 15 | Warning: [snuffleupagus][0.0.0.0][upload_validation] The upload of test.php on ? was rejected. in Unknown on line 0 | 15 | Warning: [snuffleupagus][0.0.0.0][upload_validation][simulation] The upload of test.php on ? was rejected. in Unknown on line 0 |
| 16 | 1337 \ No newline at end of file | 16 | 1337 \ No newline at end of file |
diff --git a/src/tests/upload_validation/upload_validation_no_exec.phpt b/src/tests/upload_validation/upload_validation_no_exec.phpt index cf935fd..b198bda 100644 --- a/src/tests/upload_validation/upload_validation_no_exec.phpt +++ b/src/tests/upload_validation/upload_validation_no_exec.phpt | |||
| @@ -14,6 +14,6 @@ Content-Disposition: form-data; name="test"; filename="test.php" | |||
| 14 | var_dump($_FILES); | 14 | var_dump($_FILES); |
| 15 | ?> | 15 | ?> |
| 16 | --EXPECTF-- | 16 | --EXPECTF-- |
| 17 | Fatal error: [snuffleupagus][0.0.0.0][config] Invalid configuration file in Unknown on line 0 | 17 | Fatal error: [snuffleupagus][0.0.0.0][config][log] Invalid configuration file in Unknown on line 0 |
| 18 | 18 | ||
| 19 | Fatal error: [snuffleupagus][0.0.0.0][config] The `script` (tests/data/upload_no_exec.sh) isn't executable on line 1 in Unknown on line 0 | 19 | Fatal error: [snuffleupagus][0.0.0.0][config][log] The `script` (tests/data/upload_no_exec.sh) isn't executable on line 1 in Unknown on line 0 |
diff --git a/src/tests/upload_validation/upload_validation_real.phpt b/src/tests/upload_validation/upload_validation_real.phpt index 47df3d1..1c919ec 100644 --- a/src/tests/upload_validation/upload_validation_real.phpt +++ b/src/tests/upload_validation/upload_validation_real.phpt | |||
| @@ -6,8 +6,8 @@ if (!extension_loaded("snuffleupagus")) { | |||
| 6 | print "skip"; | 6 | print "skip"; |
| 7 | } | 7 | } |
| 8 | 8 | ||
| 9 | if (PHP_VERSION_ID >= 70300) { | 9 | if (PHP_VERSION_ID >= 80000) { |
| 10 | die("skip BROKEN with 7.3"); | 10 | print "skip"; |
| 11 | } | 11 | } |
| 12 | 12 | ||
| 13 | if (strpos(system(PHP_BINARY . " -d error_log=/dev/null -d extension=vld.so -m 2>/dev/null"), "vld") === FALSE) { | 13 | if (strpos(system(PHP_BINARY . " -d error_log=/dev/null -d extension=vld.so -m 2>/dev/null"), "vld") === FALSE) { |
| @@ -41,4 +41,4 @@ Some random text again | |||
| 41 | echo 1; | 41 | echo 1; |
| 42 | ?> | 42 | ?> |
| 43 | --EXPECTF-- | 43 | --EXPECTF-- |
| 44 | Fatal error: [snuffleupagus][0.0.0.0][upload_validation] The upload of test.php on ? was rejected. in Unknown on line 0 | 44 | Fatal error: [snuffleupagus][0.0.0.0][upload_validation][drop] The upload of test.php on ? was rejected. in Unknown on line 0 |
diff --git a/src/tests/xxe/disable_xxe_dom.phpt b/src/tests/xxe/disable_xxe_dom.phpt deleted file mode 100644 index 58467f7..0000000 --- a/src/tests/xxe/disable_xxe_dom.phpt +++ /dev/null | |||
| @@ -1,69 +0,0 @@ | |||
| 1 | --TEST-- | ||
| 2 | Disable XXE | ||
| 3 | --SKIPIF-- | ||
| 4 | <?php if (!extension_loaded("snuffleupagus") || !extension_loaded("dom")) print("skip"); ?> | ||
| 5 | --INI-- | ||
| 6 | sp.configuration_file={PWD}/config/disable_xxe.ini | ||
| 7 | --EXTENSIONS-- | ||
| 8 | dom | ||
| 9 | --FILE-- | ||
| 10 | <?php | ||
| 11 | $dir = __DIR__; | ||
| 12 | $content = 'WARNING, external entity loaded!'; | ||
| 13 | file_put_contents('content.txt', $content); | ||
| 14 | |||
| 15 | $xml = <<<EOD | ||
| 16 | <?xml version="1.0"?> | ||
| 17 | <!DOCTYPE root | ||
| 18 | [ | ||
| 19 | <!ENTITY foo SYSTEM "file://$dir/content.txt"> | ||
| 20 | ]> | ||
| 21 | <test><testing>&foo;</testing></test> | ||
| 22 | EOD; | ||
| 23 | |||
| 24 | file_put_contents('content.xml', $xml); | ||
| 25 | |||
| 26 | libxml_disable_entity_loader(true); | ||
| 27 | $dom = new DOMDocument('1.0'); | ||
| 28 | $dom->loadXML($xml, LIBXML_DTDATTR|LIBXML_DTDLOAD|LIBXML_NOENT); | ||
| 29 | printf("libxml_disable_entity to true: %s\n", $dom->getElementsByTagName('testing')->item(0)->nodeValue); | ||
| 30 | |||
| 31 | libxml_disable_entity_loader(false); | ||
| 32 | $dom = new DOMDocument('1.0'); | ||
| 33 | $dom->loadXML($xml, LIBXML_DTDATTR|LIBXML_DTDLOAD|LIBXML_NOENT); | ||
| 34 | printf("libxml_disable_entity to false: %s\n", $dom->getElementsByTagName('testing')->item(0)->nodeValue); | ||
| 35 | |||
| 36 | $xml = "<test><testing>foo</testing></test>"; | ||
| 37 | file_put_contents('content.xml', $xml); | ||
| 38 | |||
| 39 | libxml_disable_entity_loader(false); | ||
| 40 | $dom = new DOMDocument('1.0'); | ||
| 41 | $dom->loadXML($xml, LIBXML_DTDATTR|LIBXML_DTDLOAD|LIBXML_NOENT); | ||
| 42 | printf("without xxe: %s", $dom->getElementsByTagName('testing')->item(0)->nodeValue); | ||
| 43 | |||
| 44 | ?> | ||
| 45 | --EXPECTF-- | ||
| 46 | Warning: DOMDocument::loadXML(): I/O warning : failed to load external entity "file://%a/content.txt" in %a/disable_xxe_dom.php on line %d | ||
| 47 | |||
| 48 | Warning: DOMDocument::loadXML(): Failure to process entity foo in Entity, line: %d in %a/disable_xxe_dom.php on line %d | ||
| 49 | |||
| 50 | Warning: DOMDocument::loadXML(): Entity 'foo' not defined in Entity, line: %d in %a/disable_xxe_dom.php on line %d | ||
| 51 | |||
| 52 | Notice: Trying to get property %a in %a/disable_xxe_dom.php on line %d | ||
| 53 | libxml_disable_entity to true: | ||
| 54 | |||
| 55 | Warning: DOMDocument::loadXML(): I/O warning : failed to load external entity "file://%a/content.txt" in %a/disable_xxe_dom.php on line %d | ||
| 56 | |||
| 57 | Warning: DOMDocument::loadXML(): Failure to process entity foo in Entity, line: %d in %a/disable_xxe_dom.php on line %d | ||
| 58 | |||
| 59 | Warning: DOMDocument::loadXML(): Entity 'foo' not defined in Entity, line: %d in %a/disable_xxe_dom.php on line %d | ||
| 60 | |||
| 61 | Notice: Trying to get property %a in %a/disable_xxe_dom.php on line %d | ||
| 62 | libxml_disable_entity to false: | ||
| 63 | without xxe: foo | ||
| 64 | --CLEAN-- | ||
| 65 | <?php | ||
| 66 | $dir = __DIR__; | ||
| 67 | unlink($dir . "content.xml"); | ||
| 68 | unlink($dir . "content.txt"); | ||
| 69 | ?> | ||
diff --git a/src/tests/xxe/disable_xxe_dom_disabled.phpt b/src/tests/xxe/disable_xxe_dom_disabled.phpt index fe88d76..493f5a3 100644 --- a/src/tests/xxe/disable_xxe_dom_disabled.phpt +++ b/src/tests/xxe/disable_xxe_dom_disabled.phpt | |||
| @@ -2,6 +2,7 @@ | |||
| 2 | Disable XXE | 2 | Disable XXE |
| 3 | --SKIPIF-- | 3 | --SKIPIF-- |
| 4 | <?php if (!extension_loaded("snuffleupagus") || !extension_loaded("dom")) print("skip"); ?> | 4 | <?php if (!extension_loaded("snuffleupagus") || !extension_loaded("dom")) print("skip"); ?> |
| 5 | <?php if (PHP_VERSION_ID >= 80000) print "skip"; ?> | ||
| 5 | --INI-- | 6 | --INI-- |
| 6 | sp.configuration_file={PWD}/config/disable_xxe_disable.ini | 7 | sp.configuration_file={PWD}/config/disable_xxe_disable.ini |
| 7 | --EXTENSIONS-- | 8 | --EXTENSIONS-- |
diff --git a/src/tests/xxe/disable_xxe_xml_parse.phpt b/src/tests/xxe/disable_xxe_xml_parse.phpt index b6dec2d..6b48bea 100644 --- a/src/tests/xxe/disable_xxe_xml_parse.phpt +++ b/src/tests/xxe/disable_xxe_xml_parse.phpt | |||
| @@ -8,6 +8,7 @@ Disable XXE in xml_parse | |||
| 8 | echo "skip because the `xml` extension isn't loaded"; | 8 | echo "skip because the `xml` extension isn't loaded"; |
| 9 | } | 9 | } |
| 10 | ?> | 10 | ?> |
| 11 | <?php if (PHP_VERSION_ID >= 80000) print "skip"; ?> | ||
| 11 | --EXTENSIONS-- | 12 | --EXTENSIONS-- |
| 12 | xml | 13 | xml |
| 13 | --INI-- | 14 | --INI-- |
