diff options
| author | xXx-caillou-xXx | 2018-08-28 14:24:29 +0200 |
|---|---|---|
| committer | jvoisin | 2018-08-28 12:24:29 +0000 |
| commit | aa5d6895d0ac8c6ea050a8ea55e2f8a39ddfe365 (patch) | |
| tree | c640e50ab007bae3a2fd55ca05bc13c73e293c69 | |
| parent | eff2c658d37108020215f838d4c47c176ec3e050 (diff) | |
Use php's logging functions
This commit replace our usage of `php_log_err` with `zend_error`. This should
allow administrators to display errors in the webpage, should they want to;
and to properly manipulate the verbosity's level.
This should close #217
212 files changed, 638 insertions, 421 deletions
diff --git a/src/sp_config.c b/src/sp_config.c index e5cb3ce..2480362 100644 --- a/src/sp_config.c +++ b/src/sp_config.c | |||
| @@ -40,7 +40,7 @@ static int parse_line(char *line) { | |||
| 40 | } | 40 | } |
| 41 | 41 | ||
| 42 | if (strncmp(ptr, SP_TOKEN_BASE, strlen(SP_TOKEN_BASE))) { | 42 | if (strncmp(ptr, SP_TOKEN_BASE, strlen(SP_TOKEN_BASE))) { |
| 43 | sp_log_err("config", "Invalid configuration prefix for '%s' on line %zu.", | 43 | sp_log_err("config", "Invalid configuration prefix for '%s' on line %zu", |
| 44 | line, sp_line_no); | 44 | line, sp_line_no); |
| 45 | return -1; | 45 | return -1; |
| 46 | } | 46 | } |
| @@ -51,7 +51,7 @@ static int parse_line(char *line) { | |||
| 51 | return sp_func[i].func(ptr + strlen(sp_func[i].token)); | 51 | return sp_func[i].func(ptr + strlen(sp_func[i].token)); |
| 52 | } | 52 | } |
| 53 | } | 53 | } |
| 54 | sp_log_err("config", "Invalid configuration section '%s' on line %zu.", line, | 54 | sp_log_err("config", "Invalid configuration section '%s' on line %zu", line, |
| 55 | sp_line_no); | 55 | sp_line_no); |
| 56 | return -1; | 56 | return -1; |
| 57 | } | 57 | } |
| @@ -114,7 +114,7 @@ int parse_php_type(char *restrict line, char *restrict keyword, void *retval) { | |||
| 114 | "%s) is expecting a valid php type ('false', 'true'," | 114 | "%s) is expecting a valid php type ('false', 'true'," |
| 115 | " 'array'. 'object', 'long', 'double', 'null', 'resource', " | 115 | " 'array'. 'object', 'long', 'double', 'null', 'resource', " |
| 116 | "'reference'," | 116 | "'reference'," |
| 117 | " 'undef') on line %zu.", | 117 | " 'undef') on line %zu", |
| 118 | keyword, sp_line_no); | 118 | keyword, sp_line_no); |
| 119 | return -1; | 119 | return -1; |
| 120 | } | 120 | } |
| @@ -149,7 +149,7 @@ int parse_cidr(char *restrict line, char *restrict keyword, void *retval) { | |||
| 149 | *(sp_cidr **)retval = cidr; | 149 | *(sp_cidr **)retval = cidr; |
| 150 | return consumed; | 150 | return consumed; |
| 151 | } else { | 151 | } else { |
| 152 | sp_log_err("config", "%s doesn't contain a valid cidr on line %zu.", line, | 152 | sp_log_err("config", "%s doesn't contain a valid cidr on line %zu", line, |
| 153 | sp_line_no); | 153 | sp_line_no); |
| 154 | return -1; | 154 | return -1; |
| 155 | } | 155 | } |
| @@ -174,7 +174,7 @@ int parse_regexp(char *restrict line, char *restrict keyword, void *retval) { | |||
| 174 | closing_paren[0] = '\0'; | 174 | closing_paren[0] = '\0'; |
| 175 | } | 175 | } |
| 176 | sp_log_err("config", | 176 | sp_log_err("config", |
| 177 | "'%s)' is expecting a valid regexp, and not '%s' on line %zu.", | 177 | "'%s)' is expecting a valid regexp, and not '%s' on line %zu", |
| 178 | keyword, line, sp_line_no); | 178 | keyword, line, sp_line_no); |
| 179 | return -1; | 179 | return -1; |
| 180 | } | 180 | } |
diff --git a/src/sp_config_keywords.c b/src/sp_config_keywords.c index b86b9d9..13a2f89 100644 --- a/src/sp_config_keywords.c +++ b/src/sp_config_keywords.c | |||
| @@ -19,7 +19,7 @@ static int parse_enable(char *line, bool *restrict retval, | |||
| 19 | } | 19 | } |
| 20 | 20 | ||
| 21 | if (!(enable ^ disable)) { | 21 | if (!(enable ^ disable)) { |
| 22 | sp_log_err("config", "A rule can't be enabled and disabled on line %zu.", | 22 | sp_log_err("config", "A rule can't be enabled and disabled on line %zu", |
| 23 | sp_line_no); | 23 | sp_line_no); |
| 24 | return -1; | 24 | return -1; |
| 25 | } | 25 | } |
| @@ -44,9 +44,9 @@ int parse_session(char *line) { | |||
| 44 | if (0 == (SNUFFLEUPAGUS_G(config).config_snuffleupagus->cookies_env_var)) { | 44 | if (0 == (SNUFFLEUPAGUS_G(config).config_snuffleupagus->cookies_env_var)) { |
| 45 | sp_log_err( | 45 | sp_log_err( |
| 46 | "config", | 46 | "config", |
| 47 | "You're trying to use the session cookie encryption feature" | 47 | "You're trying to use the session cookie encryption feature " |
| 48 | "on line %zu without having set the `.cookie_env_var` option in" | 48 | "on line %zu without having set the `.cookie_env_var` option in" |
| 49 | "`sp.global`: please set it first.", | 49 | "`sp.global`: please set it first", |
| 50 | sp_line_no); | 50 | sp_line_no); |
| 51 | pefree(session, 0); | 51 | pefree(session, 0); |
| 52 | return -1; | 52 | return -1; |
| @@ -54,9 +54,9 @@ int parse_session(char *line) { | |||
| 54 | (SNUFFLEUPAGUS_G(config).config_snuffleupagus->encryption_key)) { | 54 | (SNUFFLEUPAGUS_G(config).config_snuffleupagus->encryption_key)) { |
| 55 | sp_log_err( | 55 | sp_log_err( |
| 56 | "config", | 56 | "config", |
| 57 | "You're trying to use the session cookie encryption feature" | 57 | "You're trying to use the session cookie encryption feature " |
| 58 | "on line %zu without having set the `.encryption_key` option in" | 58 | "on line %zu without having set the `.encryption_key` option in" |
| 59 | "`sp.global`: please set it first.", | 59 | "`sp.global`: please set it first", |
| 60 | sp_line_no); | 60 | sp_line_no); |
| 61 | pefree(session, 0); | 61 | pefree(session, 0); |
| 62 | return -1; | 62 | return -1; |
| @@ -114,7 +114,7 @@ int parse_unserialize(char *line) { | |||
| 114 | } | 114 | } |
| 115 | 115 | ||
| 116 | if (!(enable ^ disable)) { | 116 | if (!(enable ^ disable)) { |
| 117 | sp_log_err("config", "A rule can't be enabled and disabled on line %zu.", | 117 | sp_log_err("config", "A rule can't be enabled and disabled on line %zu", |
| 118 | sp_line_no); | 118 | sp_line_no); |
| 119 | return -1; | 119 | return -1; |
| 120 | } | 120 | } |
| @@ -145,7 +145,7 @@ int parse_readonly_exec(char *line) { | |||
| 145 | } | 145 | } |
| 146 | 146 | ||
| 147 | if (!(enable ^ disable)) { | 147 | if (!(enable ^ disable)) { |
| 148 | sp_log_err("config", "A rule can't be enabled and disabled on line %zu.", | 148 | sp_log_err("config", "A rule can't be enabled and disabled on line %zu", |
| 149 | sp_line_no); | 149 | sp_line_no); |
| 150 | return -1; | 150 | return -1; |
| 151 | } | 151 | } |
| @@ -236,7 +236,7 @@ int parse_cookie(char *line) { | |||
| 236 | "config", | 236 | "config", |
| 237 | "You're trying to use the cookie encryption feature" | 237 | "You're trying to use the cookie encryption feature" |
| 238 | "on line %zu without having set the `.cookie_env_var` option in" | 238 | "on line %zu without having set the `.cookie_env_var` option in" |
| 239 | "`sp.global`: please set it first.", | 239 | "`sp.global`: please set it first", |
| 240 | sp_line_no); | 240 | sp_line_no); |
| 241 | return -1; | 241 | return -1; |
| 242 | } else if (0 == | 242 | } else if (0 == |
| @@ -245,28 +245,28 @@ int parse_cookie(char *line) { | |||
| 245 | "config", | 245 | "config", |
| 246 | "You're trying to use the cookie encryption feature" | 246 | "You're trying to use the cookie encryption feature" |
| 247 | "on line %zu without having set the `.encryption_key` option in" | 247 | "on line %zu without having set the `.encryption_key` option in" |
| 248 | "`sp.global`: please set it first.", | 248 | "`sp.global`: please set it first", |
| 249 | sp_line_no); | 249 | sp_line_no); |
| 250 | return -1; | 250 | return -1; |
| 251 | } | 251 | } |
| 252 | } else if (!samesite) { | 252 | } else if (!samesite) { |
| 253 | sp_log_err("config", | 253 | sp_log_err("config", |
| 254 | "You must specify a at least one action to a cookie on line " | 254 | "You must specify a at least one action to a cookie on line " |
| 255 | "%zu.", | 255 | "%zu", |
| 256 | sp_line_no); | 256 | sp_line_no); |
| 257 | return -1; | 257 | return -1; |
| 258 | } | 258 | } |
| 259 | if ((!cookie->name || 0 == ZSTR_LEN(cookie->name)) && !cookie->name_r) { | 259 | if ((!cookie->name || 0 == ZSTR_LEN(cookie->name)) && !cookie->name_r) { |
| 260 | sp_log_err("config", | 260 | sp_log_err("config", |
| 261 | "You must specify a cookie name/regexp on line " | 261 | "You must specify a cookie name/regexp on line " |
| 262 | "%zu.", | 262 | "%zu", |
| 263 | sp_line_no); | 263 | sp_line_no); |
| 264 | return -1; | 264 | return -1; |
| 265 | } | 265 | } |
| 266 | if (cookie->name && cookie->name_r) { | 266 | if (cookie->name && cookie->name_r) { |
| 267 | sp_log_err("config", | 267 | sp_log_err("config", |
| 268 | "name and name_r are mutually exclusive on line " | 268 | "name and name_r are mutually exclusive on line " |
| 269 | "%zu.", | 269 | "%zu", |
| 270 | sp_line_no); | 270 | sp_line_no); |
| 271 | return -1; | 271 | return -1; |
| 272 | } | 272 | } |
| @@ -280,7 +280,7 @@ int parse_cookie(char *line) { | |||
| 280 | sp_log_err( | 280 | sp_log_err( |
| 281 | "config", | 281 | "config", |
| 282 | "%s is an invalid value to samesite (expected %s or %s) on line " | 282 | "%s is an invalid value to samesite (expected %s or %s) on line " |
| 283 | "%zu.", | 283 | "%zu", |
| 284 | ZSTR_VAL(samesite), SP_TOKEN_SAMESITE_LAX, SP_TOKEN_SAMESITE_STRICT, | 284 | ZSTR_VAL(samesite), SP_TOKEN_SAMESITE_LAX, SP_TOKEN_SAMESITE_STRICT, |
| 285 | sp_line_no); | 285 | sp_line_no); |
| 286 | return -1; | 286 | return -1; |
| @@ -350,7 +350,7 @@ int parse_disabled_functions(char *line) { | |||
| 350 | if (X && Y) { \ | 350 | if (X && Y) { \ |
| 351 | sp_log_err("config", \ | 351 | sp_log_err("config", \ |
| 352 | "Invalid configuration line: 'sp.disabled_functions%s': " \ | 352 | "Invalid configuration line: 'sp.disabled_functions%s': " \ |
| 353 | "'.%s' and '.%s' are mutually exclusive on line %zu.", \ | 353 | "'.%s' and '.%s' are mutually exclusive on line %zu", \ |
| 354 | line, STR1, STR2, sp_line_no); \ | 354 | line, STR1, STR2, sp_line_no); \ |
| 355 | return 1; \ | 355 | return 1; \ |
| 356 | } | 356 | } |
| @@ -367,38 +367,38 @@ int parse_disabled_functions(char *line) { | |||
| 367 | sp_log_err( | 367 | sp_log_err( |
| 368 | "config", | 368 | "config", |
| 369 | "Invalid configuration line: 'sp.disabled_functions%s':" | 369 | "Invalid configuration line: 'sp.disabled_functions%s':" |
| 370 | "'.r_param', '.param' and '.pos' are mutually exclusive on line %zu.", | 370 | "'.r_param', '.param' and '.pos' are mutually exclusive on line %zu", |
| 371 | line, sp_line_no); | 371 | line, sp_line_no); |
| 372 | return -1; | 372 | return -1; |
| 373 | } else if ((df->r_key || df->key) && (df->r_value || df->value)) { | 373 | } else if ((df->r_key || df->key) && (df->r_value || df->value)) { |
| 374 | sp_log_err("config", | 374 | sp_log_err("config", |
| 375 | "Invalid configuration line: 'sp.disabled_functions%s':" | 375 | "Invalid configuration line: 'sp.disabled_functions%s':" |
| 376 | "`key` and `value` are mutually exclusive on line %zu.", | 376 | "`key` and `value` are mutually exclusive on line %zu", |
| 377 | line, sp_line_no); | 377 | line, sp_line_no); |
| 378 | return -1; | 378 | return -1; |
| 379 | } else if ((df->r_ret || df->ret || df->ret_type) && (df->r_param || param)) { | 379 | } else if ((df->r_ret || df->ret || df->ret_type) && (df->r_param || param)) { |
| 380 | sp_log_err("config", | 380 | sp_log_err("config", |
| 381 | "Invalid configuration line: 'sp.disabled_functions%s':" | 381 | "Invalid configuration line: 'sp.disabled_functions%s':" |
| 382 | "`ret` and `param` are mutually exclusive on line %zu.", | 382 | "`ret` and `param` are mutually exclusive on line %zu", |
| 383 | line, sp_line_no); | 383 | line, sp_line_no); |
| 384 | return -1; | 384 | return -1; |
| 385 | } else if ((df->r_ret || df->ret || df->ret_type) && (var)) { | 385 | } else if ((df->r_ret || df->ret || df->ret_type) && (var)) { |
| 386 | sp_log_err("config", | 386 | sp_log_err("config", |
| 387 | "Invalid configuration line: 'sp.disabled_functions%s':" | 387 | "Invalid configuration line: 'sp.disabled_functions%s':" |
| 388 | "`ret` and `var` are mutually exclusive on line %zu.", | 388 | "`ret` and `var` are mutually exclusive on line %zu", |
| 389 | line, sp_line_no); | 389 | line, sp_line_no); |
| 390 | return -1; | 390 | return -1; |
| 391 | } else if ((df->r_ret || df->ret || df->ret_type) && | 391 | } else if ((df->r_ret || df->ret || df->ret_type) && |
| 392 | (df->value || df->r_value)) { | 392 | (df->value || df->r_value)) { |
| 393 | sp_log_err("config", | 393 | sp_log_err("config", |
| 394 | "Invalid configuration line: 'sp.disabled_functions%s':" | 394 | "Invalid configuration line: 'sp.disabled_functions%s':" |
| 395 | "`ret` and `value` are mutually exclusive on line %zu.", | 395 | "`ret` and `value` are mutually exclusive on line %zu", |
| 396 | line, sp_line_no); | 396 | line, sp_line_no); |
| 397 | return -1; | 397 | return -1; |
| 398 | } else if (!(df->r_function || df->function)) { | 398 | } else if (!(df->r_function || df->function)) { |
| 399 | sp_log_err("config", | 399 | sp_log_err("config", |
| 400 | "Invalid configuration line: 'sp.disabled_functions%s':" | 400 | "Invalid configuration line: 'sp.disabled_functions%s':" |
| 401 | " must take a function name on line %zu.", | 401 | " must take a function name on line %zu", |
| 402 | line, sp_line_no); | 402 | line, sp_line_no); |
| 403 | return -1; | 403 | return -1; |
| 404 | } else if (df->filename && (*ZSTR_VAL(df->filename) != '/') && | 404 | } else if (df->filename && (*ZSTR_VAL(df->filename) != '/') && |
| @@ -407,13 +407,13 @@ int parse_disabled_functions(char *line) { | |||
| 407 | sp_log_err( | 407 | sp_log_err( |
| 408 | "config", | 408 | "config", |
| 409 | "Invalid configuration line: 'sp.disabled_functions%s':" | 409 | "Invalid configuration line: 'sp.disabled_functions%s':" |
| 410 | "'.filename' must be an absolute path or a phar archive on line %zu.", | 410 | "'.filename' must be an absolute path or a phar archive on line %zu", |
| 411 | line, sp_line_no); | 411 | line, sp_line_no); |
| 412 | return -1; | 412 | return -1; |
| 413 | } else if (!(allow ^ drop)) { | 413 | } else if (!(allow ^ drop)) { |
| 414 | sp_log_err("config", | 414 | sp_log_err("config", |
| 415 | "Invalid configuration line: 'sp.disabled_functions%s': The " | 415 | "Invalid configuration line: 'sp.disabled_functions%s': The " |
| 416 | "rule must either be a `drop` or `allow` one on line %zu.", | 416 | "rule must either be a `drop` or `allow` one on line %zu", |
| 417 | line, sp_line_no); | 417 | line, sp_line_no); |
| 418 | return -1; | 418 | return -1; |
| 419 | } | 419 | } |
| @@ -423,7 +423,7 @@ int parse_disabled_functions(char *line) { | |||
| 423 | char *endptr; | 423 | char *endptr; |
| 424 | df->pos = (int)strtol(ZSTR_VAL(pos), &endptr, 10); | 424 | df->pos = (int)strtol(ZSTR_VAL(pos), &endptr, 10); |
| 425 | if (errno != 0 || endptr == ZSTR_VAL(pos)) { | 425 | if (errno != 0 || endptr == ZSTR_VAL(pos)) { |
| 426 | sp_log_err("config", "Failed to parse arg '%s' of `pos` on line %zu.", | 426 | sp_log_err("config", "Failed to parse arg '%s' of `pos` on line %zu", |
| 427 | ZSTR_VAL(pos), sp_line_no); | 427 | ZSTR_VAL(pos), sp_line_no); |
| 428 | return -1; | 428 | return -1; |
| 429 | } | 429 | } |
| @@ -434,7 +434,7 @@ int parse_disabled_functions(char *line) { | |||
| 434 | char *endptr; | 434 | char *endptr; |
| 435 | df->line = (unsigned int)strtoul(ZSTR_VAL(line_number), &endptr, 10); | 435 | df->line = (unsigned int)strtoul(ZSTR_VAL(line_number), &endptr, 10); |
| 436 | if (errno != 0 || endptr == ZSTR_VAL(line_number)) { | 436 | if (errno != 0 || endptr == ZSTR_VAL(line_number)) { |
| 437 | sp_log_err("config", "Failed to parse arg '%s' of `line` on line %zu.", | 437 | sp_log_err("config", "Failed to parse arg '%s' of `line` on line %zu", |
| 438 | ZSTR_VAL(line_number), sp_line_no); | 438 | ZSTR_VAL(line_number), sp_line_no); |
| 439 | return -1; | 439 | return -1; |
| 440 | } | 440 | } |
| @@ -460,7 +460,7 @@ int parse_disabled_functions(char *line) { | |||
| 460 | df->param = sp_parse_var(ZSTR_VAL(param)); | 460 | df->param = sp_parse_var(ZSTR_VAL(param)); |
| 461 | } | 461 | } |
| 462 | if (!df->param) { | 462 | if (!df->param) { |
| 463 | sp_log_err("config", "Invalid value '%s' for `param` on line %zu.", | 463 | sp_log_err("config", "Invalid value '%s' for `param` on line %zu", |
| 464 | ZSTR_VAL(param), sp_line_no); | 464 | ZSTR_VAL(param), sp_line_no); |
| 465 | return -1; | 465 | return -1; |
| 466 | } | 466 | } |
| @@ -470,12 +470,12 @@ int parse_disabled_functions(char *line) { | |||
| 470 | if (ZSTR_LEN(var)) { | 470 | if (ZSTR_LEN(var)) { |
| 471 | df->var = sp_parse_var(ZSTR_VAL(var)); | 471 | df->var = sp_parse_var(ZSTR_VAL(var)); |
| 472 | if (!df->var) { | 472 | if (!df->var) { |
| 473 | sp_log_err("config", "Invalid value '%s' for `var` on line %zu.", | 473 | sp_log_err("config", "Invalid value '%s' for `var` on line %zu", |
| 474 | ZSTR_VAL(var), sp_line_no); | 474 | ZSTR_VAL(var), sp_line_no); |
| 475 | return -1; | 475 | return -1; |
| 476 | } | 476 | } |
| 477 | } else { | 477 | } else { |
| 478 | sp_log_err("config", "Empty value in `var` on line %zu.", sp_line_no); | 478 | sp_log_err("config", "Empty value in `var` on line %zu", sp_line_no); |
| 479 | return -1; | 479 | return -1; |
| 480 | } | 480 | } |
| 481 | } | 481 | } |
| @@ -534,7 +534,7 @@ int parse_upload_validation(char *line) { | |||
| 534 | } | 534 | } |
| 535 | 535 | ||
| 536 | if (!(enable ^ disable)) { | 536 | if (!(enable ^ disable)) { |
| 537 | sp_log_err("config", "A rule can't be enabled and disabled on line %zu.", | 537 | sp_log_err("config", "A rule can't be enabled and disabled on line %zu", |
| 538 | sp_line_no); | 538 | sp_line_no); |
| 539 | return -1; | 539 | return -1; |
| 540 | } | 540 | } |
| @@ -545,15 +545,15 @@ int parse_upload_validation(char *line) { | |||
| 545 | 545 | ||
| 546 | if (!script) { | 546 | if (!script) { |
| 547 | sp_log_err("config", | 547 | sp_log_err("config", |
| 548 | "The `script` directive is mandatory in '%s' on line %zu.", line, | 548 | "The `script` directive is mandatory in '%s' on line %zu", line, |
| 549 | sp_line_no); | 549 | sp_line_no); |
| 550 | return -1; | 550 | return -1; |
| 551 | } else if (-1 == access(ZSTR_VAL(script), F_OK)) { | 551 | } else if (-1 == access(ZSTR_VAL(script), F_OK)) { |
| 552 | sp_log_err("config", "The `script` (%s) doesn't exist on line %zu.", | 552 | sp_log_err("config", "The `script` (%s) doesn't exist on line %zu", |
| 553 | ZSTR_VAL(script), sp_line_no); | 553 | ZSTR_VAL(script), sp_line_no); |
| 554 | return -1; | 554 | return -1; |
| 555 | } else if (-1 == access(ZSTR_VAL(script), X_OK)) { | 555 | } else if (-1 == access(ZSTR_VAL(script), X_OK)) { |
| 556 | sp_log_err("config", "The `script` (%s) isn't executable on line %zu.", | 556 | sp_log_err("config", "The `script` (%s) isn't executable on line %zu", |
| 557 | ZSTR_VAL(script), sp_line_no); | 557 | ZSTR_VAL(script), sp_line_no); |
| 558 | return -1; | 558 | return -1; |
| 559 | } | 559 | } |
diff --git a/src/sp_config_utils.c b/src/sp_config_utils.c index d72561b..71c9071 100644 --- a/src/sp_config_utils.c +++ b/src/sp_config_utils.c | |||
| @@ -25,7 +25,7 @@ int parse_keywords(sp_config_functions *funcs, char *line) { | |||
| 25 | } | 25 | } |
| 26 | 26 | ||
| 27 | if (*line) { | 27 | if (*line) { |
| 28 | sp_log_err("config", "Trailing chars '%s' at the end of '%s' on line %zu.", | 28 | sp_log_err("config", "Trailing chars '%s' at the end of '%s' on line %zu", |
| 29 | line, original_line, sp_line_no); | 29 | line, original_line, sp_line_no); |
| 30 | return -1; | 30 | return -1; |
| 31 | } | 31 | } |
| @@ -91,12 +91,12 @@ zend_string *get_param(size_t *consumed, char *restrict line, sp_type type, | |||
| 91 | } | 91 | } |
| 92 | err: | 92 | err: |
| 93 | if (0 == j) { | 93 | if (0 == j) { |
| 94 | sp_log_err("error", "A valid string as parameter is expected on line %zu.", | 94 | sp_log_err("error", "A valid string as parameter is expected on line %zu", |
| 95 | sp_line_no); | 95 | sp_line_no); |
| 96 | } else { | 96 | } else { |
| 97 | sp_log_err("error", | 97 | sp_log_err("error", |
| 98 | "There is an issue with the parsing of '%s': it doesn't look " | 98 | "There is an issue with the parsing of '%s': it doesn't look " |
| 99 | "like a valid string on line %zu.", | 99 | "like a valid string on line %zu", |
| 100 | original_line ? original_line : "NULL", sp_line_no); | 100 | original_line ? original_line : "NULL", sp_line_no); |
| 101 | } | 101 | } |
| 102 | line = NULL; | 102 | line = NULL; |
diff --git a/src/sp_crypt.c b/src/sp_crypt.c index d3588b4..f4d1799 100644 --- a/src/sp_crypt.c +++ b/src/sp_crypt.c | |||
| @@ -27,10 +27,10 @@ void generate_key(unsigned char *key) { | |||
| 27 | if (env_var) { | 27 | if (env_var) { |
| 28 | PHP_SHA256Update(&ctx, (unsigned char *)env_var, strlen(env_var)); | 28 | PHP_SHA256Update(&ctx, (unsigned char *)env_var, strlen(env_var)); |
| 29 | } else { | 29 | } else { |
| 30 | sp_log_err( | 30 | sp_log_warn( |
| 31 | "cookie_encryption", | 31 | "cookie_encryption", |
| 32 | "The environment variable '%s'" | 32 | "The environment variable '%s' " |
| 33 | "is empty, cookies are weakly encrypted.", | 33 | "is empty, cookies are weakly encrypted", |
| 34 | ZSTR_VAL( | 34 | ZSTR_VAL( |
| 35 | SNUFFLEUPAGUS_G(config).config_snuffleupagus->cookies_env_var)); | 35 | SNUFFLEUPAGUS_G(config).config_snuffleupagus->cookies_env_var)); |
| 36 | } | 36 | } |
| @@ -58,13 +58,13 @@ int decrypt_zval(zval *pDest, bool simulation, zend_hash_key *hash_key) { | |||
| 58 | sp_log_msg( | 58 | sp_log_msg( |
| 59 | "cookie_encryption", SP_LOG_SIMULATION, | 59 | "cookie_encryption", SP_LOG_SIMULATION, |
| 60 | "Buffer underflow tentative detected in cookie encryption handling " | 60 | "Buffer underflow tentative detected in cookie encryption handling " |
| 61 | "for %s. Using the cookie 'as it' instead of decrypting it.", | 61 | "for %s. Using the cookie 'as it' instead of decrypting it", |
| 62 | hash_key ? ZSTR_VAL(hash_key->key) : "the session"); | 62 | hash_key ? ZSTR_VAL(hash_key->key) : "the session"); |
| 63 | return ZEND_HASH_APPLY_KEEP; | 63 | return ZEND_HASH_APPLY_KEEP; |
| 64 | } else { | 64 | } else { |
| 65 | sp_log_msg( | 65 | sp_log_msg( |
| 66 | "cookie_encryption", SP_LOG_DROP, | 66 | "cookie_encryption", SP_LOG_DROP, |
| 67 | "Buffer underflow tentative detected in cookie encryption handling."); | 67 | "Buffer underflow tentative detected in cookie encryption handling"); |
| 68 | return ZEND_HASH_APPLY_REMOVE; | 68 | return ZEND_HASH_APPLY_REMOVE; |
| 69 | } | 69 | } |
| 70 | } | 70 | } |
| @@ -106,7 +106,7 @@ int decrypt_zval(zval *pDest, bool simulation, zend_hash_key *hash_key) { | |||
| 106 | return ZEND_HASH_APPLY_KEEP; | 106 | return ZEND_HASH_APPLY_KEEP; |
| 107 | } else { | 107 | } else { |
| 108 | sp_log_msg("cookie_encryption", SP_LOG_DROP, | 108 | sp_log_msg("cookie_encryption", SP_LOG_DROP, |
| 109 | "Something went wrong with the decryption of %s.", | 109 | "Something went wrong with the decryption of %s", |
| 110 | hash_key ? ZSTR_VAL(hash_key->key) : "the session"); | 110 | hash_key ? ZSTR_VAL(hash_key->key) : "the session"); |
| 111 | return ZEND_HASH_APPLY_REMOVE; | 111 | return ZEND_HASH_APPLY_REMOVE; |
| 112 | } | 112 | } |
diff --git a/src/sp_disabled_functions.c b/src/sp_disabled_functions.c index b498732..3a30d55 100644 --- a/src/sp_disabled_functions.c +++ b/src/sp_disabled_functions.c | |||
| @@ -105,7 +105,7 @@ static bool is_param_matching(zend_execute_data* execute_data, | |||
| 105 | if (config_node->pos != -1) { | 105 | if (config_node->pos != -1) { |
| 106 | if (config_node->pos > nb_param - 1) { | 106 | if (config_node->pos > nb_param - 1) { |
| 107 | char* complete_function_path = get_complete_function_path(execute_data); | 107 | char* complete_function_path = get_complete_function_path(execute_data); |
| 108 | sp_log_err("config", | 108 | sp_log_warn("config", |
| 109 | "It seems that you wrote a rule filtering on the " | 109 | "It seems that you wrote a rule filtering on the " |
| 110 | "%d%s argument of the function '%s', but it takes only %d " | 110 | "%d%s argument of the function '%s', but it takes only %d " |
| 111 | "arguments. " | 111 | "arguments. " |
| @@ -290,8 +290,6 @@ bool should_disable(zend_execute_data* execute_data, | |||
| 290 | const char* builtin_param_name, const sp_list_node* config, | 290 | const char* builtin_param_name, const sp_list_node* config, |
| 291 | const zend_string* current_filename) { | 291 | const zend_string* current_filename) { |
| 292 | char current_file_hash[SHA256_SIZE * 2 + 1] = {0}; | 292 | char current_file_hash[SHA256_SIZE * 2 + 1] = {0}; |
| 293 | unsigned int line = 0; | ||
| 294 | char* filename = NULL; | ||
| 295 | 293 | ||
| 296 | while (config) { | 294 | while (config) { |
| 297 | sp_disabled_function const* const config_node = | 295 | sp_disabled_function const* const config_node = |
| @@ -327,9 +325,6 @@ bool should_disable(zend_execute_data* execute_data, | |||
| 327 | is_file_matching(execute_data, config_node, current_filename); | 325 | is_file_matching(execute_data, config_node, current_filename); |
| 328 | if (!ex) { | 326 | if (!ex) { |
| 329 | goto next; | 327 | goto next; |
| 330 | } else if (ex != execute_data) { | ||
| 331 | line = ex->opline->lineno; | ||
| 332 | filename = ZSTR_VAL(ex->func->op_array.filename); | ||
| 333 | } | 328 | } |
| 334 | } | 329 | } |
| 335 | 330 | ||
| @@ -360,7 +355,7 @@ bool should_disable(zend_execute_data* execute_data, | |||
| 360 | (config_node->pos != -1)) { | 355 | (config_node->pos != -1)) { |
| 361 | if (!builtin_param && | 356 | if (!builtin_param && |
| 362 | execute_data->func->op_array.arg_info->is_variadic) { | 357 | execute_data->func->op_array.arg_info->is_variadic) { |
| 363 | sp_log_err( | 358 | sp_log_warn( |
| 364 | "disable_function", | 359 | "disable_function", |
| 365 | "Snuffleupagus doesn't support variadic functions yet, sorry. " | 360 | "Snuffleupagus doesn't support variadic functions yet, sorry. " |
| 366 | "Check https://github.com/nbs-system/snuffleupagus/issues/164 for " | 361 | "Check https://github.com/nbs-system/snuffleupagus/issues/164 for " |
| @@ -391,10 +386,10 @@ bool should_disable(zend_execute_data* execute_data, | |||
| 391 | 386 | ||
| 392 | if (config_node->functions_list) { | 387 | if (config_node->functions_list) { |
| 393 | sp_log_disable(ZSTR_VAL(config_node->function), arg_name, arg_value_str, | 388 | sp_log_disable(ZSTR_VAL(config_node->function), arg_name, arg_value_str, |
| 394 | config_node, line, filename); | 389 | config_node); |
| 395 | } else { | 390 | } else { |
| 396 | sp_log_disable(complete_function_path, arg_name, arg_value_str, | 391 | sp_log_disable(complete_function_path, arg_name, arg_value_str, |
| 397 | config_node, line, filename); | 392 | config_node); |
| 398 | } | 393 | } |
| 399 | if (true == config_node->simulation) { | 394 | if (true == config_node->simulation) { |
| 400 | goto next; | 395 | goto next; |
diff --git a/src/sp_pcre_compat.c b/src/sp_pcre_compat.c index 795903d..3b3b7f5 100644 --- a/src/sp_pcre_compat.c +++ b/src/sp_pcre_compat.c | |||
| @@ -4,13 +4,15 @@ | |||
| 4 | 4 | ||
| 5 | sp_pcre* sp_pcre_compile(const char* const pattern) { | 5 | sp_pcre* sp_pcre_compile(const char* const pattern) { |
| 6 | sp_pcre* ret = NULL; | 6 | sp_pcre* ret = NULL; |
| 7 | const char* pcre_error = NULL; | ||
| 8 | #ifdef SP_HAS_PCRE2 | 7 | #ifdef SP_HAS_PCRE2 |
| 8 | char pcre_error[128] = {0}; | ||
| 9 | int errornumber; | 9 | int errornumber; |
| 10 | PCRE2_SIZE erroroffset; | 10 | PCRE2_SIZE erroroffset; |
| 11 | ret = pcre2_compile((PCRE2_SPTR)pattern, PCRE2_ZERO_TERMINATED, | 11 | ret = pcre2_compile((PCRE2_SPTR)pattern, PCRE2_ZERO_TERMINATED, |
| 12 | PCRE2_CASELESS, &errornumber, &erroroffset, NULL); | 12 | PCRE2_CASELESS, &errornumber, &erroroffset, NULL); |
| 13 | pcre2_get_error_message(errornumber, pcre_error, sizeof(pcre_error)); | ||
| 13 | #else | 14 | #else |
| 15 | const char* pcre_error = NULL; | ||
| 14 | int erroroffset; | 16 | int erroroffset; |
| 15 | ret = pcre_compile(pattern, PCRE_CASELESS, &pcre_error, &erroroffset, NULL); | 17 | ret = pcre_compile(pattern, PCRE_CASELESS, &pcre_error, &erroroffset, NULL); |
| 16 | #endif | 18 | #endif |
diff --git a/src/sp_upload_validation.c b/src/sp_upload_validation.c index a8a1340..c079e41 100644 --- a/src/sp_upload_validation.c +++ b/src/sp_upload_validation.c | |||
| @@ -63,7 +63,7 @@ int sp_rfc1867_callback(unsigned int event, void *event_data, void **extra) { | |||
| 63 | ZSTR_VAL( | 63 | ZSTR_VAL( |
| 64 | SNUFFLEUPAGUS_G(config).config_upload_validation->script), | 64 | SNUFFLEUPAGUS_G(config).config_upload_validation->script), |
| 65 | cmd, env) == -1) { | 65 | cmd, env) == -1) { |
| 66 | sp_log_err( | 66 | sp_log_warn( |
| 67 | "upload_validation", "Could not call '%s' : %s", | 67 | "upload_validation", "Could not call '%s' : %s", |
| 68 | ZSTR_VAL( | 68 | ZSTR_VAL( |
| 69 | SNUFFLEUPAGUS_G(config).config_upload_validation->script), | 69 | SNUFFLEUPAGUS_G(config).config_upload_validation->script), |
| @@ -90,7 +90,7 @@ int sp_rfc1867_callback(unsigned int event, void *event_data, void **extra) { | |||
| 90 | "The upload of %s on %s was rejected.", filename, | 90 | "The upload of %s on %s was rejected.", filename, |
| 91 | uri ? uri : "?"); | 91 | uri ? uri : "?"); |
| 92 | if (!SNUFFLEUPAGUS_G(config).config_upload_validation->simulation) { | 92 | if (!SNUFFLEUPAGUS_G(config).config_upload_validation->simulation) { |
| 93 | zend_bailout(); | 93 | sp_terminate(); |
| 94 | } | 94 | } |
| 95 | } | 95 | } |
| 96 | } | 96 | } |
diff --git a/src/sp_utils.c b/src/sp_utils.c index cdcf205..cb6b4a7 100644 --- a/src/sp_utils.c +++ b/src/sp_utils.c | |||
| @@ -9,16 +9,6 @@ | |||
| 9 | 9 | ||
| 10 | ZEND_DECLARE_MODULE_GLOBALS(snuffleupagus) | 10 | ZEND_DECLARE_MODULE_GLOBALS(snuffleupagus) |
| 11 | 11 | ||
| 12 | static inline void _sp_log_err(const char* fmt, ...) { | ||
| 13 | char* msg; | ||
| 14 | va_list args; | ||
| 15 | |||
| 16 | va_start(args, fmt); | ||
| 17 | vspprintf(&msg, 0, fmt, args); | ||
| 18 | va_end(args); | ||
| 19 | php_log_err(msg); | ||
| 20 | } | ||
| 21 | |||
| 22 | static bool sp_zend_string_equals(const zend_string* s1, | 12 | static bool sp_zend_string_equals(const zend_string* s1, |
| 23 | const zend_string* s2) { | 13 | const zend_string* s2) { |
| 24 | // We can't use `zend_string_equals` here because it doesn't work on | 14 | // We can't use `zend_string_equals` here because it doesn't work on |
| @@ -27,7 +17,7 @@ static bool sp_zend_string_equals(const zend_string* s1, | |||
| 27 | !memcmp(ZSTR_VAL(s1), ZSTR_VAL(s2), ZSTR_LEN(s1)); | 17 | !memcmp(ZSTR_VAL(s1), ZSTR_VAL(s2), ZSTR_LEN(s1)); |
| 28 | } | 18 | } |
| 29 | 19 | ||
| 30 | void sp_log_msg(char const* feature, char const* level, const char* fmt, ...) { | 20 | void sp_log_msg(char const* feature, int type, const char* fmt, ...) { |
| 31 | char* msg; | 21 | char* msg; |
| 32 | va_list args; | 22 | va_list args; |
| 33 | 23 | ||
| @@ -35,9 +25,7 @@ void sp_log_msg(char const* feature, char const* level, const char* fmt, ...) { | |||
| 35 | vspprintf(&msg, 0, fmt, args); | 25 | vspprintf(&msg, 0, fmt, args); |
| 36 | va_end(args); | 26 | va_end(args); |
| 37 | 27 | ||
| 38 | char const* const client_ip = getenv("REMOTE_ADDR"); | 28 | zend_error(type, "[snuffleupagus][%s] %s", feature, msg); |
| 39 | _sp_log_err("[snuffleupagus][%s][%s][%s] %s", | ||
| 40 | client_ip ? client_ip : "0.0.0.0", feature, level, msg); | ||
| 41 | } | 29 | } |
| 42 | 30 | ||
| 43 | int compute_hash(const char* const filename, char* file_hash) { | 31 | int compute_hash(const char* const filename, char* file_hash) { |
| @@ -50,7 +38,7 @@ int compute_hash(const char* const filename, char* file_hash) { | |||
| 50 | php_stream_open_wrapper(filename, "rb", REPORT_ERRORS, NULL); | 38 | php_stream_open_wrapper(filename, "rb", REPORT_ERRORS, NULL); |
| 51 | if (!stream) { | 39 | if (!stream) { |
| 52 | sp_log_err("hash_computation", | 40 | sp_log_err("hash_computation", |
| 53 | "Can not open the file %s to compute its hash.\n", filename); | 41 | "Can not open the file %s to compute its hash", filename); |
| 54 | return FAILURE; | 42 | return FAILURE; |
| 55 | } | 43 | } |
| 56 | 44 | ||
| @@ -71,8 +59,8 @@ static int construct_filename(char* filename, const zend_string* folder, | |||
| 71 | char strhash[65] = {0}; | 59 | char strhash[65] = {0}; |
| 72 | 60 | ||
| 73 | if (-1 == mkdir(ZSTR_VAL(folder), 0700) && errno != EEXIST) { | 61 | if (-1 == mkdir(ZSTR_VAL(folder), 0700) && errno != EEXIST) { |
| 74 | sp_log_err("request_logging", "Unable to create the folder '%s'.", | 62 | sp_log_warn("request_logging", "Unable to create the folder '%s'", |
| 75 | ZSTR_VAL(folder)); | 63 | ZSTR_VAL(folder)); |
| 76 | return -1; | 64 | return -1; |
| 77 | } | 65 | } |
| 78 | 66 | ||
| @@ -106,8 +94,8 @@ int sp_log_request(const zend_string* folder, const zend_string* text_repr, | |||
| 106 | return -1; | 94 | return -1; |
| 107 | } | 95 | } |
| 108 | if (NULL == (file = fopen(filename, "w+"))) { | 96 | if (NULL == (file = fopen(filename, "w+"))) { |
| 109 | sp_log_err("request_logging", "Unable to open %s: %s", filename, | 97 | sp_log_warn("request_logging", "Unable to open %s: %s", filename, |
| 110 | strerror(errno)); | 98 | strerror(errno)); |
| 111 | return -1; | 99 | return -1; |
| 112 | } | 100 | } |
| 113 | 101 | ||
| @@ -146,7 +134,7 @@ static char* zend_string_to_char(const zend_string* zs) { | |||
| 146 | 134 | ||
| 147 | if (ZSTR_LEN(zs) + 1 < ZSTR_LEN(zs)) { | 135 | if (ZSTR_LEN(zs) + 1 < ZSTR_LEN(zs)) { |
| 148 | sp_log_err("overflow_error", | 136 | sp_log_err("overflow_error", |
| 149 | "Overflow tentative detected in zend_string_to_char."); | 137 | "Overflow tentative detected in zend_string_to_char"); |
| 150 | sp_terminate(); | 138 | sp_terminate(); |
| 151 | } | 139 | } |
| 152 | char* copy = emalloc(ZSTR_LEN(zs) + 1); | 140 | char* copy = emalloc(ZSTR_LEN(zs) + 1); |
| @@ -214,15 +202,15 @@ bool sp_match_value(const zend_string* value, const zend_string* to_match, | |||
| 214 | 202 | ||
| 215 | void sp_log_disable(const char* restrict path, const char* restrict arg_name, | 203 | void sp_log_disable(const char* restrict path, const char* restrict arg_name, |
| 216 | const zend_string* restrict arg_value, | 204 | const zend_string* restrict arg_value, |
| 217 | const sp_disabled_function* config_node, unsigned int line, | 205 | const sp_disabled_function* config_node) { |
| 218 | const char* restrict filename) { | ||
| 219 | const zend_string* dump = config_node->dump; | 206 | const zend_string* dump = config_node->dump; |
| 220 | const zend_string* alias = config_node->alias; | 207 | const zend_string* alias = config_node->alias; |
| 221 | const int sim = config_node->simulation; | 208 | const int sim = config_node->simulation; |
| 222 | 209 | ||
| 223 | filename = filename ? filename : zend_get_executed_filename(TSRMLS_C); | 210 | if (dump) { |
| 224 | line = line ? line : zend_get_executed_lineno(TSRMLS_C); | 211 | sp_log_request(config_node->dump, config_node->textual_representation, |
| 225 | 212 | SP_TOKEN_DISABLE_FUNC); | |
| 213 | } | ||
| 226 | if (arg_name) { | 214 | if (arg_name) { |
| 227 | char* char_repr = NULL; | 215 | char* char_repr = NULL; |
| 228 | if (arg_value) { | 216 | if (arg_value) { |
| @@ -231,33 +219,29 @@ void sp_log_disable(const char* restrict path, const char* restrict arg_name, | |||
| 231 | if (alias) { | 219 | if (alias) { |
| 232 | sp_log_msg( | 220 | sp_log_msg( |
| 233 | "disabled_function", sim ? SP_LOG_SIMULATION : SP_LOG_DROP, | 221 | "disabled_function", sim ? SP_LOG_SIMULATION : SP_LOG_DROP, |
| 234 | "Aborted execution on call of the function '%s' in %s:%d, " | 222 | "Aborted execution on call of the function '%s', " |
| 235 | "because its argument '%s' content (%s) matched the rule '%s'.", | 223 | "because its argument '%s' content (%s) matched the rule '%s'", |
| 236 | path, filename, line, arg_name, char_repr ? char_repr : "?", | 224 | path, arg_name, char_repr ? char_repr : "?", |
| 237 | ZSTR_VAL(alias)); | 225 | ZSTR_VAL(alias)); |
| 238 | } else { | 226 | } else { |
| 239 | sp_log_msg("disabled_function", sim ? SP_LOG_SIMULATION : SP_LOG_DROP, | 227 | sp_log_msg("disabled_function", sim ? SP_LOG_SIMULATION : SP_LOG_DROP, |
| 240 | "Aborted execution on call of the function '%s' in %s:%d, " | 228 | "Aborted execution on call of the function '%s', " |
| 241 | "because its argument '%s' content (%s) matched a rule.", | 229 | "because its argument '%s' content (%s) matched a rule", |
| 242 | path, filename, line, arg_name, char_repr ? char_repr : "?"); | 230 | path, arg_name, char_repr ? char_repr : "?"); |
| 243 | } | 231 | } |
| 244 | efree(char_repr); | 232 | efree(char_repr); |
| 245 | } else { | 233 | } else { |
| 246 | if (alias) { | 234 | if (alias) { |
| 247 | sp_log_msg("disabled_function", sim ? SP_LOG_SIMULATION : SP_LOG_DROP, | 235 | sp_log_msg("disabled_function", sim ? SP_LOG_SIMULATION : SP_LOG_DROP, |
| 248 | "Aborted execution on call of the function '%s' in %s:%d, " | 236 | "Aborted execution on call of the function '%s', " |
| 249 | "because of the the rule '%s'.", | 237 | "because of the the rule '%s'", |
| 250 | path, filename, line, ZSTR_VAL(alias)); | 238 | path, ZSTR_VAL(alias)); |
| 251 | } else { | 239 | } else { |
| 252 | sp_log_msg("disabled_function", sim ? SP_LOG_SIMULATION : SP_LOG_DROP, | 240 | sp_log_msg("disabled_function", sim ? SP_LOG_SIMULATION : SP_LOG_DROP, |
| 253 | "Aborted execution on call of the function '%s' in %s:%d.", | 241 | "Aborted execution on call of the function '%s'", |
| 254 | path, filename, line); | 242 | path); |
| 255 | } | 243 | } |
| 256 | } | 244 | } |
| 257 | if (dump) { | ||
| 258 | sp_log_request(config_node->dump, config_node->textual_representation, | ||
| 259 | SP_TOKEN_DISABLE_FUNC); | ||
| 260 | } | ||
| 261 | } | 245 | } |
| 262 | 246 | ||
| 263 | void sp_log_disable_ret(const char* restrict path, | 247 | void sp_log_disable_ret(const char* restrict path, |
| @@ -268,29 +252,27 @@ void sp_log_disable_ret(const char* restrict path, | |||
| 268 | const int sim = config_node->simulation; | 252 | const int sim = config_node->simulation; |
| 269 | char* char_repr = NULL; | 253 | char* char_repr = NULL; |
| 270 | 254 | ||
| 255 | if (dump) { | ||
| 256 | sp_log_request(dump, config_node->textual_representation, | ||
| 257 | SP_TOKEN_DISABLE_FUNC); | ||
| 258 | } | ||
| 271 | if (ret_value) { | 259 | if (ret_value) { |
| 272 | char_repr = zend_string_to_char(ret_value); | 260 | char_repr = zend_string_to_char(ret_value); |
| 273 | } | 261 | } |
| 274 | if (alias) { | 262 | if (alias) { |
| 275 | sp_log_msg( | 263 | sp_log_msg( |
| 276 | "disabled_function", sim ? SP_LOG_SIMULATION : SP_LOG_DROP, | 264 | "disabled_function", sim ? SP_LOG_SIMULATION : SP_LOG_DROP, |
| 277 | "Aborted execution on return of the function '%s' in %s:%d, " | 265 | "Aborted execution on return of the function '%s', " |
| 278 | "because the function returned '%s', which matched the rule '%s'.", | 266 | "because the function returned '%s', which matched the rule '%s'", |
| 279 | path, zend_get_executed_filename(TSRMLS_C), | 267 | path, char_repr ? char_repr : "?", |
| 280 | zend_get_executed_lineno(TSRMLS_C), char_repr ? char_repr : "?", | ||
| 281 | ZSTR_VAL(alias)); | 268 | ZSTR_VAL(alias)); |
| 282 | } else { | 269 | } else { |
| 283 | sp_log_msg("disabled_function", sim ? SP_LOG_SIMULATION : SP_LOG_DROP, | 270 | sp_log_msg("disabled_function", sim ? SP_LOG_SIMULATION : SP_LOG_DROP, |
| 284 | "Aborted execution on return of the function '%s' in %s:%d, " | 271 | "Aborted execution on return of the function '%s', " |
| 285 | "because the function returned '%s', which matched a rule.", | 272 | "because the function returned '%s', which matched a rule", |
| 286 | path, zend_get_executed_filename(TSRMLS_C), | 273 | path, char_repr ? char_repr : "?"); |
| 287 | zend_get_executed_lineno(TSRMLS_C), char_repr ? char_repr : "?"); | ||
| 288 | } | 274 | } |
| 289 | efree(char_repr); | 275 | efree(char_repr); |
| 290 | if (dump) { | ||
| 291 | sp_log_request(dump, config_node->textual_representation, | ||
| 292 | SP_TOKEN_DISABLE_FUNC); | ||
| 293 | } | ||
| 294 | } | 276 | } |
| 295 | 277 | ||
| 296 | bool sp_match_array_key(const zval* zv, const zend_string* to_match, | 278 | bool sp_match_array_key(const zval* zv, const zend_string* to_match, |
diff --git a/src/sp_utils.h b/src/sp_utils.h index 7e1103c..62040e7 100644 --- a/src/sp_utils.h +++ b/src/sp_utils.h | |||
| @@ -28,12 +28,14 @@ | |||
| 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 "simulation" | 31 | #define SP_LOG_SIMULATION E_WARNING |
| 32 | #define SP_LOG_DROP "drop" | 32 | #define SP_LOG_DROP E_ERROR |
| 33 | #define SP_LOG_DEBUG "debug" | 33 | #define SP_LOG_DEBUG E_NOTICE |
| 34 | #define SP_LOG_ERROR "error" | 34 | #define SP_LOG_ERROR E_ERROR |
| 35 | #define SP_LOG_WARN E_WARNING | ||
| 35 | 36 | ||
| 36 | #define sp_log_err(feature, ...) sp_log_msg(feature, SP_LOG_ERROR, __VA_ARGS__) | 37 | #define sp_log_err(feature, ...) sp_log_msg(feature, SP_LOG_ERROR, __VA_ARGS__) |
| 38 | #define sp_log_warn(feature, ...) sp_log_msg(feature, SP_LOG_WARN, __VA_ARGS__) | ||
| 37 | #ifdef SP_DEBUG | 39 | #ifdef SP_DEBUG |
| 38 | #define sp_log_debug(...) sp_log_msg("DEBUG", SP_LOG_DEBUG, __VA_ARGS__) | 40 | #define sp_log_debug(...) sp_log_msg("DEBUG", SP_LOG_DEBUG, __VA_ARGS__) |
| 39 | #else | 41 | #else |
| @@ -42,15 +44,14 @@ | |||
| 42 | 44 | ||
| 43 | #define GET_SUFFIX(x) (x == 1) ? "st" : ((x == 2) ? "nd" : "th") | 45 | #define GET_SUFFIX(x) (x == 1) ? "st" : ((x == 2) ? "nd" : "th") |
| 44 | 46 | ||
| 45 | void sp_log_msg(char const *feature, char const *level, const char *fmt, ...); | 47 | void sp_log_msg(char const *feature, int type, const char *fmt, ...); |
| 46 | int compute_hash(const char *const filename, char *file_hash); | 48 | int compute_hash(const char *const filename, char *file_hash); |
| 47 | const zend_string *sp_zval_to_zend_string(zval *); | 49 | const zend_string *sp_zval_to_zend_string(zval *); |
| 48 | bool sp_match_value(const zend_string *, const zend_string *, const sp_pcre *); | 50 | bool sp_match_value(const zend_string *, const zend_string *, const sp_pcre *); |
| 49 | bool sp_match_array_key(const zval *, const zend_string *, const sp_pcre *); | 51 | bool sp_match_array_key(const zval *, const zend_string *, const sp_pcre *); |
| 50 | bool sp_match_array_value(const zval *, const zend_string *, const sp_pcre *); | 52 | bool sp_match_array_value(const zval *, const zend_string *, const sp_pcre *); |
| 51 | void sp_log_disable(const char *restrict, const char *restrict, | 53 | void sp_log_disable(const char *restrict, const char *restrict, |
| 52 | const zend_string *restrict, const sp_disabled_function *, | 54 | const zend_string *restrict, const sp_disabled_function *); |
| 53 | unsigned int, const char *restrict); | ||
| 54 | void sp_log_disable_ret(const char *restrict, const zend_string *restrict, | 55 | void sp_log_disable_ret(const char *restrict, const zend_string *restrict, |
| 55 | const sp_disabled_function *); | 56 | const sp_disabled_function *); |
| 56 | int hook_function(const char *, HashTable *, | 57 | int hook_function(const char *, HashTable *, |
diff --git a/src/tests/broken_conf.phpt b/src/tests/broken_conf.phpt index 9b461bb..981f982 100644 --- a/src/tests/broken_conf.phpt +++ b/src/tests/broken_conf.phpt | |||
| @@ -6,5 +6,6 @@ Broken configuration | |||
| 6 | sp.configuration_file={PWD}/config/broken_conf.ini | 6 | sp.configuration_file={PWD}/config/broken_conf.ini |
| 7 | --FILE-- | 7 | --FILE-- |
| 8 | --EXPECT-- | 8 | --EXPECT-- |
| 9 | [snuffleupagus][0.0.0.0][config][error] Invalid configuration prefix for 'this is a broken line' on line 1. | 9 | PHP Fatal error: [snuffleupagus][config] Invalid configuration prefix for 'this is a broken line' on line 1 in Unknown on line 0 |
| 10 | 10 | ||
| 11 | Fatal error: [snuffleupagus][config] Invalid configuration prefix for 'this is a broken line' on line 1 in Unknown on line 0 \ No newline at end of file | ||
diff --git a/src/tests/broken_conf2.phpt b/src/tests/broken_conf2.phpt index da9ac95..240e3af 100644 --- a/src/tests/broken_conf2.phpt +++ b/src/tests/broken_conf2.phpt | |||
| @@ -6,4 +6,6 @@ Broken configuration | |||
| 6 | sp.configuration_file={PWD}/config/broken_conf2.ini | 6 | sp.configuration_file={PWD}/config/broken_conf2.ini |
| 7 | --FILE-- | 7 | --FILE-- |
| 8 | --EXPECT-- | 8 | --EXPECT-- |
| 9 | [snuffleupagus][0.0.0.0][config][error] Invalid configuration section 'sp.wrong' on line 1. | 9 | PHP Fatal error: [snuffleupagus][config] Invalid configuration section 'sp.wrong' on line 1 in Unknown on line 0 |
| 10 | |||
| 11 | Fatal error: [snuffleupagus][config] Invalid configuration section 'sp.wrong' on line 1 in Unknown on line 0 \ No newline at end of file | ||
diff --git a/src/tests/broken_conf_config_regexp.phpt b/src/tests/broken_conf_config_regexp.phpt index e49788c..c4e788e 100644 --- a/src/tests/broken_conf_config_regexp.phpt +++ b/src/tests/broken_conf_config_regexp.phpt | |||
| @@ -6,5 +6,9 @@ Broken configuration | |||
| 6 | sp.configuration_file={PWD}/config/broken_config_regexp.ini | 6 | sp.configuration_file={PWD}/config/broken_config_regexp.ini |
| 7 | --FILE-- | 7 | --FILE-- |
| 8 | --EXPECTF-- | 8 | --EXPECTF-- |
| 9 | [snuffleupagus][0.0.0.0][config][error] Failed to compile '*.': %aon line 1. | 9 | PHP Fatal error: [snuffleupagus][config] Failed to compile '*.': %s on line 1. in Unknown on line 0 |
| 10 | [snuffleupagus][0.0.0.0][config][error] '.filename_r()' is expecting a valid regexp, and not '"*."' on line 1. | 10 | PHP Fatal error: [snuffleupagus][config] '.filename_r()' is expecting a valid regexp, and not '"*."' on line 1 in Unknown on line 0 |
| 11 | |||
| 12 | Fatal error: [snuffleupagus][config] Failed to compile '*.': %s on line 1. in Unknown on line 0 | ||
| 13 | |||
| 14 | Fatal error: [snuffleupagus][config] '.filename_r()' is expecting a valid regexp, and not '"*."' on line 1 in Unknown on line 0 | ||
diff --git a/src/tests/broken_conf_config_regexp_no_closing_paren.phpt b/src/tests/broken_conf_config_regexp_no_closing_paren.phpt index a57286d..16351a4 100644 --- a/src/tests/broken_conf_config_regexp_no_closing_paren.phpt +++ b/src/tests/broken_conf_config_regexp_no_closing_paren.phpt | |||
| @@ -6,5 +6,9 @@ Broken configuration - regexp without a closing parenthesis | |||
| 6 | sp.configuration_file={PWD}/config/broken_config_regexp_no_closing_paren.ini | 6 | sp.configuration_file={PWD}/config/broken_config_regexp_no_closing_paren.ini |
| 7 | --FILE-- | 7 | --FILE-- |
| 8 | --EXPECT-- | 8 | --EXPECT-- |
| 9 | [snuffleupagus][0.0.0.0][error][error] There is an issue with the parsing of '"*."': it doesn't look like a valid string on line 1. | 9 | PHP Fatal error: [snuffleupagus][error] There is an issue with the parsing of '"*."': it doesn't look like a valid string on line 1 in Unknown on line 0 |
| 10 | [snuffleupagus][0.0.0.0][config][error] '.filename_r()' is expecting a valid regexp, and not '"*."' on line 1. | 10 | PHP Fatal error: [snuffleupagus][config] '.filename_r()' is expecting a valid regexp, and not '"*."' on line 1 in Unknown on line 0 |
| 11 | |||
| 12 | Fatal error: [snuffleupagus][error] There is an issue with the parsing of '"*."': it doesn't look like a valid string on line 1 in Unknown on line 0 | ||
| 13 | |||
| 14 | Fatal error: [snuffleupagus][config] '.filename_r()' is expecting a valid regexp, and not '"*."' on line 1 in Unknown on line 0 \ No newline at end of file | ||
diff --git a/src/tests/broken_conf_cookie_name_and_regexp.phpt b/src/tests/broken_conf_cookie_name_and_regexp.phpt index 8b0dbfa..ae3fa62 100644 --- a/src/tests/broken_conf_cookie_name_and_regexp.phpt +++ b/src/tests/broken_conf_cookie_name_and_regexp.phpt | |||
| @@ -6,4 +6,6 @@ Borken configuration - encrypted cookie with name and regexp | |||
| 6 | sp.configuration_file={PWD}/config/broken_conf_cookie_name_and_regexp.ini | 6 | sp.configuration_file={PWD}/config/broken_conf_cookie_name_and_regexp.ini |
| 7 | --FILE-- | 7 | --FILE-- |
| 8 | --EXPECT-- | 8 | --EXPECT-- |
| 9 | [snuffleupagus][0.0.0.0][config][error] name and name_r are mutually exclusive on line 2. | 9 | PHP Fatal error: [snuffleupagus][config] name and name_r are mutually exclusive on line 2 in Unknown on line 0 |
| 10 | |||
| 11 | Fatal error: [snuffleupagus][config] name and name_r are mutually exclusive on line 2 in Unknown on line 0 \ No newline at end of file | ||
diff --git a/src/tests/broken_conf_enable_disable.phpt b/src/tests/broken_conf_enable_disable.phpt index 5d860b9..f96e737 100644 --- a/src/tests/broken_conf_enable_disable.phpt +++ b/src/tests/broken_conf_enable_disable.phpt | |||
| @@ -6,4 +6,6 @@ Global strict mode | |||
| 6 | sp.configuration_file={PWD}/config/borken_conf_enable_disable.ini | 6 | sp.configuration_file={PWD}/config/borken_conf_enable_disable.ini |
| 7 | --FILE-- | 7 | --FILE-- |
| 8 | --EXPECTF-- | 8 | --EXPECTF-- |
| 9 | [snuffleupagus][0.0.0.0][config][error] A rule can't be enabled and disabled on line 1. | 9 | PHP Fatal error: [snuffleupagus][config] A rule can't be enabled and disabled on line 1 in Unknown on line 0 |
| 10 | |||
| 11 | Fatal error: [snuffleupagus][config] A rule can't be enabled and disabled on line 1 in Unknown on line 0 \ No newline at end of file | ||
diff --git a/src/tests/broken_conf_eval.phpt b/src/tests/broken_conf_eval.phpt index 4dc5312..6ba7f8f 100644 --- a/src/tests/broken_conf_eval.phpt +++ b/src/tests/broken_conf_eval.phpt | |||
| @@ -6,4 +6,6 @@ Broken configuration for eval | |||
| 6 | sp.configuration_file={PWD}/config/broken_conf_eval.ini | 6 | sp.configuration_file={PWD}/config/broken_conf_eval.ini |
| 7 | --FILE-- | 7 | --FILE-- |
| 8 | --EXPECT-- | 8 | --EXPECT-- |
| 9 | [snuffleupagus][0.0.0.0][error][error] There is an issue with the parsing of '"cos,sin': it doesn't look like a valid string on line 1. | 9 | PHP Fatal error: [snuffleupagus][error] There is an issue with the parsing of '"cos,sin': it doesn't look like a valid string on line 1 in Unknown on line 0 |
| 10 | |||
| 11 | Fatal error: [snuffleupagus][error] There is an issue with the parsing of '"cos,sin': it doesn't look like a valid string on line 1 in Unknown on line 0 \ No newline at end of file | ||
diff --git a/src/tests/broken_conf_expecting_bool.phpt b/src/tests/broken_conf_expecting_bool.phpt index a6aceb2..261ce6e 100644 --- a/src/tests/broken_conf_expecting_bool.phpt +++ b/src/tests/broken_conf_expecting_bool.phpt | |||
| @@ -6,4 +6,6 @@ Bad boolean value in configuration | |||
| 6 | sp.configuration_file={PWD}/config/broken_conf_expecting_bool.ini | 6 | sp.configuration_file={PWD}/config/broken_conf_expecting_bool.ini |
| 7 | --FILE-- | 7 | --FILE-- |
| 8 | --EXPECT-- | 8 | --EXPECT-- |
| 9 | [snuffleupagus][0.0.0.0][config][error] Trailing chars '337);' at the end of '.enable(1337);' on line 5. | 9 | PHP Fatal error: [snuffleupagus][config] Trailing chars '337);' at the end of '.enable(1337);' on line 5 in Unknown on line 0 |
| 10 | |||
| 11 | Fatal error: [snuffleupagus][config] Trailing chars '337);' at the end of '.enable(1337);' on line 5 in Unknown on line 0 \ No newline at end of file | ||
diff --git a/src/tests/broken_conf_invalid_cidr.phpt b/src/tests/broken_conf_invalid_cidr.phpt index 515091b..ccf4026 100644 --- a/src/tests/broken_conf_invalid_cidr.phpt +++ b/src/tests/broken_conf_invalid_cidr.phpt | |||
| @@ -6,4 +6,6 @@ Broken configuration | |||
| 6 | sp.configuration_file={PWD}/config/broken_conf_invalid_cidr.ini | 6 | sp.configuration_file={PWD}/config/broken_conf_invalid_cidr.ini |
| 7 | --FILE-- | 7 | --FILE-- |
| 8 | --EXPECT-- | 8 | --EXPECT-- |
| 9 | [snuffleupagus][0.0.0.0][config][error] '42' isn't a valid ipv4 mask. | 9 | PHP Fatal error: [snuffleupagus][config] '42' isn't a valid ipv4 mask. in Unknown on line 0 |
| 10 | |||
| 11 | Fatal error: [snuffleupagus][config] '42' isn't a valid ipv4 mask. in Unknown on line 0 \ No newline at end of file | ||
diff --git a/src/tests/broken_conf_invalid_cidr6.phpt b/src/tests/broken_conf_invalid_cidr6.phpt index d20cfcd..802f9f2 100644 --- a/src/tests/broken_conf_invalid_cidr6.phpt +++ b/src/tests/broken_conf_invalid_cidr6.phpt | |||
| @@ -6,4 +6,6 @@ Broken configuration | |||
| 6 | sp.configuration_file={PWD}/config/broken_conf_invalid_cidr6.ini | 6 | sp.configuration_file={PWD}/config/broken_conf_invalid_cidr6.ini |
| 7 | --FILE-- | 7 | --FILE-- |
| 8 | --EXPECT-- | 8 | --EXPECT-- |
| 9 | [snuffleupagus][0.0.0.0][config][error] 'ZZZ' isn't a valid network mask. | 9 | PHP Fatal error: [snuffleupagus][config] 'ZZZ' isn't a valid network mask. in Unknown on line 0 |
| 10 | |||
| 11 | Fatal error: [snuffleupagus][config] 'ZZZ' isn't a valid network mask. in Unknown on line 0 \ No newline at end of file | ||
diff --git a/src/tests/broken_conf_invalid_cidr6_no_slash.phpt b/src/tests/broken_conf_invalid_cidr6_no_slash.phpt index de70a05..02e5201 100644 --- a/src/tests/broken_conf_invalid_cidr6_no_slash.phpt +++ b/src/tests/broken_conf_invalid_cidr6_no_slash.phpt | |||
| @@ -6,4 +6,6 @@ Broken configuration, invalid cidr for ipv6 because there is no `/` in it | |||
| 6 | sp.configuration_file={PWD}/config/broken_conf_invalid_cidr6_no_slash.ini | 6 | sp.configuration_file={PWD}/config/broken_conf_invalid_cidr6_no_slash.ini |
| 7 | --FILE-- | 7 | --FILE-- |
| 8 | --EXPECT-- | 8 | --EXPECT-- |
| 9 | [snuffleupagus][0.0.0.0][config][error] '2001:0db8:0000:0000:0000:ff00:0042:8329' isn't a valid network mask, it seems that you forgot a '/'. | 9 | PHP Fatal error: [snuffleupagus][config] '2001:0db8:0000:0000:0000:ff00:0042:8329' isn't a valid network mask, it seems that you forgot a '/'. in Unknown on line 0 |
| 10 | |||
| 11 | Fatal error: [snuffleupagus][config] '2001:0db8:0000:0000:0000:ff00:0042:8329' isn't a valid network mask, it seems that you forgot a '/'. in Unknown on line 0 \ No newline at end of file | ||
diff --git a/src/tests/broken_conf_invalid_cidr_value.phpt b/src/tests/broken_conf_invalid_cidr_value.phpt index a63df28..c966656 100644 --- a/src/tests/broken_conf_invalid_cidr_value.phpt +++ b/src/tests/broken_conf_invalid_cidr_value.phpt | |||
| @@ -7,5 +7,9 @@ Broken configuration, invalid cidr value | |||
| 7 | sp.configuration_file={PWD}/config/broken_conf_invalid_cidr_value.ini | 7 | sp.configuration_file={PWD}/config/broken_conf_invalid_cidr_value.ini |
| 8 | --FILE-- | 8 | --FILE-- |
| 9 | --EXPECT-- | 9 | --EXPECT-- |
| 10 | [snuffleupagus][0.0.0.0][error][error] A valid string as parameter is expected on line 1. | 10 | PHP Fatal error: [snuffleupagus][error] A valid string as parameter is expected on line 1 in Unknown on line 0 |
| 11 | [snuffleupagus][0.0.0.0][config][error] " doesn't contain a valid cidr on line 1. \ No newline at end of file | 11 | PHP Fatal error: [snuffleupagus][config] " doesn't contain a valid cidr on line 1 in Unknown on line 0 |
| 12 | |||
| 13 | Fatal error: [snuffleupagus][error] A valid string as parameter is expected on line 1 in Unknown on line 0 | ||
| 14 | |||
| 15 | Fatal error: [snuffleupagus][config] " doesn't contain a valid cidr on line 1 in Unknown on line 0 \ No newline at end of file | ||
diff --git a/src/tests/broken_conf_invalid_filename.phpt b/src/tests/broken_conf_invalid_filename.phpt index a1515a7..f02db98 100644 --- a/src/tests/broken_conf_invalid_filename.phpt +++ b/src/tests/broken_conf_invalid_filename.phpt | |||
| @@ -6,4 +6,6 @@ Broken configuration filename without absolute path | |||
| 6 | sp.configuration_file={PWD}/config/broken_conf_invalid_filename.ini | 6 | sp.configuration_file={PWD}/config/broken_conf_invalid_filename.ini |
| 7 | --FILE-- | 7 | --FILE-- |
| 8 | --EXPECTF-- | 8 | --EXPECTF-- |
| 9 | [snuffleupagus][0.0.0.0][config][error] Invalid configuration line: 'sp.disabled_functions.function("sprintf").filename("wrong file name").drop();':'.filename' must be an absolute path or a phar archive on line 1. | 9 | PHP Fatal error: [snuffleupagus][config] Invalid configuration line: 'sp.disabled_functions.function("sprintf").filename("wrong file name").drop();':'.filename' must be an absolute path or a phar archive on line 1 in Unknown on line 0 |
| 10 | |||
| 11 | Fatal error: [snuffleupagus][config] Invalid configuration line: 'sp.disabled_functions.function("sprintf").filename("wrong file name").drop();':'.filename' must be an absolute path or a phar archive on line 1 in Unknown on line 0 \ No newline at end of file | ||
diff --git a/src/tests/broken_conf_invalid_type.phpt b/src/tests/broken_conf_invalid_type.phpt index 246492f..6bb6f50 100644 --- a/src/tests/broken_conf_invalid_type.phpt +++ b/src/tests/broken_conf_invalid_type.phpt | |||
| @@ -6,4 +6,6 @@ Broken conf with wrong type | |||
| 6 | sp.configuration_file={PWD}/config/broken_conf_invalid_type.ini | 6 | sp.configuration_file={PWD}/config/broken_conf_invalid_type.ini |
| 7 | --FILE-- | 7 | --FILE-- |
| 8 | --EXPECTF-- | 8 | --EXPECTF-- |
| 9 | [snuffleupagus][0.0.0.0][error][error] There is an issue with the parsing of '"totally_wrong"_type")': it doesn't look like a valid string on line 1. | 9 | PHP Fatal error: [snuffleupagus][error] There is an issue with the parsing of '"totally_wrong"_type")': it doesn't look like a valid string on line 1 in Unknown on line 0 |
| 10 | |||
| 11 | Fatal error: [snuffleupagus][error] There is an issue with the parsing of '"totally_wrong"_type")': it doesn't look like a valid string on line 1 in Unknown on line 0 \ No newline at end of file | ||
diff --git a/src/tests/broken_conf_key_value.phpt b/src/tests/broken_conf_key_value.phpt index e9ee4a9..50dbb2b 100644 --- a/src/tests/broken_conf_key_value.phpt +++ b/src/tests/broken_conf_key_value.phpt | |||
| @@ -6,4 +6,6 @@ Broken configuration | |||
| 6 | sp.configuration_file={PWD}/config/broken_conf_key_value.ini | 6 | sp.configuration_file={PWD}/config/broken_conf_key_value.ini |
| 7 | --FILE-- | 7 | --FILE-- |
| 8 | --EXPECT-- | 8 | --EXPECT-- |
| 9 | [snuffleupagus][0.0.0.0][config][error] Invalid configuration line: 'sp.disabled_functions.function("system").var("").value("").key("").drop();':`key` and `value` are mutually exclusive on line 1. | 9 | PHP Fatal error: [snuffleupagus][config] Invalid configuration line: 'sp.disabled_functions.function("system").var("").value("").key("").drop();':`key` and `value` are mutually exclusive on line 1 in Unknown on line 0 |
| 10 | |||
| 11 | Fatal error: [snuffleupagus][config] Invalid configuration line: 'sp.disabled_functions.function("system").var("").value("").key("").drop();':`key` and `value` are mutually exclusive on line 1 in Unknown on line 0 \ No newline at end of file | ||
diff --git a/src/tests/broken_conf_line_empty_string.phpt b/src/tests/broken_conf_line_empty_string.phpt index 44f8d5e..9bc20c7 100644 --- a/src/tests/broken_conf_line_empty_string.phpt +++ b/src/tests/broken_conf_line_empty_string.phpt | |||
| @@ -6,4 +6,6 @@ Configuration line with an empty string | |||
| 6 | sp.configuration_file={PWD}/config/broken_conf_line_empty_string.ini | 6 | sp.configuration_file={PWD}/config/broken_conf_line_empty_string.ini |
| 7 | --FILE-- | 7 | --FILE-- |
| 8 | --EXPECT-- | 8 | --EXPECT-- |
| 9 | [snuffleupagus][0.0.0.0][error][error] A valid string as parameter is expected on line 1. | 9 | PHP Fatal error: [snuffleupagus][error] A valid string as parameter is expected on line 1 in Unknown on line 0 |
| 10 | |||
| 11 | Fatal error: [snuffleupagus][error] A valid string as parameter is expected on line 1 in Unknown on line 0 \ No newline at end of file | ||
diff --git a/src/tests/broken_conf_line_no_closing.phpt b/src/tests/broken_conf_line_no_closing.phpt index 13e3aa1..999c655 100644 --- a/src/tests/broken_conf_line_no_closing.phpt +++ b/src/tests/broken_conf_line_no_closing.phpt | |||
| @@ -6,4 +6,6 @@ Configuration line without closing parenthese | |||
| 6 | sp.configuration_file={PWD}/config/broken_conf_line_no_closing.ini | 6 | sp.configuration_file={PWD}/config/broken_conf_line_no_closing.ini |
| 7 | --FILE-- | 7 | --FILE-- |
| 8 | --EXPECT-- | 8 | --EXPECT-- |
| 9 | [snuffleupagus][0.0.0.0][error][error] There is an issue with the parsing of '"123"': it doesn't look like a valid string on line 1. | 9 | PHP Fatal error: [snuffleupagus][error] There is an issue with the parsing of '"123"': it doesn't look like a valid string on line 1 in Unknown on line 0 |
| 10 | |||
| 11 | Fatal error: [snuffleupagus][error] There is an issue with the parsing of '"123"': it doesn't look like a valid string on line 1 in Unknown on line 0 \ No newline at end of file | ||
diff --git a/src/tests/broken_conf_local_var_1.phpt b/src/tests/broken_conf_local_var_1.phpt index a91d275..9a22eb9 100644 --- a/src/tests/broken_conf_local_var_1.phpt +++ b/src/tests/broken_conf_local_var_1.phpt | |||
| @@ -6,5 +6,9 @@ Broken configuration | |||
| 6 | sp.configuration_file={PWD}/config/broken_conf_local_var_1.ini | 6 | sp.configuration_file={PWD}/config/broken_conf_local_var_1.ini |
| 7 | --FILE-- | 7 | --FILE-- |
| 8 | --EXPECT-- | 8 | --EXPECT-- |
| 9 | [snuffleupagus][0.0.0.0][config][error] Invalid `]` position. | 9 | PHP Fatal error: [snuffleupagus][config] Invalid `]` position. in Unknown on line 0 |
| 10 | [snuffleupagus][0.0.0.0][config][error] Invalid value ']' for `var` on line 1. | 10 | PHP Fatal error: [snuffleupagus][config] Invalid value ']' for `var` on line 1 in Unknown on line 0 |
| 11 | |||
| 12 | Fatal error: [snuffleupagus][config] Invalid `]` position. in Unknown on line 0 | ||
| 13 | |||
| 14 | Fatal error: [snuffleupagus][config] Invalid value ']' for `var` on line 1 in Unknown on line 0 \ No newline at end of file | ||
diff --git a/src/tests/broken_conf_local_var_10.phpt b/src/tests/broken_conf_local_var_10.phpt index 8a7d9b9..9efea61 100644 --- a/src/tests/broken_conf_local_var_10.phpt +++ b/src/tests/broken_conf_local_var_10.phpt | |||
| @@ -6,5 +6,9 @@ Broken configuration | |||
| 6 | sp.configuration_file={PWD}/config/broken_conf_local_var_10.ini | 6 | sp.configuration_file={PWD}/config/broken_conf_local_var_10.ini |
| 7 | --FILE-- | 7 | --FILE-- |
| 8 | --EXPECT-- | 8 | --EXPECT-- |
| 9 | [snuffleupagus][0.0.0.0][config][error] Invalid `]` position. | 9 | PHP Fatal error: [snuffleupagus][config] Invalid `]` position. in Unknown on line 0 |
| 10 | [snuffleupagus][0.0.0.0][config][error] Invalid value 'asd[asd]asd' for `var` on line 1. | 10 | PHP Fatal error: [snuffleupagus][config] Invalid value 'asd[asd]asd' for `var` on line 1 in Unknown on line 0 |
| 11 | |||
| 12 | Fatal error: [snuffleupagus][config] Invalid `]` position. in Unknown on line 0 | ||
| 13 | |||
| 14 | Fatal error: [snuffleupagus][config] Invalid value 'asd[asd]asd' for `var` on line 1 in Unknown on line 0 \ No newline at end of file | ||
diff --git a/src/tests/broken_conf_local_var_11.phpt b/src/tests/broken_conf_local_var_11.phpt index 1817a3f..4d8aa8b 100644 --- a/src/tests/broken_conf_local_var_11.phpt +++ b/src/tests/broken_conf_local_var_11.phpt | |||
| @@ -6,5 +6,9 @@ Broken configuration | |||
| 6 | sp.configuration_file={PWD}/config/broken_conf_local_var_11.ini | 6 | sp.configuration_file={PWD}/config/broken_conf_local_var_11.ini |
| 7 | --FILE-- | 7 | --FILE-- |
| 8 | --EXPECT-- | 8 | --EXPECT-- |
| 9 | [snuffleupagus][0.0.0.0][config][error] Invalid `::` position. | 9 | PHP Fatal error: [snuffleupagus][config] Invalid `::` position. in Unknown on line 0 |
| 10 | [snuffleupagus][0.0.0.0][config][error] Invalid value 'asd::' for `param` on line 1. | 10 | PHP Fatal error: [snuffleupagus][config] Invalid value 'asd::' for `param` on line 1 in Unknown on line 0 |
| 11 | |||
| 12 | Fatal error: [snuffleupagus][config] Invalid `::` position. in Unknown on line 0 | ||
| 13 | |||
| 14 | Fatal error: [snuffleupagus][config] Invalid value 'asd::' for `param` on line 1 in Unknown on line 0 \ No newline at end of file | ||
diff --git a/src/tests/broken_conf_local_var_12.phpt b/src/tests/broken_conf_local_var_12.phpt index 0b52e2a..b893740 100644 --- a/src/tests/broken_conf_local_var_12.phpt +++ b/src/tests/broken_conf_local_var_12.phpt | |||
| @@ -6,4 +6,6 @@ Broken configuration | |||
| 6 | sp.configuration_file={PWD}/config/broken_conf_local_var_12.ini | 6 | sp.configuration_file={PWD}/config/broken_conf_local_var_12.ini |
| 7 | --FILE-- | 7 | --FILE-- |
| 8 | --EXPECT-- | 8 | --EXPECT-- |
| 9 | [snuffleupagus][0.0.0.0][config][error] Empty value in `var` on line 1. | 9 | PHP Fatal error: [snuffleupagus][config] Empty value in `var` on line 1 in Unknown on line 0 |
| 10 | |||
| 11 | Fatal error: [snuffleupagus][config] Empty value in `var` on line 1 in Unknown on line 0 \ No newline at end of file | ||
diff --git a/src/tests/broken_conf_local_var_13.phpt b/src/tests/broken_conf_local_var_13.phpt index ca6be6d..5a1f431 100644 --- a/src/tests/broken_conf_local_var_13.phpt +++ b/src/tests/broken_conf_local_var_13.phpt | |||
| @@ -6,5 +6,9 @@ Broken configuration | |||
| 6 | sp.configuration_file={PWD}/config/broken_conf_local_var_13.ini | 6 | sp.configuration_file={PWD}/config/broken_conf_local_var_13.ini |
| 7 | --FILE-- | 7 | --FILE-- |
| 8 | --EXPECT-- | 8 | --EXPECT-- |
| 9 | [snuffleupagus][0.0.0.0][config][error] Invalid `->` position. | 9 | PHP Fatal error: [snuffleupagus][config] Invalid `->` position. in Unknown on line 0 |
| 10 | [snuffleupagus][0.0.0.0][config][error] Invalid value 'asd->asd' for `var` on line 1. | 10 | PHP Fatal error: [snuffleupagus][config] Invalid value 'asd->asd' for `var` on line 1 in Unknown on line 0 |
| 11 | |||
| 12 | Fatal error: [snuffleupagus][config] Invalid `->` position. in Unknown on line 0 | ||
| 13 | |||
| 14 | Fatal error: [snuffleupagus][config] Invalid value 'asd->asd' for `var` on line 1 in Unknown on line 0 \ No newline at end of file | ||
diff --git a/src/tests/broken_conf_local_var_14.phpt b/src/tests/broken_conf_local_var_14.phpt index cb7e455..330c603 100644 --- a/src/tests/broken_conf_local_var_14.phpt +++ b/src/tests/broken_conf_local_var_14.phpt | |||
| @@ -6,5 +6,9 @@ Broken configuration | |||
| 6 | sp.configuration_file={PWD}/config/broken_conf_local_var_14.ini | 6 | sp.configuration_file={PWD}/config/broken_conf_local_var_14.ini |
| 7 | --FILE-- | 7 | --FILE-- |
| 8 | --EXPECT-- | 8 | --EXPECT-- |
| 9 | [snuffleupagus][0.0.0.0][config][error] Invalid var name: $i+valid var name . | 9 | PHP Fatal error: [snuffleupagus][config] Invalid var name: $i+valid var name . in Unknown on line 0 |
| 10 | [snuffleupagus][0.0.0.0][config][error] Invalid value '$i+valid var name ' for `var` on line 1. | 10 | PHP Fatal error: [snuffleupagus][config] Invalid value '$i+valid var name ' for `var` on line 1 in Unknown on line 0 |
| 11 | |||
| 12 | Fatal error: [snuffleupagus][config] Invalid var name: $i+valid var name . in Unknown on line 0 | ||
| 13 | |||
| 14 | Fatal error: [snuffleupagus][config] Invalid value '$i+valid var name ' for `var` on line 1 in Unknown on line 0 \ No newline at end of file | ||
diff --git a/src/tests/broken_conf_local_var_15.phpt b/src/tests/broken_conf_local_var_15.phpt index 456d6e8..fd4319c 100644 --- a/src/tests/broken_conf_local_var_15.phpt +++ b/src/tests/broken_conf_local_var_15.phpt | |||
| @@ -6,5 +6,9 @@ Broken configuration | |||
| 6 | sp.configuration_file={PWD}/config/broken_conf_local_var_15.ini | 6 | sp.configuration_file={PWD}/config/broken_conf_local_var_15.ini |
| 7 | --FILE-- | 7 | --FILE-- |
| 8 | --EXPECT-- | 8 | --EXPECT-- |
| 9 | [snuffleupagus][0.0.0.0][config][error] Invalid var name: $i$$!@#. | 9 | PHP Fatal error: [snuffleupagus][config] Invalid var name: $i$$!@#. in Unknown on line 0 |
| 10 | [snuffleupagus][0.0.0.0][config][error] Invalid value '$i$$!@#->qwe' for `var` on line 1. | 10 | PHP Fatal error: [snuffleupagus][config] Invalid value '$i$$!@#->qwe' for `var` on line 1 in Unknown on line 0 |
| 11 | |||
| 12 | Fatal error: [snuffleupagus][config] Invalid var name: $i$$!@#. in Unknown on line 0 | ||
| 13 | |||
| 14 | Fatal error: [snuffleupagus][config] Invalid value '$i$$!@#->qwe' for `var` on line 1 in Unknown on line 0 \ No newline at end of file | ||
diff --git a/src/tests/broken_conf_local_var_16.phpt b/src/tests/broken_conf_local_var_16.phpt index 84b29bf..e27caab 100644 --- a/src/tests/broken_conf_local_var_16.phpt +++ b/src/tests/broken_conf_local_var_16.phpt | |||
| @@ -6,5 +6,9 @@ Broken configuration | |||
| 6 | sp.configuration_file={PWD}/config/broken_conf_local_var_16.ini | 6 | sp.configuration_file={PWD}/config/broken_conf_local_var_16.ini |
| 7 | --FILE-- | 7 | --FILE-- |
| 8 | --EXPECT-- | 8 | --EXPECT-- |
| 9 | [snuffleupagus][0.0.0.0][config][error] Missing a closing quote. | 9 | PHP Fatal error: [snuffleupagus][config] Missing a closing quote. in Unknown on line 0 |
| 10 | [snuffleupagus][0.0.0.0][config][error] Invalid value '"' for `var` on line 1. | 10 | PHP Fatal error: [snuffleupagus][config] Invalid value '"' for `var` on line 1 in Unknown on line 0 |
| 11 | |||
| 12 | Fatal error: [snuffleupagus][config] Missing a closing quote. in Unknown on line 0 | ||
| 13 | |||
| 14 | Fatal error: [snuffleupagus][config] Invalid value '"' for `var` on line 1 in Unknown on line 0 \ No newline at end of file | ||
diff --git a/src/tests/broken_conf_local_var_2.phpt b/src/tests/broken_conf_local_var_2.phpt index b67a492..aa458b3 100644 --- a/src/tests/broken_conf_local_var_2.phpt +++ b/src/tests/broken_conf_local_var_2.phpt | |||
| @@ -6,5 +6,9 @@ Broken configuration | |||
| 6 | sp.configuration_file={PWD}/config/broken_conf_local_var_2.ini | 6 | sp.configuration_file={PWD}/config/broken_conf_local_var_2.ini |
| 7 | --FILE-- | 7 | --FILE-- |
| 8 | --EXPECT-- | 8 | --EXPECT-- |
| 9 | [snuffleupagus][0.0.0.0][config][error] Invalid `"` position. | 9 | PHP Fatal error: [snuffleupagus][config] Invalid `"` position. in Unknown on line 0 |
| 10 | [snuffleupagus][0.0.0.0][config][error] Invalid value '""asd' for `var` on line 1. | 10 | PHP Fatal error: [snuffleupagus][config] Invalid value '""asd' for `var` on line 1 in Unknown on line 0 |
| 11 | |||
| 12 | Fatal error: [snuffleupagus][config] Invalid `"` position. in Unknown on line 0 | ||
| 13 | |||
| 14 | Fatal error: [snuffleupagus][config] Invalid value '""asd' for `var` on line 1 in Unknown on line 0 \ No newline at end of file | ||
diff --git a/src/tests/broken_conf_local_var_3.phpt b/src/tests/broken_conf_local_var_3.phpt index 639d2ea..fb365c9 100644 --- a/src/tests/broken_conf_local_var_3.phpt +++ b/src/tests/broken_conf_local_var_3.phpt | |||
| @@ -6,5 +6,9 @@ Broken configuration | |||
| 6 | sp.configuration_file={PWD}/config/broken_conf_local_var_3.ini | 6 | sp.configuration_file={PWD}/config/broken_conf_local_var_3.ini |
| 7 | --FILE-- | 7 | --FILE-- |
| 8 | --EXPECT-- | 8 | --EXPECT-- |
| 9 | [snuffleupagus][0.0.0.0][config][error] Invalid `->` position. | 9 | PHP Fatal error: [snuffleupagus][config] Invalid `->` position. in Unknown on line 0 |
| 10 | [snuffleupagus][0.0.0.0][config][error] Invalid value '$qwe->::' for `var` on line 1. | 10 | PHP Fatal error: [snuffleupagus][config] Invalid value '$qwe->::' for `var` on line 1 in Unknown on line 0 |
| 11 | |||
| 12 | Fatal error: [snuffleupagus][config] Invalid `->` position. in Unknown on line 0 | ||
| 13 | |||
| 14 | Fatal error: [snuffleupagus][config] Invalid value '$qwe->::' for `var` on line 1 in Unknown on line 0 \ No newline at end of file | ||
diff --git a/src/tests/broken_conf_local_var_4.phpt b/src/tests/broken_conf_local_var_4.phpt index e50f9a6..b8ec75e 100644 --- a/src/tests/broken_conf_local_var_4.phpt +++ b/src/tests/broken_conf_local_var_4.phpt | |||
| @@ -6,5 +6,9 @@ Broken configuration | |||
| 6 | sp.configuration_file={PWD}/config/broken_conf_local_var_4.ini | 6 | sp.configuration_file={PWD}/config/broken_conf_local_var_4.ini |
| 7 | --FILE-- | 7 | --FILE-- |
| 8 | --EXPECT-- | 8 | --EXPECT-- |
| 9 | [snuffleupagus][0.0.0.0][config][error] Invalid `"` position. | 9 | PHP Fatal error: [snuffleupagus][config] Invalid `"` position. in Unknown on line 0 |
| 10 | [snuffleupagus][0.0.0.0][config][error] Invalid value '"asd"asd[]' for `var` on line 1. | 10 | PHP Fatal error: [snuffleupagus][config] Invalid value '"asd"asd[]' for `var` on line 1 in Unknown on line 0 |
| 11 | |||
| 12 | Fatal error: [snuffleupagus][config] Invalid `"` position. in Unknown on line 0 | ||
| 13 | |||
| 14 | Fatal error: [snuffleupagus][config] Invalid value '"asd"asd[]' for `var` on line 1 in Unknown on line 0 \ No newline at end of file | ||
diff --git a/src/tests/broken_conf_local_var_5.phpt b/src/tests/broken_conf_local_var_5.phpt index 0c0d59a..65daf25 100644 --- a/src/tests/broken_conf_local_var_5.phpt +++ b/src/tests/broken_conf_local_var_5.phpt | |||
| @@ -6,5 +6,9 @@ Broken configuration | |||
| 6 | sp.configuration_file={PWD}/config/broken_conf_local_var_5.ini | 6 | sp.configuration_file={PWD}/config/broken_conf_local_var_5.ini |
| 7 | --FILE-- | 7 | --FILE-- |
| 8 | --EXPECT-- | 8 | --EXPECT-- |
| 9 | [snuffleupagus][0.0.0.0][config][error] Invalid `'` position. | 9 | PHP Fatal error: [snuffleupagus][config] Invalid `'` position. in Unknown on line 0 |
| 10 | [snuffleupagus][0.0.0.0][config][error] Invalid value ''asd'asd[]' for `var` on line 1. | 10 | PHP Fatal error: [snuffleupagus][config] Invalid value ''asd'asd[]' for `var` on line 1 in Unknown on line 0 |
| 11 | |||
| 12 | Fatal error: [snuffleupagus][config] Invalid `'` position. in Unknown on line 0 | ||
| 13 | |||
| 14 | Fatal error: [snuffleupagus][config] Invalid value ''asd'asd[]' for `var` on line 1 in Unknown on line 0 \ No newline at end of file | ||
diff --git a/src/tests/broken_conf_local_var_6.phpt b/src/tests/broken_conf_local_var_6.phpt index c51de24..0e21d6b 100644 --- a/src/tests/broken_conf_local_var_6.phpt +++ b/src/tests/broken_conf_local_var_6.phpt | |||
| @@ -6,5 +6,9 @@ Broken configuration | |||
| 6 | sp.configuration_file={PWD}/config/broken_conf_local_var_6.ini | 6 | sp.configuration_file={PWD}/config/broken_conf_local_var_6.ini |
| 7 | --FILE-- | 7 | --FILE-- |
| 8 | --EXPECT-- | 8 | --EXPECT-- |
| 9 | [snuffleupagus][0.0.0.0][config][error] Invalid `'` position. | 9 | PHP Fatal error: [snuffleupagus][config] Invalid `'` position. in Unknown on line 0 |
| 10 | [snuffleupagus][0.0.0.0][config][error] Invalid value '''asd' for `var` on line 1. | 10 | PHP Fatal error: [snuffleupagus][config] Invalid value '''asd' for `var` on line 1 in Unknown on line 0 |
| 11 | |||
| 12 | Fatal error: [snuffleupagus][config] Invalid `'` position. in Unknown on line 0 | ||
| 13 | |||
| 14 | Fatal error: [snuffleupagus][config] Invalid value '''asd' for `var` on line 1 in Unknown on line 0 \ No newline at end of file | ||
diff --git a/src/tests/broken_conf_local_var_7.phpt b/src/tests/broken_conf_local_var_7.phpt index d3a0fa4..596764c 100644 --- a/src/tests/broken_conf_local_var_7.phpt +++ b/src/tests/broken_conf_local_var_7.phpt | |||
| @@ -6,5 +6,9 @@ Broken configuration | |||
| 6 | sp.configuration_file={PWD}/config/broken_conf_local_var_7.ini | 6 | sp.configuration_file={PWD}/config/broken_conf_local_var_7.ini |
| 7 | --FILE-- | 7 | --FILE-- |
| 8 | --EXPECT-- | 8 | --EXPECT-- |
| 9 | [snuffleupagus][0.0.0.0][config][error] Invalid `->` position. | 9 | PHP Fatal error: [snuffleupagus][config] Invalid `->` position. in Unknown on line 0 |
| 10 | [snuffleupagus][0.0.0.0][config][error] Invalid value 'asd-->' for `var` on line 1. | 10 | PHP Fatal error: [snuffleupagus][config] Invalid value 'asd-->' for `var` on line 1 in Unknown on line 0 |
| 11 | |||
| 12 | Fatal error: [snuffleupagus][config] Invalid `->` position. in Unknown on line 0 | ||
| 13 | |||
| 14 | Fatal error: [snuffleupagus][config] Invalid value 'asd-->' for `var` on line 1 in Unknown on line 0 \ No newline at end of file | ||
diff --git a/src/tests/broken_conf_local_var_8.phpt b/src/tests/broken_conf_local_var_8.phpt index 749a1aa..00069ec 100644 --- a/src/tests/broken_conf_local_var_8.phpt +++ b/src/tests/broken_conf_local_var_8.phpt | |||
| @@ -6,5 +6,9 @@ Broken configuration | |||
| 6 | sp.configuration_file={PWD}/config/broken_conf_local_var_8.ini | 6 | sp.configuration_file={PWD}/config/broken_conf_local_var_8.ini |
| 7 | --FILE-- | 7 | --FILE-- |
| 8 | --EXPECT-- | 8 | --EXPECT-- |
| 9 | [snuffleupagus][0.0.0.0][config][error] Invalid `]` position. | 9 | PHP Fatal error: [snuffleupagus][config] Invalid `]` position. in Unknown on line 0 |
| 10 | [snuffleupagus][0.0.0.0][config][error] Invalid value 'asd[asd]"asd"' for `var` on line 1. | 10 | PHP Fatal error: [snuffleupagus][config] Invalid value 'asd[asd]"asd"' for `var` on line 1 in Unknown on line 0 |
| 11 | |||
| 12 | Fatal error: [snuffleupagus][config] Invalid `]` position. in Unknown on line 0 | ||
| 13 | |||
| 14 | Fatal error: [snuffleupagus][config] Invalid value 'asd[asd]"asd"' for `var` on line 1 in Unknown on line 0 \ No newline at end of file | ||
diff --git a/src/tests/broken_conf_local_var_9.phpt b/src/tests/broken_conf_local_var_9.phpt index 6f706db..7536e30 100644 --- a/src/tests/broken_conf_local_var_9.phpt +++ b/src/tests/broken_conf_local_var_9.phpt | |||
| @@ -6,5 +6,9 @@ Broken configuration | |||
| 6 | sp.configuration_file={PWD}/config/broken_conf_local_var_9.ini | 6 | sp.configuration_file={PWD}/config/broken_conf_local_var_9.ini |
| 7 | --FILE-- | 7 | --FILE-- |
| 8 | --EXPECT-- | 8 | --EXPECT-- |
| 9 | [snuffleupagus][0.0.0.0][config][error] Invalid `]` position. | 9 | PHP Fatal error: [snuffleupagus][config] Invalid `]` position. in Unknown on line 0 |
| 10 | [snuffleupagus][0.0.0.0][config][error] Invalid value 'asd[asd]'asd'' for `var` on line 1. | 10 | PHP Fatal error: [snuffleupagus][config] Invalid value 'asd[asd]'asd'' for `var` on line 1 in Unknown on line 0 |
| 11 | |||
| 12 | Fatal error: [snuffleupagus][config] Invalid `]` position. in Unknown on line 0 | ||
| 13 | |||
| 14 | Fatal error: [snuffleupagus][config] Invalid value 'asd[asd]'asd'' for `var` on line 1 in Unknown on line 0 \ No newline at end of file | ||
diff --git a/src/tests/broken_conf_lots_of_quotes.phpt b/src/tests/broken_conf_lots_of_quotes.phpt index bad4a35..e11d54b 100644 --- a/src/tests/broken_conf_lots_of_quotes.phpt +++ b/src/tests/broken_conf_lots_of_quotes.phpt | |||
| @@ -6,4 +6,6 @@ Configuration line with too many quotes | |||
| 6 | sp.configuration_file={PWD}/config/broken_conf_lots_of_quotes.ini | 6 | sp.configuration_file={PWD}/config/broken_conf_lots_of_quotes.ini |
| 7 | --FILE-- | 7 | --FILE-- |
| 8 | --EXPECT-- | 8 | --EXPECT-- |
| 9 | [snuffleupagus][0.0.0.0][error][error] There is an issue with the parsing of '"this\"is a weird\"\"\"cookie\"name"");': it doesn't look like a valid string on line 1. | 9 | PHP Fatal error: [snuffleupagus][error] There is an issue with the parsing of '"this\"is a weird\"\"\"cookie\"name"");': it doesn't look like a valid string on line 1 in Unknown on line 0 |
| 10 | |||
| 11 | Fatal error: [snuffleupagus][error] There is an issue with the parsing of '"this\"is a weird\"\"\"cookie\"name"");': it doesn't look like a valid string on line 1 in Unknown on line 0 \ No newline at end of file | ||
diff --git a/src/tests/broken_conf_missing_script.phpt b/src/tests/broken_conf_missing_script.phpt index 3922493..2166d3b 100644 --- a/src/tests/broken_conf_missing_script.phpt +++ b/src/tests/broken_conf_missing_script.phpt | |||
| @@ -8,5 +8,7 @@ sp.configuration_file={PWD}/config/broken_conf_missing_script.ini | |||
| 8 | echo 1; | 8 | echo 1; |
| 9 | ?> | 9 | ?> |
| 10 | --EXPECTF-- | 10 | --EXPECTF-- |
| 11 | [snuffleupagus][0.0.0.0][config][error] The `script` directive is mandatory in '.enable();' on line 1. | 11 | PHP Fatal error: [snuffleupagus][config] The `script` directive is mandatory in '.enable();' on line 1 in Unknown on line 0 |
| 12 | 1 | 12 | |
| 13 | Fatal error: [snuffleupagus][config] The `script` directive is mandatory in '.enable();' on line 1 in Unknown on line 0 | ||
| 14 | 1 \ No newline at end of file | ||
diff --git a/src/tests/broken_conf_mutually_exclusive.phpt b/src/tests/broken_conf_mutually_exclusive.phpt index 5897770..6cc9bd6 100644 --- a/src/tests/broken_conf_mutually_exclusive.phpt +++ b/src/tests/broken_conf_mutually_exclusive.phpt | |||
| @@ -6,4 +6,6 @@ Broken configuration | |||
| 6 | sp.configuration_file={PWD}/config/broken_conf_mutually_exclusive.ini | 6 | sp.configuration_file={PWD}/config/broken_conf_mutually_exclusive.ini |
| 7 | --FILE-- | 7 | --FILE-- |
| 8 | --EXPECT-- | 8 | --EXPECT-- |
| 9 | [snuffleupagus][0.0.0.0][config][error] Invalid configuration line: 'sp.disabled_functions.function("system").param("id").value("42").value_r("^id$").drop();': '.value' and '.regexp' are mutually exclusive on line 1. | 9 | PHP Fatal error: [snuffleupagus][config] Invalid configuration line: 'sp.disabled_functions.function("system").param("id").value("42").value_r("^id$").drop();': '.value' and '.regexp' are mutually exclusive on line 1 in Unknown on line 0 |
| 10 | |||
| 11 | Fatal error: [snuffleupagus][config] Invalid configuration line: 'sp.disabled_functions.function("system").param("id").value("42").value_r("^id$").drop();': '.value' and '.regexp' are mutually exclusive on line 1 in Unknown on line 0 \ No newline at end of file | ||
diff --git a/src/tests/broken_conf_mutually_exclusive10.phpt b/src/tests/broken_conf_mutually_exclusive10.phpt index 0e7903e..a9c15d7 100644 --- a/src/tests/broken_conf_mutually_exclusive10.phpt +++ b/src/tests/broken_conf_mutually_exclusive10.phpt | |||
| @@ -6,4 +6,6 @@ Broken configuration - enabled/disabled readonly | |||
| 6 | sp.configuration_file={PWD}/config/broken_conf_mutually_exclusive10.ini | 6 | sp.configuration_file={PWD}/config/broken_conf_mutually_exclusive10.ini |
| 7 | --FILE-- | 7 | --FILE-- |
| 8 | --EXPECT-- | 8 | --EXPECT-- |
| 9 | [snuffleupagus][0.0.0.0][config][error] A rule can't be enabled and disabled on line 1. | 9 | PHP Fatal error: [snuffleupagus][config] A rule can't be enabled and disabled on line 1 in Unknown on line 0 |
| 10 | |||
| 11 | Fatal error: [snuffleupagus][config] A rule can't be enabled and disabled on line 1 in Unknown on line 0 \ No newline at end of file | ||
diff --git a/src/tests/broken_conf_mutually_exclusive2.phpt b/src/tests/broken_conf_mutually_exclusive2.phpt index cfbf13a..570b917 100644 --- a/src/tests/broken_conf_mutually_exclusive2.phpt +++ b/src/tests/broken_conf_mutually_exclusive2.phpt | |||
| @@ -6,4 +6,6 @@ Broken configuration | |||
| 6 | sp.configuration_file={PWD}/config/broken_conf_mutually_exclusive2.ini | 6 | sp.configuration_file={PWD}/config/broken_conf_mutually_exclusive2.ini |
| 7 | --FILE-- | 7 | --FILE-- |
| 8 | --EXPECT-- | 8 | --EXPECT-- |
| 9 | [snuffleupagus][0.0.0.0][config][error] Invalid configuration line: 'sp.disabled_functions.function("system").function_r("system").param("id").value("42").drop();': '.r_function' and '.function' are mutually exclusive on line 1. \ No newline at end of file | 9 | PHP Fatal error: [snuffleupagus][config] Invalid configuration line: 'sp.disabled_functions.function("system").function_r("system").param("id").value("42").drop();': '.r_function' and '.function' are mutually exclusive on line 1 in Unknown on line 0 |
| 10 | |||
| 11 | Fatal error: [snuffleupagus][config] Invalid configuration line: 'sp.disabled_functions.function("system").function_r("system").param("id").value("42").drop();': '.r_function' and '.function' are mutually exclusive on line 1 in Unknown on line 0 \ No newline at end of file | ||
diff --git a/src/tests/broken_conf_mutually_exclusive3.phpt b/src/tests/broken_conf_mutually_exclusive3.phpt index 7b94318..e7387eb 100644 --- a/src/tests/broken_conf_mutually_exclusive3.phpt +++ b/src/tests/broken_conf_mutually_exclusive3.phpt | |||
| @@ -6,4 +6,6 @@ Broken configuration | |||
| 6 | sp.configuration_file={PWD}/config/broken_conf_mutually_exclusive3.ini | 6 | sp.configuration_file={PWD}/config/broken_conf_mutually_exclusive3.ini |
| 7 | --FILE-- | 7 | --FILE-- |
| 8 | --EXPECT-- | 8 | --EXPECT-- |
| 9 | [snuffleupagus][0.0.0.0][config][error] Invalid configuration line: 'sp.disabled_functions.function("system").param("id").value("42").filename_r("^id$").filename("pouet.txt").drop();': '.r_filename' and '.filename' are mutually exclusive on line 1. | 9 | PHP Fatal error: [snuffleupagus][config] Invalid configuration line: 'sp.disabled_functions.function("system").param("id").value("42").filename_r("^id$").filename("pouet.txt").drop();': '.r_filename' and '.filename' are mutually exclusive on line 1 in Unknown on line 0 |
| 10 | |||
| 11 | Fatal error: [snuffleupagus][config] Invalid configuration line: 'sp.disabled_functions.function("system").param("id").value("42").filename_r("^id$").filename("pouet.txt").drop();': '.r_filename' and '.filename' are mutually exclusive on line 1 in Unknown on line 0 \ No newline at end of file | ||
diff --git a/src/tests/broken_conf_mutually_exclusive4.phpt b/src/tests/broken_conf_mutually_exclusive4.phpt index a60f3fa..82b2dcc 100644 --- a/src/tests/broken_conf_mutually_exclusive4.phpt +++ b/src/tests/broken_conf_mutually_exclusive4.phpt | |||
| @@ -6,4 +6,6 @@ Broken configuration | |||
| 6 | sp.configuration_file={PWD}/config/broken_conf_mutually_exclusive4.ini | 6 | sp.configuration_file={PWD}/config/broken_conf_mutually_exclusive4.ini |
| 7 | --FILE-- | 7 | --FILE-- |
| 8 | --EXPECT-- | 8 | --EXPECT-- |
| 9 | [snuffleupagus][0.0.0.0][config][error] Invalid configuration line: 'sp.disabled_functions.function("system").param("id").value("42").param_r("^id$").drop();':'.r_param', '.param' and '.pos' are mutually exclusive on line 1. | 9 | PHP Fatal error: [snuffleupagus][config] Invalid configuration line: 'sp.disabled_functions.function("system").param("id").value("42").param_r("^id$").drop();':'.r_param', '.param' and '.pos' are mutually exclusive on line 1 in Unknown on line 0 |
| 10 | |||
| 11 | Fatal error: [snuffleupagus][config] Invalid configuration line: 'sp.disabled_functions.function("system").param("id").value("42").param_r("^id$").drop();':'.r_param', '.param' and '.pos' are mutually exclusive on line 1 in Unknown on line 0 \ No newline at end of file | ||
diff --git a/src/tests/broken_conf_mutually_exclusive5.phpt b/src/tests/broken_conf_mutually_exclusive5.phpt index 0a9e0fd..b23fba6 100644 --- a/src/tests/broken_conf_mutually_exclusive5.phpt +++ b/src/tests/broken_conf_mutually_exclusive5.phpt | |||
| @@ -6,4 +6,6 @@ Broken configuration | |||
| 6 | sp.configuration_file={PWD}/config/broken_conf_mutually_exclusive5.ini | 6 | sp.configuration_file={PWD}/config/broken_conf_mutually_exclusive5.ini |
| 7 | --FILE-- | 7 | --FILE-- |
| 8 | --EXPECT-- | 8 | --EXPECT-- |
| 9 | [snuffleupagus][0.0.0.0][config][error] Invalid configuration line: 'sp.disabled_functions.function("system").ret("0").drop().ret_r("^0$");': '.r_ret' and '.ret' are mutually exclusive on line 1. | 9 | PHP Fatal error: [snuffleupagus][config] Invalid configuration line: 'sp.disabled_functions.function("system").ret("0").drop().ret_r("^0$");': '.r_ret' and '.ret' are mutually exclusive on line 1 in Unknown on line 0 |
| 10 | |||
| 11 | Fatal error: [snuffleupagus][config] Invalid configuration line: 'sp.disabled_functions.function("system").ret("0").drop().ret_r("^0$");': '.r_ret' and '.ret' are mutually exclusive on line 1 in Unknown on line 0 \ No newline at end of file | ||
diff --git a/src/tests/broken_conf_mutually_exclusive6.phpt b/src/tests/broken_conf_mutually_exclusive6.phpt index 4c8cf72..7f6466c 100644 --- a/src/tests/broken_conf_mutually_exclusive6.phpt +++ b/src/tests/broken_conf_mutually_exclusive6.phpt | |||
| @@ -6,4 +6,6 @@ Broken configuration | |||
| 6 | sp.configuration_file={PWD}/config/broken_conf_mutually_exclusive6.ini | 6 | sp.configuration_file={PWD}/config/broken_conf_mutually_exclusive6.ini |
| 7 | --FILE-- | 7 | --FILE-- |
| 8 | --EXPECT-- | 8 | --EXPECT-- |
| 9 | [snuffleupagus][0.0.0.0][config][error] Invalid configuration line: 'sp.disabled_functions.function("system").param("id").value("42").ret_r("^0$").drop();':`ret` and `param` are mutually exclusive on line 1. \ No newline at end of file | 9 | PHP Fatal error: [snuffleupagus][config] Invalid configuration line: 'sp.disabled_functions.function("system").param("id").value("42").ret_r("^0$").drop();':`ret` and `param` are mutually exclusive on line 1 in Unknown on line 0 |
| 10 | |||
| 11 | Fatal error: [snuffleupagus][config] Invalid configuration line: 'sp.disabled_functions.function("system").param("id").value("42").ret_r("^0$").drop();':`ret` and `param` are mutually exclusive on line 1 in Unknown on line 0 \ No newline at end of file | ||
diff --git a/src/tests/broken_conf_mutually_exclusive7.phpt b/src/tests/broken_conf_mutually_exclusive7.phpt index d9507f6..1d65959 100644 --- a/src/tests/broken_conf_mutually_exclusive7.phpt +++ b/src/tests/broken_conf_mutually_exclusive7.phpt | |||
| @@ -6,4 +6,6 @@ Broken configuration | |||
| 6 | sp.configuration_file={PWD}/config/broken_conf_mutually_exclusive7.ini | 6 | sp.configuration_file={PWD}/config/broken_conf_mutually_exclusive7.ini |
| 7 | --FILE-- | 7 | --FILE-- |
| 8 | --EXPECT-- | 8 | --EXPECT-- |
| 9 | [snuffleupagus][0.0.0.0][config][error] Invalid configuration line: 'sp.disabled_functions.function("system").ret("0").drop().allow();': The rule must either be a `drop` or `allow` one on line 1. | 9 | PHP Fatal error: [snuffleupagus][config] Invalid configuration line: 'sp.disabled_functions.function("system").ret("0").drop().allow();': The rule must either be a `drop` or `allow` one on line 1 in Unknown on line 0 |
| 10 | |||
| 11 | Fatal error: [snuffleupagus][config] Invalid configuration line: 'sp.disabled_functions.function("system").ret("0").drop().allow();': The rule must either be a `drop` or `allow` one on line 1 in Unknown on line 0 \ No newline at end of file | ||
diff --git a/src/tests/broken_conf_mutually_exclusive8.phpt b/src/tests/broken_conf_mutually_exclusive8.phpt index f7bf341..6782460 100644 --- a/src/tests/broken_conf_mutually_exclusive8.phpt +++ b/src/tests/broken_conf_mutually_exclusive8.phpt | |||
| @@ -6,4 +6,6 @@ Broken configuration | |||
| 6 | sp.configuration_file={PWD}/config/broken_conf_mutually_exclusive8.ini | 6 | sp.configuration_file={PWD}/config/broken_conf_mutually_exclusive8.ini |
| 7 | --FILE-- | 7 | --FILE-- |
| 8 | --EXPECT-- | 8 | --EXPECT-- |
| 9 | [snuffleupagus][0.0.0.0][config][error] Invalid configuration line: 'sp.disabled_functions.ret("0").drop();': must take a function name on line 1. \ No newline at end of file | 9 | PHP Fatal error: [snuffleupagus][config] Invalid configuration line: 'sp.disabled_functions.ret("0").drop();': must take a function name on line 1 in Unknown on line 0 |
| 10 | |||
| 11 | Fatal error: [snuffleupagus][config] Invalid configuration line: 'sp.disabled_functions.ret("0").drop();': must take a function name on line 1 in Unknown on line 0 \ No newline at end of file | ||
diff --git a/src/tests/broken_conf_mutually_exclusive9.phpt b/src/tests/broken_conf_mutually_exclusive9.phpt index adf90ad..400852d 100644 --- a/src/tests/broken_conf_mutually_exclusive9.phpt +++ b/src/tests/broken_conf_mutually_exclusive9.phpt | |||
| @@ -6,4 +6,6 @@ Broken configuration - enabled/disabled unserialize | |||
| 6 | sp.configuration_file={PWD}/config/broken_conf_mutually_exclusive9.ini | 6 | sp.configuration_file={PWD}/config/broken_conf_mutually_exclusive9.ini |
| 7 | --FILE-- | 7 | --FILE-- |
| 8 | --EXPECT-- | 8 | --EXPECT-- |
| 9 | [snuffleupagus][0.0.0.0][config][error] A rule can't be enabled and disabled on line 1. | 9 | PHP Fatal error: [snuffleupagus][config] A rule can't be enabled and disabled on line 1 in Unknown on line 0 |
| 10 | |||
| 11 | Fatal error: [snuffleupagus][config] A rule can't be enabled and disabled on line 1 in Unknown on line 0 \ No newline at end of file | ||
diff --git a/src/tests/broken_conf_no_cookie_action.phpt b/src/tests/broken_conf_no_cookie_action.phpt index 49be31e..3085d9e 100644 --- a/src/tests/broken_conf_no_cookie_action.phpt +++ b/src/tests/broken_conf_no_cookie_action.phpt | |||
| @@ -6,4 +6,6 @@ Bad config, invalid action. | |||
| 6 | sp.configuration_file={PWD}/config/broken_conf_cookie_action.ini | 6 | sp.configuration_file={PWD}/config/broken_conf_cookie_action.ini |
| 7 | --FILE-- | 7 | --FILE-- |
| 8 | --EXPECT-- | 8 | --EXPECT-- |
| 9 | [snuffleupagus][0.0.0.0][config][error] You must specify a at least one action to a cookie on line 1. | 9 | PHP Fatal error: [snuffleupagus][config] You must specify a at least one action to a cookie on line 1 in Unknown on line 0 |
| 10 | |||
| 11 | Fatal error: [snuffleupagus][config] You must specify a at least one action to a cookie on line 1 in Unknown on line 0 \ No newline at end of file | ||
diff --git a/src/tests/broken_conf_no_cookie_name.phpt b/src/tests/broken_conf_no_cookie_name.phpt index 10fde3e..9154124 100644 --- a/src/tests/broken_conf_no_cookie_name.phpt +++ b/src/tests/broken_conf_no_cookie_name.phpt | |||
| @@ -6,4 +6,6 @@ Borken configuration - encrypted cookie with no name | |||
| 6 | sp.configuration_file={PWD}/config/config_encrypted_cookies_noname.ini | 6 | sp.configuration_file={PWD}/config/config_encrypted_cookies_noname.ini |
| 7 | --FILE-- | 7 | --FILE-- |
| 8 | --EXPECT-- | 8 | --EXPECT-- |
| 9 | [snuffleupagus][0.0.0.0][config][error] You must specify a cookie name/regexp on line 2. | 9 | PHP Fatal error: [snuffleupagus][config] You must specify a cookie name/regexp on line 2 in Unknown on line 0 |
| 10 | |||
| 11 | Fatal error: [snuffleupagus][config] You must specify a cookie name/regexp on line 2 in Unknown on line 0 \ No newline at end of file | ||
diff --git a/src/tests/broken_conf_nonexisting_script.phpt b/src/tests/broken_conf_nonexisting_script.phpt index 2af2b75..68ca001 100644 --- a/src/tests/broken_conf_nonexisting_script.phpt +++ b/src/tests/broken_conf_nonexisting_script.phpt | |||
| @@ -8,5 +8,7 @@ sp.configuration_file={PWD}/config/broken_conf_nonexisting_script.ini | |||
| 8 | echo 1; | 8 | echo 1; |
| 9 | ?> | 9 | ?> |
| 10 | --EXPECTF-- | 10 | --EXPECTF-- |
| 11 | [snuffleupagus][0.0.0.0][config][error] The `script` (./non_existing_script.sh) doesn't exist on line 1. | 11 | PHP Fatal error: [snuffleupagus][config] The `script` (./non_existing_script.sh) doesn't exist on line 1 in Unknown on line 0 |
| 12 | 1 | 12 | |
| 13 | Fatal error: [snuffleupagus][config] The `script` (./non_existing_script.sh) doesn't exist on line 1 in Unknown on line 0 | ||
| 14 | 1 \ No newline at end of file | ||
diff --git a/src/tests/broken_conf_quotes.phpt b/src/tests/broken_conf_quotes.phpt index a928650..ed2c87f 100644 --- a/src/tests/broken_conf_quotes.phpt +++ b/src/tests/broken_conf_quotes.phpt | |||
| @@ -6,5 +6,9 @@ Broken configuration - missing quote | |||
| 6 | sp.configuration_file={PWD}/config/broken_conf_quotes.ini | 6 | sp.configuration_file={PWD}/config/broken_conf_quotes.ini |
| 7 | --FILE-- | 7 | --FILE-- |
| 8 | --EXPECT-- | 8 | --EXPECT-- |
| 9 | [snuffleupagus][0.0.0.0][config][error] You forgot to close a bracket. | 9 | PHP Fatal error: [snuffleupagus][config] You forgot to close a bracket. in Unknown on line 0 |
| 10 | [snuffleupagus][0.0.0.0][config][error] Invalid value '_SERVER[PHP_SELF' for `var` on line 1. | 10 | PHP Fatal error: [snuffleupagus][config] Invalid value '_SERVER[PHP_SELF' for `var` on line 1 in Unknown on line 0 |
| 11 | |||
| 12 | Fatal error: [snuffleupagus][config] You forgot to close a bracket. in Unknown on line 0 | ||
| 13 | |||
| 14 | Fatal error: [snuffleupagus][config] Invalid value '_SERVER[PHP_SELF' for `var` on line 1 in Unknown on line 0 \ No newline at end of file | ||
diff --git a/src/tests/broken_conf_readonly_exec.phpt b/src/tests/broken_conf_readonly_exec.phpt index 0f1fd54..56881da 100644 --- a/src/tests/broken_conf_readonly_exec.phpt +++ b/src/tests/broken_conf_readonly_exec.phpt | |||
| @@ -8,5 +8,7 @@ sp.configuration_file={PWD}/config/broken_conf_readonly_exec.ini | |||
| 8 | echo 1; | 8 | echo 1; |
| 9 | ?> | 9 | ?> |
| 10 | --EXPECTF-- | 10 | --EXPECTF-- |
| 11 | [snuffleupagus][0.0.0.0][config][error] Trailing chars '234);' at the end of '.enable(1234);' on line 1. | 11 | PHP Fatal error: [snuffleupagus][config] Trailing chars '234);' at the end of '.enable(1234);' on line 1 in Unknown on line 0 |
| 12 | 1 | 12 | |
| 13 | Fatal error: [snuffleupagus][config] Trailing chars '234);' at the end of '.enable(1234);' on line 1 in Unknown on line 0 | ||
| 14 | 1 \ No newline at end of file | ||
diff --git a/src/tests/broken_conf_samesite.phpt b/src/tests/broken_conf_samesite.phpt index 26e525c..a7c341f 100644 --- a/src/tests/broken_conf_samesite.phpt +++ b/src/tests/broken_conf_samesite.phpt | |||
| @@ -6,4 +6,6 @@ Bad config, invalid samesite type. | |||
| 6 | sp.configuration_file={PWD}/config/broken_conf_cookie_samesite.ini | 6 | sp.configuration_file={PWD}/config/broken_conf_cookie_samesite.ini |
| 7 | --FILE-- | 7 | --FILE-- |
| 8 | --EXPECT-- | 8 | --EXPECT-- |
| 9 | [snuffleupagus][0.0.0.0][config][error] nop is an invalid value to samesite (expected Lax or Strict) on line 1. | 9 | PHP Fatal error: [snuffleupagus][config] nop is an invalid value to samesite (expected Lax or Strict) on line 1 in Unknown on line 0 |
| 10 | |||
| 11 | Fatal error: [snuffleupagus][config] nop is an invalid value to samesite (expected Lax or Strict) on line 1 in Unknown on line 0 \ No newline at end of file | ||
diff --git a/src/tests/broken_conf_shown_in_phpinfo.phpt b/src/tests/broken_conf_shown_in_phpinfo.phpt index 5053ee0..0a0ceb8 100644 --- a/src/tests/broken_conf_shown_in_phpinfo.phpt +++ b/src/tests/broken_conf_shown_in_phpinfo.phpt | |||
| @@ -17,6 +17,10 @@ if (strstr($info, 'Valid config => no') !== FALSE) { | |||
| 17 | } | 17 | } |
| 18 | ?> | 18 | ?> |
| 19 | --EXPECTF-- | 19 | --EXPECTF-- |
| 20 | [snuffleupagus][0.0.0.0][config][error] Failed to compile '*.': %aon line 1. | 20 | PHP Fatal error: [snuffleupagus][config] Failed to compile '*.': %s on line 1. in Unknown on line 0 |
| 21 | [snuffleupagus][0.0.0.0][config][error] '.filename_r()' is expecting a valid regexp, and not '"*."' on line 1. | 21 | PHP Fatal error: [snuffleupagus][config] '.filename_r()' is expecting a valid regexp, and not '"*."' on line 1 in Unknown on line 0 |
| 22 | |||
| 23 | Fatal error: [snuffleupagus][config] Failed to compile '*.': %s on line 1. in Unknown on line 0 | ||
| 24 | |||
| 25 | Fatal error: [snuffleupagus][config] '.filename_r()' is expecting a valid regexp, and not '"*."' on line 1 in Unknown on line 0 | ||
| 22 | win | 26 | win |
diff --git a/src/tests/broken_conf_truncated.phpt b/src/tests/broken_conf_truncated.phpt index 74f3524..83d7633 100644 --- a/src/tests/broken_conf_truncated.phpt +++ b/src/tests/broken_conf_truncated.phpt | |||
| @@ -6,4 +6,6 @@ Bad boolean value in configuration | |||
| 6 | sp.configuration_file={PWD}/config/config_broken_conf_truncated.ini | 6 | sp.configuration_file={PWD}/config/config_broken_conf_truncated.ini |
| 7 | --FILE-- | 7 | --FILE-- |
| 8 | --EXPECT-- | 8 | --EXPECT-- |
| 9 | [snuffleupagus][0.0.0.0][error][error] A valid string as parameter is expected on line 1. | 9 | PHP Fatal error: [snuffleupagus][error] A valid string as parameter is expected on line 1 in Unknown on line 0 |
| 10 | |||
| 11 | Fatal error: [snuffleupagus][error] A valid string as parameter is expected on line 1 in Unknown on line 0 \ No newline at end of file | ||
diff --git a/src/tests/broken_conf_unserialize.phpt b/src/tests/broken_conf_unserialize.phpt index b772f65..e6781b1 100644 --- a/src/tests/broken_conf_unserialize.phpt +++ b/src/tests/broken_conf_unserialize.phpt | |||
| @@ -8,5 +8,7 @@ sp.configuration_file={PWD}/config/broken_conf_unserialize.ini | |||
| 8 | echo 1; | 8 | echo 1; |
| 9 | ?> | 9 | ?> |
| 10 | --EXPECTF-- | 10 | --EXPECTF-- |
| 11 | [snuffleupagus][0.0.0.0][config][error] Trailing chars '234);' at the end of '.enable(1234);' on line 1. | 11 | PHP Fatal error: [snuffleupagus][config] Trailing chars '234);' at the end of '.enable(1234);' on line 1 in Unknown on line 0 |
| 12 | 1 | 12 | |
| 13 | Fatal error: [snuffleupagus][config] Trailing chars '234);' at the end of '.enable(1234);' on line 1 in Unknown on line 0 | ||
| 14 | 1 \ No newline at end of file | ||
diff --git a/src/tests/broken_conf_upload_validation.phpt b/src/tests/broken_conf_upload_validation.phpt index 944e731..ea74a5a 100644 --- a/src/tests/broken_conf_upload_validation.phpt +++ b/src/tests/broken_conf_upload_validation.phpt | |||
| @@ -8,5 +8,7 @@ sp.configuration_file={PWD}/config/borken_conf_upload_validation.ini | |||
| 8 | echo 1; | 8 | echo 1; |
| 9 | ?> | 9 | ?> |
| 10 | --EXPECTF-- | 10 | --EXPECTF-- |
| 11 | [snuffleupagus][0.0.0.0][error][error] A valid string as parameter is expected on line 1. | 11 | PHP Fatal error: [snuffleupagus][error] A valid string as parameter is expected on line 1 in Unknown on line 0 |
| 12 | 1 | 12 | |
| 13 | Fatal error: [snuffleupagus][error] A valid string as parameter is expected on line 1 in Unknown on line 0 | ||
| 14 | 1 \ No newline at end of file | ||
diff --git a/src/tests/broken_conf_weird_keyword.phpt b/src/tests/broken_conf_weird_keyword.phpt index 464800a..3a456f5 100644 --- a/src/tests/broken_conf_weird_keyword.phpt +++ b/src/tests/broken_conf_weird_keyword.phpt | |||
| @@ -6,4 +6,6 @@ Bad config, unknown keyword | |||
| 6 | sp.configuration_file={PWD}/config/broken_conf_weird_keyword.ini | 6 | sp.configuration_file={PWD}/config/broken_conf_weird_keyword.ini |
| 7 | --FILE-- | 7 | --FILE-- |
| 8 | --EXPECT-- | 8 | --EXPECT-- |
| 9 | [snuffleupagus][0.0.0.0][config][error] Trailing chars '.not_a_valid_keyword("test");' at the end of '.enable().not_a_valid_keyword("test");' on line 1. | 9 | PHP Fatal error: [snuffleupagus][config] Trailing chars '.not_a_valid_keyword("test");' at the end of '.enable().not_a_valid_keyword("test");' on line 1 in Unknown on line 0 |
| 10 | |||
| 11 | Fatal error: [snuffleupagus][config] Trailing chars '.not_a_valid_keyword("test");' at the end of '.enable().not_a_valid_keyword("test");' on line 1 in Unknown on line 0 \ No newline at end of file | ||
diff --git a/src/tests/broken_conf_wrong_quotes.phpt b/src/tests/broken_conf_wrong_quotes.phpt index 00aaefb..35e3826 100644 --- a/src/tests/broken_conf_wrong_quotes.phpt +++ b/src/tests/broken_conf_wrong_quotes.phpt | |||
| @@ -6,4 +6,6 @@ Configuration line with too many quotes | |||
| 6 | sp.configuration_file={PWD}/config/broken_conf_wrong_quotes.ini | 6 | sp.configuration_file={PWD}/config/broken_conf_wrong_quotes.ini |
| 7 | --FILE-- | 7 | --FILE-- |
| 8 | --EXPECT-- | 8 | --EXPECT-- |
| 9 | [snuffleupagus][0.0.0.0][error][error] There is an issue with the parsing of '"\)': it doesn't look like a valid string on line 1. | 9 | PHP Fatal error: [snuffleupagus][error] There is an issue with the parsing of '"\)': it doesn't look like a valid string on line 1 in Unknown on line 0 |
| 10 | |||
| 11 | Fatal error: [snuffleupagus][error] There is an issue with the parsing of '"\)': it doesn't look like a valid string on line 1 in Unknown on line 0 \ No newline at end of file | ||
diff --git a/src/tests/broken_conf_wrong_type.phpt b/src/tests/broken_conf_wrong_type.phpt index 765c576..b7e0d28 100644 --- a/src/tests/broken_conf_wrong_type.phpt +++ b/src/tests/broken_conf_wrong_type.phpt | |||
| @@ -6,4 +6,6 @@ Broken conf with wrong type | |||
| 6 | sp.configuration_file={PWD}/config/broken_conf_wrong_type.ini | 6 | sp.configuration_file={PWD}/config/broken_conf_wrong_type.ini |
| 7 | --FILE-- | 7 | --FILE-- |
| 8 | --EXPECTF-- | 8 | --EXPECTF-- |
| 9 | [snuffleupagus][0.0.0.0][error][error] .ret_type() is expecting a valid php type ('false', 'true', 'array'. 'object', 'long', 'double', 'null', 'resource', 'reference', 'undef') on line 5. | 9 | PHP Fatal error: [snuffleupagus][error] .ret_type() is expecting a valid php type ('false', 'true', 'array'. 'object', 'long', 'double', 'null', 'resource', 'reference', 'undef') on line 5 in Unknown on line 0 |
| 10 | |||
| 11 | Fatal error: [snuffleupagus][error] .ret_type() is expecting a valid php type ('false', 'true', 'array'. 'object', 'long', 'double', 'null', 'resource', 'reference', 'undef') on line 5 in Unknown on line 0 \ No newline at end of file | ||
diff --git a/src/tests/broken_invalid_client_ip4.phpt b/src/tests/broken_invalid_client_ip4.phpt index cd62008..e8a5260 100644 --- a/src/tests/broken_invalid_client_ip4.phpt +++ b/src/tests/broken_invalid_client_ip4.phpt | |||
| @@ -13,7 +13,4 @@ sp.configuration_file={PWD}/config/disabled_functions_cidr.ini | |||
| 13 | strpos("1337", "1"); | 13 | strpos("1337", "1"); |
| 14 | ?> | 14 | ?> |
| 15 | --EXPECTF-- | 15 | --EXPECTF-- |
| 16 | [snuffleupagus][xyz][cidr_match][error] Weird ip (xyz) family | 16 | Fatal error: [snuffleupagus][cidr_match] Weird ip (xyz) family in %a/broken_invalid_client_ip4.php on line 2 \ No newline at end of file |
| 17 | [snuffleupagus][xyz][cidr_match][error] Weird ip (xyz) family | ||
| 18 | [snuffleupagus][xyz][cidr_match][error] Weird ip (xyz) family | ||
| 19 | [snuffleupagus][xyz][cidr_match][error] Weird ip (xyz) family | ||
diff --git a/src/tests/broken_regexp.phpt b/src/tests/broken_regexp.phpt index 7c7ac9c..85b9ef3 100644 --- a/src/tests/broken_regexp.phpt +++ b/src/tests/broken_regexp.phpt | |||
| @@ -6,5 +6,9 @@ Broken regexp | |||
| 6 | sp.configuration_file={PWD}/config/broken_regexp.ini | 6 | sp.configuration_file={PWD}/config/broken_regexp.ini |
| 7 | --FILE-- | 7 | --FILE-- |
| 8 | --EXPECTF-- | 8 | --EXPECTF-- |
| 9 | [snuffleupagus][0.0.0.0][config][error] Failed to compile '^$[': %aon line 1. | 9 | PHP Fatal error: [snuffleupagus][config] Failed to compile '^$[': missing terminating ] for character class on line 1. in Unknown on line 0 |
| 10 | [snuffleupagus][0.0.0.0][config][error] '.value_r()' is expecting a valid regexp, and not '"^$["' on line 1. | 10 | PHP Fatal error: [snuffleupagus][config] '.value_r()' is expecting a valid regexp, and not '"^$["' on line 1 in Unknown on line 0 |
| 11 | |||
| 12 | Fatal error: [snuffleupagus][config] Failed to compile '^$[': missing terminating ] for character class on line 1. in Unknown on line 0 | ||
| 13 | |||
| 14 | Fatal error: [snuffleupagus][config] '.value_r()' is expecting a valid regexp, and not '"^$["' on line 1 in Unknown on line 0 \ No newline at end of file | ||
diff --git a/src/tests/broken_unmatching_brackets.phpt b/src/tests/broken_unmatching_brackets.phpt index ee2bc4d..3825dcd 100644 --- a/src/tests/broken_unmatching_brackets.phpt +++ b/src/tests/broken_unmatching_brackets.phpt | |||
| @@ -6,5 +6,9 @@ Broken configuration - unmatching brackets | |||
| 6 | sp.configuration_file={PWD}/config/config_unmatching_brackets.ini | 6 | sp.configuration_file={PWD}/config/config_unmatching_brackets.ini |
| 7 | --FILE-- | 7 | --FILE-- |
| 8 | --EXPECTF-- | 8 | --EXPECTF-- |
| 9 | [snuffleupagus][0.0.0.0][config][error] Invalid `]` position. | 9 | PHP Fatal error: [snuffleupagus][config] Invalid `]` position. in Unknown on line 0 |
| 10 | [snuffleupagus][0.0.0.0][config][error] Invalid value 'arr[b]]]]]' for `param` on line 1. | 10 | PHP Fatal error: [snuffleupagus][config] Invalid value 'arr[b]]]]]' for `param` on line 1 in Unknown on line 0 |
| 11 | |||
| 12 | Fatal error: [snuffleupagus][config] Invalid `]` position. in Unknown on line 0 | ||
| 13 | |||
| 14 | Fatal error: [snuffleupagus][config] Invalid value 'arr[b]]]]]' for `param` on line 1 in Unknown on line 0 \ No newline at end of file | ||
diff --git a/src/tests/crypt_session_invalid.phpt b/src/tests/crypt_session_invalid.phpt index 687a407..b7880db 100644 --- a/src/tests/crypt_session_invalid.phpt +++ b/src/tests/crypt_session_invalid.phpt | |||
| @@ -21,4 +21,4 @@ session_start(); // Re start the session, It will read and decrypt the non em | |||
| 21 | var_dump($_SESSION); // Dump the session | 21 | var_dump($_SESSION); // Dump the session |
| 22 | ?> | 22 | ?> |
| 23 | --EXPECTF-- | 23 | --EXPECTF-- |
| 24 | [snuffleupagus][127.0.0.2][cookie_encryption][drop] Something went wrong with the decryption of the session. \ No newline at end of file | 24 | Fatal error: [snuffleupagus][cookie_encryption] Something went wrong with the decryption of the session in %a/src/tests/crypt_session_invalid.php on line 9 \ No newline at end of file |
diff --git a/src/tests/deny_writable_execution.phpt b/src/tests/deny_writable_execution.phpt index c399d35..916328e 100644 --- a/src/tests/deny_writable_execution.phpt +++ b/src/tests/deny_writable_execution.phpt | |||
| @@ -31,8 +31,6 @@ chmod("$dir/writable_file.txt", 0777); | |||
| 31 | include "$dir/non_writable_file.txt"; | 31 | include "$dir/non_writable_file.txt"; |
| 32 | include "$dir/writable_file.txt"; | 32 | include "$dir/writable_file.txt"; |
| 33 | ?> | 33 | ?> |
| 34 | --EXPECTF-- | ||
| 35 | [snuffleupagus][0.0.0.0][readonly_exec][drop] Attempted execution of a writable file (%a/tests/deny_writable_execution.php). | ||
| 36 | --CLEAN-- | 34 | --CLEAN-- |
| 37 | <?php | 35 | <?php |
| 38 | $dir = __DIR__; | 36 | $dir = __DIR__; |
| @@ -41,3 +39,5 @@ chmod("$dir/writable_file.txt", 0777); | |||
| 41 | unlink("$dir/non_writable_file.txt"); | 39 | unlink("$dir/non_writable_file.txt"); |
| 42 | unlink("$dir/writable_file.txt"); | 40 | unlink("$dir/writable_file.txt"); |
| 43 | ?> | 41 | ?> |
| 42 | --EXPECTF-- | ||
| 43 | Fatal error: [snuffleupagus][readonly_exec] Attempted execution of a writable file (%a/deny_writable_execution.php). in %a/deny_writable_execution.php on line 2 | ||
diff --git a/src/tests/deny_writable_execution_disabled.phpt b/src/tests/deny_writable_execution_disabled.phpt index 6d1233b..dd01f01 100644 --- a/src/tests/deny_writable_execution_disabled.phpt +++ b/src/tests/deny_writable_execution_disabled.phpt | |||
| @@ -29,4 +29,4 @@ chmod("$dir/non_writable_file.txt", 0777); | |||
| 29 | chmod("$dir/writable_file.txt", 0777); | 29 | chmod("$dir/writable_file.txt", 0777); |
| 30 | unlink("$dir/non_writable_file.txt"); | 30 | unlink("$dir/non_writable_file.txt"); |
| 31 | unlink("$dir/writable_file.txt"); | 31 | unlink("$dir/writable_file.txt"); |
| 32 | ?> \ No newline at end of file | 32 | ?> |
diff --git a/src/tests/deny_writable_execution_simulation.phpt b/src/tests/deny_writable_execution_simulation.phpt index d1ccb7c..7f3546a 100644 --- a/src/tests/deny_writable_execution_simulation.phpt +++ b/src/tests/deny_writable_execution_simulation.phpt | |||
| @@ -32,10 +32,6 @@ chmod("$dir/non_writable_file.txt", 0400); | |||
| 32 | include "$dir/writable_file.txt"; | 32 | include "$dir/writable_file.txt"; |
| 33 | include "$dir/non_writable_file.txt"; | 33 | include "$dir/non_writable_file.txt"; |
| 34 | ?> | 34 | ?> |
| 35 | --EXPECTF-- | ||
| 36 | [snuffleupagus][0.0.0.0][readonly_exec][simulation] Attempted execution of a writable file (%a/writable_file.txt). | ||
| 37 | Code execution within a writable file. | ||
| 38 | Code execution within a non-writable file. | ||
| 39 | --CLEAN-- | 35 | --CLEAN-- |
| 40 | <?php | 36 | <?php |
| 41 | $dir = __DIR__; | 37 | $dir = __DIR__; |
| @@ -44,3 +40,11 @@ chmod("$dir/writable_file.txt", 0777); | |||
| 44 | unlink("$dir/non_writable_file.txt"); | 40 | unlink("$dir/non_writable_file.txt"); |
| 45 | unlink("$dir/writable_file.txt"); | 41 | unlink("$dir/writable_file.txt"); |
| 46 | ?> | 42 | ?> |
| 43 | --EXPECTF-- | ||
| 44 | Warning: [snuffleupagus][readonly_exec] Attempted execution of a writable file (%a/src/tests/deny_writable_execution_simulation.php). in %a/src/tests/deny_writable_execution_simulation.php on line 2 | ||
| 45 | |||
| 46 | Warning: [snuffleupagus][readonly_exec] Attempted execution of a writable file (%a/src/tests/writable_file.txt). in %a/src/tests/deny_writable_execution_simulation.php on line 12 | ||
| 47 | |||
| 48 | Warning: [snuffleupagus][readonly_exec] Attempted execution of a writable file (%a/src/tests/writable_file.txt). in %a/src/tests/writable_file.txt on line 1 | ||
| 49 | Code execution within a writable file. | ||
| 50 | Code execution within a non-writable file. | ||
diff --git a/src/tests/disabled_function_echo.phpt b/src/tests/disabled_function_echo.phpt index a884e4a..21e2002 100644 --- a/src/tests/disabled_function_echo.phpt +++ b/src/tests/disabled_function_echo.phpt | |||
| @@ -15,4 +15,5 @@ test("oops"); | |||
| 15 | ?> | 15 | ?> |
| 16 | --CLEAN-- | 16 | --CLEAN-- |
| 17 | --EXPECTF-- | 17 | --EXPECTF-- |
| 18 | qwerty[snuffleupagus][0.0.0.0][disabled_function][drop] Aborted execution on call of the function 'echo' in %a/tests/disabled_function_echo.php:3. | 18 | qwerty |
| 19 | Fatal error: [snuffleupagus][disabled_function] Aborted execution on call of the function 'echo' in %a/disabled_function_echo.php on line 3 \ No newline at end of file | ||
diff --git a/src/tests/disabled_function_echo_2.phpt b/src/tests/disabled_function_echo_2.phpt index 20dbee4..66cace3 100644 --- a/src/tests/disabled_function_echo_2.phpt +++ b/src/tests/disabled_function_echo_2.phpt | |||
| @@ -11,4 +11,5 @@ echo "1", "oops"; | |||
| 11 | ?> | 11 | ?> |
| 12 | --CLEAN-- | 12 | --CLEAN-- |
| 13 | --EXPECTF-- | 13 | --EXPECTF-- |
| 14 | qwe1[snuffleupagus][0.0.0.0][disabled_function][drop] Aborted execution on call of the function 'echo' in %a/tests/disabled_function_echo_2.php:3. | 14 | qwe1 |
| 15 | Fatal error: [snuffleupagus][disabled_function] Aborted execution on call of the function 'echo' in %a/disabled_function_echo_2.php on line 3 \ No newline at end of file | ||
diff --git a/src/tests/disabled_function_echo_local_var.phpt b/src/tests/disabled_function_echo_local_var.phpt index bfa3c8c..300f38e 100644 --- a/src/tests/disabled_function_echo_local_var.phpt +++ b/src/tests/disabled_function_echo_local_var.phpt | |||
| @@ -17,4 +17,5 @@ test(); | |||
| 17 | --CLEAN-- | 17 | --CLEAN-- |
| 18 | --EXPECTF-- | 18 | --EXPECTF-- |
| 19 | 3 | 19 | 3 |
| 20 | [snuffleupagus][0.0.0.0][disabled_function][drop] Aborted execution on call of the function 'echo' in %a/tests/disabled_function_echo_local_var.php:3. | 20 | |
| 21 | Fatal error: [snuffleupagus][disabled_function] Aborted execution on call of the function 'echo' in %a/disabled_function_echo_local_var.php on line 3 \ No newline at end of file | ||
diff --git a/src/tests/disabled_function_local_var.phpt b/src/tests/disabled_function_local_var.phpt index 2eb0c53..99b2b08 100644 --- a/src/tests/disabled_function_local_var.phpt +++ b/src/tests/disabled_function_local_var.phpt | |||
| @@ -21,4 +21,5 @@ test(); | |||
| 21 | Value of a: 1338 | 21 | Value of a: 1338 |
| 22 | 2 | 22 | 2 |
| 23 | Value of a: 1337 | 23 | Value of a: 1337 |
| 24 | [snuffleupagus][0.0.0.0][disabled_function][drop] Aborted execution on call of the function 'strlen' in %a/tests/disabled_function_local_var.php:%d. \ No newline at end of file | 24 | |
| 25 | Fatal error: [snuffleupagus][disabled_function] Aborted execution on call of the function 'strlen' in %a/disabled_function_local_var.php on line 4 \ No newline at end of file | ||
diff --git a/src/tests/disabled_function_local_var_10.phpt b/src/tests/disabled_function_local_var_10.phpt index d55d590..4902972 100644 --- a/src/tests/disabled_function_local_var_10.phpt +++ b/src/tests/disabled_function_local_var_10.phpt | |||
| @@ -41,4 +41,5 @@ array(2) { | |||
| 41 | } | 41 | } |
| 42 | } | 42 | } |
| 43 | } | 43 | } |
| 44 | [snuffleupagus][0.0.0.0][disabled_function][drop] Aborted execution on call of the function 'strlen' in %a/tests/disabled_function_local_var_10.php:%d. | 44 | |
| 45 | Fatal error: [snuffleupagus][disabled_function] Aborted execution on call of the function 'strlen' in %a/disabled_function_local_var_10.php on line 7 \ No newline at end of file | ||
diff --git a/src/tests/disabled_function_local_var_2.phpt b/src/tests/disabled_function_local_var_2.phpt index aff5ed5..5b21d07 100644 --- a/src/tests/disabled_function_local_var_2.phpt +++ b/src/tests/disabled_function_local_var_2.phpt | |||
| @@ -43,4 +43,5 @@ array(2) { | |||
| 43 | [123]=> | 43 | [123]=> |
| 44 | string(5) "block" | 44 | string(5) "block" |
| 45 | } | 45 | } |
| 46 | [snuffleupagus][0.0.0.0][disabled_function][drop] Aborted execution on call of the function 'strlen' in %a/tests/disabled_function_local_var_2.php:%d. | 46 | |
| 47 | Fatal error: [snuffleupagus][disabled_function] Aborted execution on call of the function 'strlen' in %a/disabled_function_local_var_2.php on line 4 \ No newline at end of file | ||
diff --git a/src/tests/disabled_function_local_var_3.phpt b/src/tests/disabled_function_local_var_3.phpt index 94b9f28..597be1d 100644 --- a/src/tests/disabled_function_local_var_3.phpt +++ b/src/tests/disabled_function_local_var_3.phpt | |||
| @@ -42,4 +42,5 @@ array(2) { | |||
| 42 | string(5) "block" | 42 | string(5) "block" |
| 43 | } | 43 | } |
| 44 | } | 44 | } |
| 45 | [snuffleupagus][0.0.0.0][disabled_function][drop] Aborted execution on call of the function 'strlen' in %a/tests/disabled_function_local_var_3.php:%d. | 45 | |
| 46 | Fatal error: [snuffleupagus][disabled_function] Aborted execution on call of the function 'strlen' in %a/disabled_function_local_var_3.php on line 3 \ No newline at end of file | ||
diff --git a/src/tests/disabled_function_local_var_4.phpt b/src/tests/disabled_function_local_var_4.phpt index 55e46cb..b441576 100644 --- a/src/tests/disabled_function_local_var_4.phpt +++ b/src/tests/disabled_function_local_var_4.phpt | |||
| @@ -53,4 +53,5 @@ test(); | |||
| 53 | --EXPECTF-- | 53 | --EXPECTF-- |
| 54 | Valeur: valeur de a | 54 | Valeur: valeur de a |
| 55 | Valeur: valeur de apres | 55 | Valeur: valeur de apres |
| 56 | [snuffleupagus][0.0.0.0][disabled_function][drop] Aborted execution on call of the function 'strlen' in %a/tests/disabled_function_local_var_4.php:%d. | 56 | |
| 57 | Fatal error: [snuffleupagus][disabled_function] Aborted execution on call of the function 'strlen' in %a/disabled_function_local_var_4.php on line 36 \ No newline at end of file | ||
diff --git a/src/tests/disabled_function_local_var_5.phpt b/src/tests/disabled_function_local_var_5.phpt index 4b4a59c..602e96e 100644 --- a/src/tests/disabled_function_local_var_5.phpt +++ b/src/tests/disabled_function_local_var_5.phpt | |||
| @@ -30,4 +30,5 @@ object(stdClass)#1 (1) { | |||
| 30 | ["zxc"]=> | 30 | ["zxc"]=> |
| 31 | string(16) "not a good value" | 31 | string(16) "not a good value" |
| 32 | } | 32 | } |
| 33 | [snuffleupagus][0.0.0.0][disabled_function][drop] Aborted execution on call of the function 'strlen' in %a/tests/disabled_function_local_var_5.php:%d. | 33 | |
| 34 | Fatal error: [snuffleupagus][disabled_function] Aborted execution on call of the function 'strlen' in %a/disabled_function_local_var_5.php on line 3 \ No newline at end of file | ||
diff --git a/src/tests/disabled_function_local_var_6.phpt b/src/tests/disabled_function_local_var_6.phpt index b87936b..1866353 100644 --- a/src/tests/disabled_function_local_var_6.phpt +++ b/src/tests/disabled_function_local_var_6.phpt | |||
| @@ -28,4 +28,5 @@ class test_object { | |||
| 28 | ?> | 28 | ?> |
| 29 | --EXPECTF-- | 29 | --EXPECTF-- |
| 30 | Valeur: no good | 30 | Valeur: no good |
| 31 | [snuffleupagus][0.0.0.0][disabled_function][drop] Aborted execution on call of the function 'strlen' in %a/tests/disabled_function_local_var_6.php:%d. | 31 | |
| 32 | Fatal error: [snuffleupagus][disabled_function] Aborted execution on call of the function 'strlen' in %a/disabled_function_local_var_6.php on line 4 \ No newline at end of file | ||
diff --git a/src/tests/disabled_function_local_var_7.phpt b/src/tests/disabled_function_local_var_7.phpt index e35f4a1..e615a80 100644 --- a/src/tests/disabled_function_local_var_7.phpt +++ b/src/tests/disabled_function_local_var_7.phpt | |||
| @@ -28,4 +28,5 @@ class test_object { | |||
| 28 | ?> | 28 | ?> |
| 29 | --EXPECTF-- | 29 | --EXPECTF-- |
| 30 | Valeur: qwerty | 30 | Valeur: qwerty |
| 31 | [snuffleupagus][0.0.0.0][disabled_function][drop] Aborted execution on call of the function 'strlen' in %a/tests/disabled_function_local_var_7.php:%d. | 31 | |
| 32 | Fatal error: [snuffleupagus][disabled_function] Aborted execution on call of the function 'strlen' in %a/disabled_function_local_var_7.php on line 4 \ No newline at end of file | ||
diff --git a/src/tests/disabled_function_local_var_8.phpt b/src/tests/disabled_function_local_var_8.phpt index 57c4a50..1f1a0dc 100644 --- a/src/tests/disabled_function_local_var_8.phpt +++ b/src/tests/disabled_function_local_var_8.phpt | |||
| @@ -17,4 +17,5 @@ namespace asd { | |||
| 17 | ?> | 17 | ?> |
| 18 | --EXPECTF-- | 18 | --EXPECTF-- |
| 19 | Valeur: qwerty | 19 | Valeur: qwerty |
| 20 | [snuffleupagus][0.0.0.0][disabled_function][drop] Aborted execution on call of the function 'strlen' in %a/tests/disabled_function_local_var_8.php:%d. | 20 | |
| 21 | Fatal error: [snuffleupagus][disabled_function] Aborted execution on call of the function 'strlen' in %a/disabled_function_local_var_8.php on line 8 \ No newline at end of file | ||
diff --git a/src/tests/disabled_function_local_var_9.phpt b/src/tests/disabled_function_local_var_9.phpt index fd2fd65..458d878 100644 --- a/src/tests/disabled_function_local_var_9.phpt +++ b/src/tests/disabled_function_local_var_9.phpt | |||
| @@ -17,4 +17,5 @@ namespace asd { | |||
| 17 | ?> | 17 | ?> |
| 18 | --EXPECTF-- | 18 | --EXPECTF-- |
| 19 | Valeur: asdfgh | 19 | Valeur: asdfgh |
| 20 | [snuffleupagus][0.0.0.0][disabled_function][drop] Aborted execution on call of the function 'strlen' in %a/tests/disabled_function_local_var_9.php:%d. | 20 | |
| 21 | Fatal error: [snuffleupagus][disabled_function] Aborted execution on call of the function 'strlen' in %a/disabled_function_local_var_9.php on line 8 \ No newline at end of file | ||
diff --git a/src/tests/disabled_function_local_var_const.phpt b/src/tests/disabled_function_local_var_const.phpt index 3f509cd..8d9d58a 100644 --- a/src/tests/disabled_function_local_var_const.phpt +++ b/src/tests/disabled_function_local_var_const.phpt | |||
| @@ -11,4 +11,4 @@ define("MY_CONST", $a); | |||
| 11 | strlen("test"); | 11 | strlen("test"); |
| 12 | ?> | 12 | ?> |
| 13 | --EXPECTF-- | 13 | --EXPECTF-- |
| 14 | [snuffleupagus][0.0.0.0][disabled_function][drop] Aborted execution on call of the function 'strlen' in %a/tests/disabled_function_local_var_const.php:4. | 14 | Fatal error: [snuffleupagus][disabled_function] Aborted execution on call of the function 'strlen' in %a/disabled_function_local_var_const.php on line 4 \ No newline at end of file |
diff --git a/src/tests/disabled_function_local_var_obj.phpt b/src/tests/disabled_function_local_var_obj.phpt index 292f6f6..29d57cc 100644 --- a/src/tests/disabled_function_local_var_obj.phpt +++ b/src/tests/disabled_function_local_var_obj.phpt | |||
| @@ -22,4 +22,5 @@ echo strlen($test->$arg) . "\n"; | |||
| 22 | ?> | 22 | ?> |
| 23 | --EXPECTF-- | 23 | --EXPECTF-- |
| 24 | 3 | 24 | 3 |
| 25 | [snuffleupagus][0.0.0.0][disabled_function][drop] Aborted execution on call of the function 'strlen' in %a/tests/disabled_function_local_var_obj.php:%d. | 25 | |
| 26 | Fatal error: [snuffleupagus][disabled_function] Aborted execution on call of the function 'strlen' in %a/disabled_function_local_var_obj.php on line 14 \ No newline at end of file | ||
diff --git a/src/tests/disabled_function_param.phpt b/src/tests/disabled_function_param.phpt index e006a4b..9b8b942 100644 --- a/src/tests/disabled_function_param.phpt +++ b/src/tests/disabled_function_param.phpt | |||
| @@ -16,4 +16,5 @@ qweqwe(Array(2)); | |||
| 16 | ?> | 16 | ?> |
| 17 | --EXPECTF-- | 17 | --EXPECTF-- |
| 18 | OK | 18 | OK |
| 19 | [snuffleupagus][0.0.0.0][disabled_function][drop] Aborted execution on call of the function 'qweqwe' in %a/tests/disabled_function_param.php:%d, because its argument '$asd' content (2) matched a rule. | 19 | |
| 20 | Fatal error: [snuffleupagus][disabled_function] Aborted execution on call of the function 'qweqwe', because its argument '$asd' content (2) matched a rule in %a/disabled_function_param.php on line 3 \ No newline at end of file | ||
diff --git a/src/tests/disabled_function_print.phpt b/src/tests/disabled_function_print.phpt index fc05360..a8b10b4 100644 --- a/src/tests/disabled_function_print.phpt +++ b/src/tests/disabled_function_print.phpt | |||
| @@ -15,4 +15,5 @@ test("oops"); | |||
| 15 | ?> | 15 | ?> |
| 16 | --CLEAN-- | 16 | --CLEAN-- |
| 17 | --EXPECTF-- | 17 | --EXPECTF-- |
| 18 | qwerty[snuffleupagus][0.0.0.0][disabled_function][drop] Aborted execution on call of the function 'echo' in %a/tests/disabled_function_print.php:3. | 18 | qwerty |
| 19 | Fatal error: [snuffleupagus][disabled_function] Aborted execution on call of the function 'echo' in %a/disabled_function_print.php on line 3 \ No newline at end of file | ||
diff --git a/src/tests/disabled_function_super_global_var.phpt b/src/tests/disabled_function_super_global_var.phpt index e59c944..771052a 100644 --- a/src/tests/disabled_function_super_global_var.phpt +++ b/src/tests/disabled_function_super_global_var.phpt | |||
| @@ -17,4 +17,5 @@ test(); | |||
| 17 | ?> | 17 | ?> |
| 18 | --EXPECTF-- | 18 | --EXPECTF-- |
| 19 | 4 | 19 | 4 |
| 20 | [snuffleupagus][0.0.0.0][disabled_function][drop] Aborted execution on call of the function 'strlen' in %s/tests/disabled_function_super_global_var.php:%d. | 20 | |
| 21 | Fatal error: [snuffleupagus][disabled_function] Aborted execution on call of the function 'strlen' in %a/src/tests/disabled_function_super_global_var.php on line 3 \ No newline at end of file | ||
diff --git a/src/tests/disabled_functions.phpt b/src/tests/disabled_functions.phpt index a7603db..48d3724 100644 --- a/src/tests/disabled_functions.phpt +++ b/src/tests/disabled_functions.phpt | |||
| @@ -13,5 +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 | [snuffleupagus][0.0.0.0][disabled_function][drop] Aborted execution on call of the function 'system' in %a/tests/disabled_functions.php:2. | 16 | Fatal error: [snuffleupagus][disabled_function] Aborted execution on call of the function 'system' in %a/disabled_functions.php on line 2 \ No newline at end of file |
| 17 | |||
diff --git a/src/tests/disabled_functions_callback_called_file_r.phpt b/src/tests/disabled_functions_callback_called_file_r.phpt index 7f3804b..9c25f9d 100644 --- a/src/tests/disabled_functions_callback_called_file_r.phpt +++ b/src/tests/disabled_functions_callback_called_file_r.phpt | |||
| @@ -30,10 +30,10 @@ include "$dir/myfunc_callback.php"; | |||
| 30 | echo test('test_callback'); | 30 | echo test('test_callback'); |
| 31 | 31 | ||
| 32 | ?> | 32 | ?> |
| 33 | --EXPECTF-- | ||
| 34 | [snuffleupagus][0.0.0.0][disabled_function][drop] Aborted execution on call of the function 'test_callback' in %a/myfunc_callback.php:%d. | ||
| 35 | --CLEAN-- | 33 | --CLEAN-- |
| 36 | <?php | 34 | <?php |
| 37 | $dir = __DIR__; | 35 | $dir = __DIR__; |
| 38 | @unlink("$dir/myfunc_callback.php"); | 36 | @unlink("$dir/myfunc_callback.php"); |
| 39 | ?> | 37 | ?> |
| 38 | --EXPECTF-- | ||
| 39 | Fatal error: [snuffleupagus][disabled_function] Aborted execution on call of the function 'test_callback' in %a/myfunc_callback.php on line 4 | ||
diff --git a/src/tests/disabled_functions_called_file_r.phpt b/src/tests/disabled_functions_called_file_r.phpt index 52a2158..b361dc8 100644 --- a/src/tests/disabled_functions_called_file_r.phpt +++ b/src/tests/disabled_functions_called_file_r.phpt | |||
| @@ -25,10 +25,10 @@ include "$dir/myfunc.php"; | |||
| 25 | test(); | 25 | test(); |
| 26 | 26 | ||
| 27 | ?> | 27 | ?> |
| 28 | --EXPECTF-- | ||
| 29 | [snuffleupagus][0.0.0.0][disabled_function][drop] Aborted execution on call of the function 'test' in %a/disabled_functions_called_file_r.php:18. | ||
| 30 | --CLEAN-- | 28 | --CLEAN-- |
| 31 | <?php | 29 | <?php |
| 32 | $dir = __DIR__; | 30 | $dir = __DIR__; |
| 33 | @unlink("$dir/myfunc.php"); | 31 | @unlink("$dir/myfunc.php"); |
| 34 | ?> | 32 | ?> |
| 33 | --EXPECTF-- | ||
| 34 | Fatal error: [snuffleupagus][disabled_function] Aborted execution on call of the function 'test' in %a/myfunc.php on line 3 | ||
diff --git a/src/tests/disabled_functions_chain.phpt b/src/tests/disabled_functions_chain.phpt index beb4c67..5aee085 100644 --- a/src/tests/disabled_functions_chain.phpt +++ b/src/tests/disabled_functions_chain.phpt | |||
| @@ -23,4 +23,5 @@ echo "I'm after the call to outer\n"; | |||
| 23 | --EXPECTF-- | 23 | --EXPECTF-- |
| 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 | [snuffleupagus][0.0.0.0][disabled_function][drop] Aborted execution on call of the function 'outer>inner' in %a/disabled_functions_chain.php:%d. \ No newline at end of file | 26 | |
| 27 | Fatal error: [snuffleupagus][disabled_function] Aborted execution on call of the function 'outer>inner' in %a/disabled_functions_chain.php on line 5 \ No newline at end of file | ||
diff --git a/src/tests/disabled_functions_chain_call_user_func.phpt b/src/tests/disabled_functions_chain_call_user_func.phpt index f9b0dd9..90c1f32 100644 --- a/src/tests/disabled_functions_chain_call_user_func.phpt +++ b/src/tests/disabled_functions_chain_call_user_func.phpt | |||
| @@ -23,4 +23,5 @@ echo "I'm after the call to outer\n"; | |||
| 23 | --EXPECTF-- | 23 | --EXPECTF-- |
| 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 | [snuffleupagus][0.0.0.0][disabled_function][drop] Aborted execution on call of the function 'outer>inner' in %a/disabled_functions_chain_call_user_func.php:%d. \ No newline at end of file | 26 | |
| 27 | Fatal error: [snuffleupagus][disabled_function] Aborted execution on call of the function 'outer>inner' in %a/disabled_functions_chain_call_user_func.php on line 5 \ No newline at end of file | ||
diff --git a/src/tests/disabled_functions_chain_call_user_func_ret.phpt b/src/tests/disabled_functions_chain_call_user_func_ret.phpt index e11b9ab..44c9b24 100644 --- a/src/tests/disabled_functions_chain_call_user_func_ret.phpt +++ b/src/tests/disabled_functions_chain_call_user_func_ret.phpt | |||
| @@ -21,6 +21,6 @@ echo one('matching') . "\n"; | |||
| 21 | echo one('still not matching') . "\n"; | 21 | echo one('still not matching') . "\n"; |
| 22 | 22 | ||
| 23 | ?> | 23 | ?> |
| 24 | --EXPECTF-- | ||
| 25 | --XFAIL-- | 24 | --XFAIL-- |
| 25 | --EXPECTF-- | ||
| 26 | Match on ret is broken :/ | 26 | Match on ret is broken :/ |
diff --git a/src/tests/disabled_functions_cidr.phpt b/src/tests/disabled_functions_cidr.phpt index 2226d03..dcd4189 100644 --- a/src/tests/disabled_functions_cidr.phpt +++ b/src/tests/disabled_functions_cidr.phpt | |||
| @@ -13,4 +13,4 @@ sp.configuration_file={PWD}/config/disabled_functions_cidr.ini | |||
| 13 | system("echo 42"); | 13 | system("echo 42"); |
| 14 | ?> | 14 | ?> |
| 15 | --EXPECTF-- | 15 | --EXPECTF-- |
| 16 | [snuffleupagus][127.0.0.1][disabled_function][drop] Aborted execution on call of the function 'system' in %a/tests/disabled_functions_cidr.php:2. | 16 | Fatal error: [snuffleupagus][disabled_function] Aborted execution on call of the function 'system' in %a/disabled_functions_cidr.php on line 2 \ No newline at end of file |
diff --git a/src/tests/disabled_functions_cidr_6.phpt b/src/tests/disabled_functions_cidr_6.phpt index a862e76..92e542c 100644 --- a/src/tests/disabled_functions_cidr_6.phpt +++ b/src/tests/disabled_functions_cidr_6.phpt | |||
| @@ -14,4 +14,4 @@ strpos("a", "b"); | |||
| 14 | printf(1337); | 14 | printf(1337); |
| 15 | ?> | 15 | ?> |
| 16 | --EXPECTF-- | 16 | --EXPECTF-- |
| 17 | [snuffleupagus][2001:0db8:0000:0000:0000:ff00:0042:8328][disabled_function][drop] Aborted execution on call of the function 'strpos' in %a/tests/disabled_functions_cidr_6.php:2. | 17 | Fatal error: [snuffleupagus][disabled_function] Aborted execution on call of the function 'strpos' in %a/disabled_functions_cidr_6.php on line 2 \ No newline at end of file |
diff --git a/src/tests/disabled_functions_die.phpt b/src/tests/disabled_functions_die.phpt index 3fa8c4b..bfabaee 100644 --- a/src/tests/disabled_functions_die.phpt +++ b/src/tests/disabled_functions_die.phpt | |||
| @@ -8,6 +8,6 @@ sp.configuration_file={PWD}/config/disabled_functions_die.ini | |||
| 8 | <?php | 8 | <?php |
| 9 | die('OMG'); | 9 | die('OMG'); |
| 10 | ?> | 10 | ?> |
| 11 | --EXPECTF-- | ||
| 12 | [snuffleupagus][0.0.0.0][disabled_function][drop] Aborted execution on call of the function 'die' in %a/tests/disabled_functions_die.php:%d. | ||
| 13 | --XFAIL-- | 11 | --XFAIL-- |
| 12 | --EXPECTF-- | ||
| 13 | Fatal error: [snuffleupagus][disabled_function] Aborted execution on call of the function 'die' in %a/disabled_function_echo.php on line 3 | ||
diff --git a/src/tests/disabled_functions_eval.phpt b/src/tests/disabled_functions_eval.phpt index 94d9be0..a5d1489 100644 --- a/src/tests/disabled_functions_eval.phpt +++ b/src/tests/disabled_functions_eval.phpt | |||
| @@ -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 | [snuffleupagus][0.0.0.0][disabled_function][drop] Aborted execution on call of the function 'eval' in %a/tests/disabled_functions_eval.php(%d) : eval()'d code:%d. | 14 | Fatal error: [snuffleupagus][disabled_function] Aborted execution on call of the function 'eval' in %a/disabled_functions_eval.php(3) : eval()'d code on line 1 \ No newline at end of file |
diff --git a/src/tests/disabled_functions_eval_filename.phpt b/src/tests/disabled_functions_eval_filename.phpt index e01ecac..4491e9e 100644 --- a/src/tests/disabled_functions_eval_filename.phpt +++ b/src/tests/disabled_functions_eval_filename.phpt | |||
| @@ -11,4 +11,4 @@ eval('$var = 1337 + 1337;'); | |||
| 11 | print("Variable: $var\n"); | 11 | print("Variable: $var\n"); |
| 12 | ?> | 12 | ?> |
| 13 | --EXPECTF-- | 13 | --EXPECTF-- |
| 14 | [snuffleupagus][0.0.0.0][disabled_function][drop] Aborted execution on call of the function 'eval' in %a/tests/disabled_functions_eval_filename.php(%d) : eval()'d code:%d. | 14 | Fatal error: [snuffleupagus][disabled_function] Aborted execution on call of the function 'eval' in %a/disabled_functions_eval_filename.php(3) : eval()'d code on line 1 \ No newline at end of file |
diff --git a/src/tests/disabled_functions_eval_simulation.phpt b/src/tests/disabled_functions_eval_simulation.phpt index c3d880f..2df04a9 100644 --- a/src/tests/disabled_functions_eval_simulation.phpt +++ b/src/tests/disabled_functions_eval_simulation.phpt | |||
| @@ -11,5 +11,5 @@ eval('$var = 1337 + 1337;'); | |||
| 11 | print("Variable: $var\n"); | 11 | print("Variable: $var\n"); |
| 12 | ?> | 12 | ?> |
| 13 | --EXPECTF-- | 13 | --EXPECTF-- |
| 14 | [snuffleupagus][0.0.0.0][disabled_function][simulation] Aborted execution on call of the function 'eval' in %a/tests/disabled_functions_eval_simulation.php(%d) : eval()'d code:%d. | 14 | Warning: [snuffleupagus][disabled_function] Aborted execution on call of the function 'eval' in %a/disabled_functions_eval_simulation.php(3) : eval()'d code on line 1 |
| 15 | Variable: 2674 | 15 | Variable: 2674 \ No newline at end of file |
diff --git a/src/tests/disabled_functions_eval_user.phpt b/src/tests/disabled_functions_eval_user.phpt index 421a485..30ba1d5 100644 --- a/src/tests/disabled_functions_eval_user.phpt +++ b/src/tests/disabled_functions_eval_user.phpt | |||
| @@ -15,4 +15,4 @@ eval('$a = my_func();'); | |||
| 15 | echo '$a = ' . $a . "\n"; | 15 | echo '$a = ' . $a . "\n"; |
| 16 | ?> | 16 | ?> |
| 17 | --EXPECTF-- | 17 | --EXPECTF-- |
| 18 | [snuffleupagus][0.0.0.0][disabled_function][drop] Aborted execution on call of the function 'my_func' in %a/tests/disabled_functions_eval_user.php:3. | 18 | Fatal error: [snuffleupagus][disabled_function] Aborted execution on call of the function 'my_func' in %a/disabled_functions_eval_user.php on line 3 \ No newline at end of file |
diff --git a/src/tests/disabled_functions_exit.phpt b/src/tests/disabled_functions_exit.phpt index 1c15790..b204fcd 100644 --- a/src/tests/disabled_functions_exit.phpt +++ b/src/tests/disabled_functions_exit.phpt | |||
| @@ -8,6 +8,6 @@ sp.configuration_file={PWD}/config/disabled_functions_exit.ini | |||
| 8 | <?php | 8 | <?php |
| 9 | exit('OMG'); | 9 | exit('OMG'); |
| 10 | ?> | 10 | ?> |
| 11 | --EXPECTF-- | ||
| 12 | [snuffleupagus][0.0.0.0][disabled_function][drop] Aborted execution on call of the function 'exit' in %a/tests/disabled_functions_exit.php:%d. | ||
| 13 | --XFAIL-- | 11 | --XFAIL-- |
| 12 | --EXPECTF-- | ||
| 13 | Fatal error: [snuffleupagus][disabled_function] Aborted execution on call of the function 'exit' in %a/disabled_function_echo.php on line 3 | ||
diff --git a/src/tests/disabled_functions_filename_r.phpt b/src/tests/disabled_functions_filename_r.phpt index f38468a..0eb5f7d 100644 --- a/src/tests/disabled_functions_filename_r.phpt +++ b/src/tests/disabled_functions_filename_r.phpt | |||
| @@ -11,4 +11,5 @@ shell_exec("echo 43"); | |||
| 11 | ?> | 11 | ?> |
| 12 | --EXPECTF-- | 12 | --EXPECTF-- |
| 13 | 42 | 13 | 42 |
| 14 | [snuffleupagus][0.0.0.0][disabled_function][drop] Aborted execution on call of the function 'shell_exec' in %a/tests/disabled_functions_filename_r.php:%d. \ No newline at end of file | 14 | |
| 15 | Fatal error: [snuffleupagus][disabled_function] Aborted execution on call of the function 'shell_exec' in %a/disabled_functions_filename_r.php on line 3 \ No newline at end of file | ||
diff --git a/src/tests/disabled_functions_include_once.phpt b/src/tests/disabled_functions_include_once.phpt index eaf07ce..26b7ecc 100644 --- a/src/tests/disabled_functions_include_once.phpt +++ b/src/tests/disabled_functions_include_once.phpt | |||
| @@ -13,14 +13,15 @@ include_once $dir . '/test.bla'; | |||
| 13 | include_once $dir . '/test.sim'; | 13 | include_once $dir . '/test.sim'; |
| 14 | echo "1337\n"; | 14 | echo "1337\n"; |
| 15 | ?> | 15 | ?> |
| 16 | --EXPECTF-- | ||
| 17 | BLA | ||
| 18 | [snuffleupagus][0.0.0.0][disabled_function][simulation] Aborted execution on call of the function 'include_once' in %a/disabled_functions_include_once.php:%d, because its argument 'inclusion path' content (%a/test.sim) matched a rule. | ||
| 19 | MEH | ||
| 20 | 1337 | ||
| 21 | --CLEAN-- | 16 | --CLEAN-- |
| 22 | <?php | 17 | <?php |
| 23 | $dir = __DIR__; | 18 | $dir = __DIR__; |
| 24 | unlink($dir . '/test.bla'); | 19 | unlink($dir . '/test.bla'); |
| 25 | unlink($dir . '/test.sim'); | 20 | unlink($dir . '/test.sim'); |
| 26 | ?> | 21 | ?> |
| 22 | --EXPECTF-- | ||
| 23 | BLA | ||
| 24 | |||
| 25 | Warning: [snuffleupagus][disabled_function] Aborted execution on call of the function 'include_once', because its argument 'inclusion path' content (%a/test.sim) matched a rule in %a/disabled_functions_include_once.php on line 6 | ||
| 26 | MEH | ||
| 27 | 1337 | ||
diff --git a/src/tests/disabled_functions_include_simulation.phpt b/src/tests/disabled_functions_include_simulation.phpt index 8348233..199e91a 100644 --- a/src/tests/disabled_functions_include_simulation.phpt +++ b/src/tests/disabled_functions_include_simulation.phpt | |||
| @@ -13,14 +13,15 @@ include $dir . '/test.bla'; | |||
| 13 | include $dir . '/test.sim'; | 13 | include $dir . '/test.sim'; |
| 14 | echo "1337\n"; | 14 | echo "1337\n"; |
| 15 | ?> | 15 | ?> |
| 16 | --EXPECTF-- | ||
| 17 | BLA | ||
| 18 | [snuffleupagus][0.0.0.0][disabled_function][simulation] Aborted execution on call of the function 'include' in %a/disabled_functions_include_simulation.php:%d, because its argument 'inclusion path' content (%a/test.sim) matched a rule. | ||
| 19 | MEH | ||
| 20 | 1337 | ||
| 21 | --CLEAN-- | 16 | --CLEAN-- |
| 22 | <?php | 17 | <?php |
| 23 | $dir = __DIR__; | 18 | $dir = __DIR__; |
| 24 | unlink($dir . '/test.bla'); | 19 | unlink($dir . '/test.bla'); |
| 25 | unlink($dir . '/test.sim'); | 20 | unlink($dir . '/test.sim'); |
| 26 | ?> | 21 | ?> |
| 22 | --EXPECTF-- | ||
| 23 | BLA | ||
| 24 | |||
| 25 | Warning: [snuffleupagus][disabled_function] Aborted execution on call of the function 'include', because its argument 'inclusion path' content (%a/test.sim) matched a rule in %a/disabled_functions_include_simulation.php on line 6 | ||
| 26 | MEH | ||
| 27 | 1337 | ||
diff --git a/src/tests/disabled_functions_local_var_array.phpt b/src/tests/disabled_functions_local_var_array.phpt index 91c74d5..2c55a6e 100644 --- a/src/tests/disabled_functions_local_var_array.phpt +++ b/src/tests/disabled_functions_local_var_array.phpt | |||
| @@ -17,4 +17,5 @@ foo($a); | |||
| 17 | ?> | 17 | ?> |
| 18 | --EXPECTF-- | 18 | --EXPECTF-- |
| 19 | cccc | 19 | cccc |
| 20 | [snuffleupagus][0.0.0.0][disabled_function][drop] Aborted execution on call of the function 'foo' in %a/tests/disabled_functions_local_var_array.php:3. | 20 | |
| 21 | Fatal error: [snuffleupagus][disabled_function] Aborted execution on call of the function 'foo' in %a/disabled_functions_local_var_array.php on line 3 \ No newline at end of file | ||
diff --git a/src/tests/disabled_functions_local_var_array_key.phpt b/src/tests/disabled_functions_local_var_array_key.phpt index f87d56f..777611b 100644 --- a/src/tests/disabled_functions_local_var_array_key.phpt +++ b/src/tests/disabled_functions_local_var_array_key.phpt | |||
| @@ -17,4 +17,5 @@ foo($a); | |||
| 17 | ?> | 17 | ?> |
| 18 | --EXPECTF-- | 18 | --EXPECTF-- |
| 19 | cccc | 19 | cccc |
| 20 | [snuffleupagus][0.0.0.0][disabled_function][drop] Aborted execution on call of the function 'foo' in %a/tests/disabled_functions_local_var_array_key.php:3. | 20 | |
| 21 | Fatal error: [snuffleupagus][disabled_function] Aborted execution on call of the function 'foo' in %a/disabled_functions_local_var_array_key.php on line 3 \ No newline at end of file | ||
diff --git a/src/tests/disabled_functions_mb.phpt b/src/tests/disabled_functions_mb.phpt index 949fc5d..a2fd99e 100644 --- a/src/tests/disabled_functions_mb.phpt +++ b/src/tests/disabled_functions_mb.phpt | |||
| @@ -9,4 +9,4 @@ sp.configuration_file={PWD}/config/disabled_functions_mb.ini | |||
| 9 | echo strlen("id"); | 9 | echo strlen("id"); |
| 10 | ?> | 10 | ?> |
| 11 | --EXPECTF-- | 11 | --EXPECTF-- |
| 12 | [snuffleupagus][0.0.0.0][disabled_function][drop] Aborted execution on call of the function 'strlen' in %a/tests/disabled_functions_mb.php:2. | 12 | Fatal error: [snuffleupagus][disabled_function] Aborted execution on call of the function 'strlen' in %a/disabled_functions_mb.php on line 2 \ No newline at end of file |
diff --git a/src/tests/disabled_functions_method.phpt b/src/tests/disabled_functions_method.phpt index 67f5689..72e633e 100644 --- a/src/tests/disabled_functions_method.phpt +++ b/src/tests/disabled_functions_method.phpt | |||
| @@ -24,4 +24,4 @@ $c->method2("paf"); | |||
| 24 | $c->method3("pouet"); | 24 | $c->method3("pouet"); |
| 25 | ?> | 25 | ?> |
| 26 | --EXPECTF-- | 26 | --EXPECTF-- |
| 27 | [snuffleupagus][0.0.0.0][disabled_function][drop] Aborted execution on call of the function 'AwesomeClass::method1' in %a/tests/disabled_functions_method.php:4. | 27 | Fatal error: [snuffleupagus][disabled_function] Aborted execution on call of the function 'AwesomeClass::method1' in %a/disabled_functions_method.php on line 4 \ No newline at end of file |
diff --git a/src/tests/disabled_functions_name_r.phpt b/src/tests/disabled_functions_name_r.phpt index 7c5a8b0..1ecee14 100644 --- a/src/tests/disabled_functions_name_r.phpt +++ b/src/tests/disabled_functions_name_r.phpt | |||
| @@ -12,4 +12,5 @@ system("echo 1337"); | |||
| 12 | --EXPECTF-- | 12 | --EXPECTF-- |
| 13 | 42 | 13 | 42 |
| 14 | 1337 | 14 | 1337 |
| 15 | [snuffleupagus][0.0.0.0][disabled_function][drop] Aborted execution on return of the function 'system' in %a/disabled_functions_name_r.php:3, because the function returned '1337', which matched a rule. | 15 | |
| 16 | Fatal error: [snuffleupagus][disabled_function] Aborted execution on return of the function 'system', because the function returned '1337', which matched a rule in %a/disabled_functions_name_r.php on line 3 \ No newline at end of file | ||
diff --git a/src/tests/disabled_functions_name_regexp_type.phpt b/src/tests/disabled_functions_name_regexp_type.phpt index 249afc0..2ceadbf 100644 --- a/src/tests/disabled_functions_name_regexp_type.phpt +++ b/src/tests/disabled_functions_name_regexp_type.phpt | |||
| @@ -13,4 +13,5 @@ echo strcmp([1], "pouet") . "\n"; | |||
| 13 | --EXPECTF-- | 13 | --EXPECTF-- |
| 14 | 0 | 14 | 0 |
| 15 | -1 | 15 | -1 |
| 16 | [snuffleupagus][0.0.0.0][disabled_function][drop] Aborted execution on call of the function 'strcmp' in %a/disabled_functions_name_regexp_type.php:4, because its argument 'str1' content (?) matched a rule. | 16 | |
| 17 | Fatal error: [snuffleupagus][disabled_function] Aborted execution on call of the function 'strcmp', because its argument 'str1' content (?) matched a rule in %a/disabled_functions_name_regexp_type.php on line 4 \ No newline at end of file | ||
diff --git a/src/tests/disabled_functions_name_type.phpt b/src/tests/disabled_functions_name_type.phpt index a82f804..2d14d12 100644 --- a/src/tests/disabled_functions_name_type.phpt +++ b/src/tests/disabled_functions_name_type.phpt | |||
| @@ -11,4 +11,5 @@ echo strcmp([1,23], "pouet") . "\n"; | |||
| 11 | ?> | 11 | ?> |
| 12 | --EXPECTF-- | 12 | --EXPECTF-- |
| 13 | 0 | 13 | 0 |
| 14 | [snuffleupagus][0.0.0.0][disabled_function][drop] Aborted execution on call of the function 'strcmp' in %a/disabled_functions_name_type.php:%d, because its argument '$str1' content (ARRAY) matched a rule. | 14 | |
| 15 | Fatal error: [snuffleupagus][disabled_function] Aborted execution on call of the function 'strcmp', because its argument '$str1' content (ARRAY) matched a rule in %a/disabled_functions_name_type.php on line 3 \ No newline at end of file | ||
diff --git a/src/tests/disabled_functions_namespace.phpt b/src/tests/disabled_functions_namespace.phpt index 1641599..1acfce2 100644 --- a/src/tests/disabled_functions_namespace.phpt +++ b/src/tests/disabled_functions_namespace.phpt | |||
| @@ -27,4 +27,4 @@ my_function(); | |||
| 27 | } | 27 | } |
| 28 | ?> | 28 | ?> |
| 29 | --EXPECTF-- | 29 | --EXPECTF-- |
| 30 | [snuffleupagus][0.0.0.0][disabled_function][drop] Aborted execution on call of the function 'strcmp' in %a/disabled_functions_namespace.php:%d. | 30 | Fatal error: [snuffleupagus][disabled_function] Aborted execution on call of the function 'strcmp' in %a/disabled_functions_namespace.php on line 16 \ No newline at end of file |
diff --git a/src/tests/disabled_functions_nul_byte.phpt b/src/tests/disabled_functions_nul_byte.phpt index aaeade1..984541d 100644 --- a/src/tests/disabled_functions_nul_byte.phpt +++ b/src/tests/disabled_functions_nul_byte.phpt | |||
| @@ -11,4 +11,4 @@ system("id"); | |||
| 11 | 11 | ||
| 12 | ?> | 12 | ?> |
| 13 | --EXPECTF-- | 13 | --EXPECTF-- |
| 14 | [snuffleupagus][0.0.0.0][disabled_function][drop] Aborted execution on call of the function 'system' in %a/tests/disabled_functions_nul_byte.php:2, because its argument '$command' content (0id) matched a rule. | 14 | Fatal error: [snuffleupagus][disabled_function] Aborted execution on call of the function 'system', because its argument '$command' content (0id) matched a rule in %a/disabled_functions_nul_byte.php on line 2 \ No newline at end of file |
diff --git a/src/tests/disabled_functions_param.phpt b/src/tests/disabled_functions_param.phpt index 0ef7ff6..fb6dcbb 100644 --- a/src/tests/disabled_functions_param.phpt +++ b/src/tests/disabled_functions_param.phpt | |||
| @@ -15,4 +15,4 @@ strcmp("bla", "ble"); | |||
| 15 | strncmp("bla", "ble", 2); | 15 | strncmp("bla", "ble", 2); |
| 16 | ?> | 16 | ?> |
| 17 | --EXPECTF-- | 17 | --EXPECTF-- |
| 18 | [snuffleupagus][0.0.0.0][disabled_function][drop] Aborted execution on call of the function 'system' in %a/disabled_functions_param.php:2, because its argument '$command' content (id) matched the rule '1'. | 18 | Fatal error: [snuffleupagus][disabled_function] Aborted execution on call of the function 'system', because its argument '$command' content (id) matched the rule '1' in %a/disabled_functions_param.php on line 2 \ No newline at end of file |
diff --git a/src/tests/disabled_functions_param_alias.phpt b/src/tests/disabled_functions_param_alias.phpt index 5cab1f7..9c249d9 100644 --- a/src/tests/disabled_functions_param_alias.phpt +++ b/src/tests/disabled_functions_param_alias.phpt | |||
| @@ -10,4 +10,4 @@ system("id"); | |||
| 10 | shell_exec("id"); | 10 | shell_exec("id"); |
| 11 | ?> | 11 | ?> |
| 12 | --EXPECTF-- | 12 | --EXPECTF-- |
| 13 | [snuffleupagus][0.0.0.0][disabled_function][drop] Aborted execution on call of the function 'system' in %a/tests/disabled_functions_param_alias.php:2, because of the the rule '1'. | 13 | Fatal error: [snuffleupagus][disabled_function] Aborted execution on call of the function 'system', because of the the rule '1' in %a/disabled_functions_param_alias.php on line 2 \ No newline at end of file |
diff --git a/src/tests/disabled_functions_param_allow.phpt b/src/tests/disabled_functions_param_allow.phpt index 9d0d91b..f570415 100644 --- a/src/tests/disabled_functions_param_allow.phpt +++ b/src/tests/disabled_functions_param_allow.phpt | |||
| @@ -11,4 +11,5 @@ system("id"); | |||
| 11 | ?> | 11 | ?> |
| 12 | --EXPECTF-- | 12 | --EXPECTF-- |
| 13 | win | 13 | win |
| 14 | [snuffleupagus][0.0.0.0][disabled_function][drop] Aborted execution on call of the function 'system' in %a/tests/disabled_functions_param_allow.php:3. \ No newline at end of file | 14 | |
| 15 | Fatal error: [snuffleupagus][disabled_function] Aborted execution on call of the function 'system' in %a/disabled_functions_param_allow.php on line 3 \ No newline at end of file | ||
diff --git a/src/tests/disabled_functions_param_array.phpt b/src/tests/disabled_functions_param_array.phpt index 8bad4e0..37a02e0 100644 --- a/src/tests/disabled_functions_param_array.phpt +++ b/src/tests/disabled_functions_param_array.phpt | |||
| @@ -21,4 +21,5 @@ foo($a); | |||
| 21 | --EXPECTF-- | 21 | --EXPECTF-- |
| 22 | test1 | 22 | test1 |
| 23 | abcde | 23 | abcde |
| 24 | [snuffleupagus][0.0.0.0][disabled_function][drop] Aborted execution on call of the function 'foo' in %a/disabled_functions_param_array.php:3, because its argument '$arr' content (abcd) matched the rule '1'. | 24 | |
| 25 | Fatal error: [snuffleupagus][disabled_function] Aborted execution on call of the function 'foo', because its argument '$arr' content (abcd) matched the rule '1' in %a/disabled_functions_param_array.php on line 3 \ No newline at end of file | ||
diff --git a/src/tests/disabled_functions_param_array_deref.phpt b/src/tests/disabled_functions_param_array_deref.phpt index e88ee2b..3305965 100644 --- a/src/tests/disabled_functions_param_array_deref.phpt +++ b/src/tests/disabled_functions_param_array_deref.phpt | |||
| @@ -22,4 +22,5 @@ foo($a); | |||
| 22 | --EXPECTF-- | 22 | --EXPECTF-- |
| 23 | eee | 23 | eee |
| 24 | abcdef | 24 | abcdef |
| 25 | [snuffleupagus][0.0.0.0][disabled_function][drop] Aborted execution on call of the function 'foo' in %a/tests/disabled_functions_param_array_deref.php:3, because its argument '$arr' content (abcdef) matched the rule '2'. | 25 | |
| 26 | Fatal error: [snuffleupagus][disabled_function] Aborted execution on call of the function 'foo', because its argument '$arr' content (abcdef) matched the rule '2' in %a/disabled_functions_param_array_deref.php on line 3 \ No newline at end of file | ||
diff --git a/src/tests/disabled_functions_param_array_no_value.phpt b/src/tests/disabled_functions_param_array_no_value.phpt index 01b1a8c..dfb67a2 100644 --- a/src/tests/disabled_functions_param_array_no_value.phpt +++ b/src/tests/disabled_functions_param_array_no_value.phpt | |||
| @@ -19,4 +19,5 @@ foo($a); | |||
| 19 | ?> | 19 | ?> |
| 20 | --EXPECTF-- | 20 | --EXPECTF-- |
| 21 | cccc | 21 | cccc |
| 22 | [snuffleupagus][0.0.0.0][disabled_function][drop] Aborted execution on call of the function 'foo' in %a/tests/disabled_functions_param_array_no_value.php:3, because its argument '$arr' content (aaa) matched the rule '3'. | 22 | |
| 23 | Fatal error: [snuffleupagus][disabled_function] Aborted execution on call of the function 'foo', because its argument '$arr' content (aaa) matched the rule '3' in %a/disabled_functions_param_array_no_value.php on line 3 \ No newline at end of file | ||
diff --git a/src/tests/disabled_functions_param_array_r.phpt b/src/tests/disabled_functions_param_array_r.phpt index db4f3ba..1773bbe 100644 --- a/src/tests/disabled_functions_param_array_r.phpt +++ b/src/tests/disabled_functions_param_array_r.phpt | |||
| @@ -17,4 +17,5 @@ foo($a); | |||
| 17 | ?> | 17 | ?> |
| 18 | --EXPECTF-- | 18 | --EXPECTF-- |
| 19 | cccc | 19 | cccc |
| 20 | [snuffleupagus][0.0.0.0][disabled_function][drop] Aborted execution on call of the function 'foo' in %a/tests/disabled_functions_param_array_r.php:3, because its argument 'arr' content (ARRAY) matched the rule '1'. | 20 | |
| 21 | Fatal error: [snuffleupagus][disabled_function] Aborted execution on call of the function 'foo', because its argument 'arr' content (ARRAY) matched the rule '1' in %a/disabled_functions_param_array_r.php on line 3 \ No newline at end of file | ||
diff --git a/src/tests/disabled_functions_param_array_r_keys.phpt b/src/tests/disabled_functions_param_array_r_keys.phpt index 0957b64..0748e92 100644 --- a/src/tests/disabled_functions_param_array_r_keys.phpt +++ b/src/tests/disabled_functions_param_array_r_keys.phpt | |||
| @@ -17,4 +17,5 @@ foo($a); | |||
| 17 | ?> | 17 | ?> |
| 18 | --EXPECTF-- | 18 | --EXPECTF-- |
| 19 | cccc | 19 | cccc |
| 20 | [snuffleupagus][0.0.0.0][disabled_function][drop] Aborted execution on call of the function 'foo' in %a/tests/disabled_functions_param_array_r_keys.php:3, because its argument 'arr' content (ARRAY) matched the rule '2'. | 20 | |
| 21 | Fatal error: [snuffleupagus][disabled_function] Aborted execution on call of the function 'foo', because its argument 'arr' content (ARRAY) matched the rule '2' in %a/disabled_functions_param_array_r_keys.php on line 3 \ No newline at end of file | ||
diff --git a/src/tests/disabled_functions_param_array_several_levels.phpt b/src/tests/disabled_functions_param_array_several_levels.phpt index b98c5a0..cbe845b 100644 --- a/src/tests/disabled_functions_param_array_several_levels.phpt +++ b/src/tests/disabled_functions_param_array_several_levels.phpt | |||
| @@ -17,4 +17,5 @@ foo($a); | |||
| 17 | ?> | 17 | ?> |
| 18 | --EXPECTF-- | 18 | --EXPECTF-- |
| 19 | cccc | 19 | cccc |
| 20 | [snuffleupagus][0.0.0.0][disabled_function][drop] Aborted execution on call of the function 'foo' in %a/tests/disabled_functions_param_array_several_levels.php:3, because its argument '$arr' content (ARRAY) matched the rule '4'. | 20 | |
| 21 | Fatal error: [snuffleupagus][disabled_function] Aborted execution on call of the function 'foo', because its argument '$arr' content (ARRAY) matched the rule '4' in %a/disabled_functions_param_array_several_levels.php on line 3 \ No newline at end of file | ||
diff --git a/src/tests/disabled_functions_param_array_several_levels_int.phpt b/src/tests/disabled_functions_param_array_several_levels_int.phpt index b643ef8..d957acf 100644 --- a/src/tests/disabled_functions_param_array_several_levels_int.phpt +++ b/src/tests/disabled_functions_param_array_several_levels_int.phpt | |||
| @@ -17,4 +17,5 @@ foo($a); | |||
| 17 | ?> | 17 | ?> |
| 18 | --EXPECTF-- | 18 | --EXPECTF-- |
| 19 | cccc | 19 | cccc |
| 20 | [snuffleupagus][0.0.0.0][disabled_function][drop] Aborted execution on call of the function 'foo' in %a/tests/disabled_functions_param_array_several_levels_int.php:3, because its argument '$arr' content (ARRAY) matched the rule '4'. | 20 | |
| 21 | Fatal error: [snuffleupagus][disabled_function] Aborted execution on call of the function 'foo', because its argument '$arr' content (ARRAY) matched the rule '4' in %a/disabled_functions_param_array_several_levels_int.php on line 3 \ No newline at end of file | ||
diff --git a/src/tests/disabled_functions_param_array_several_levels_keys.phpt b/src/tests/disabled_functions_param_array_several_levels_keys.phpt index de3d333..59d27c0 100644 --- a/src/tests/disabled_functions_param_array_several_levels_keys.phpt +++ b/src/tests/disabled_functions_param_array_several_levels_keys.phpt | |||
| @@ -17,4 +17,5 @@ foo($a); | |||
| 17 | ?> | 17 | ?> |
| 18 | --EXPECTF-- | 18 | --EXPECTF-- |
| 19 | cccc | 19 | cccc |
| 20 | [snuffleupagus][0.0.0.0][disabled_function][drop] Aborted execution on call of the function 'foo' in %a/tests/disabled_functions_param_array_several_levels_keys.php:3, because its argument '$arr' content (ARRAY) matched the rule '5'. | 20 | |
| 21 | Fatal error: [snuffleupagus][disabled_function] Aborted execution on call of the function 'foo', because its argument '$arr' content (ARRAY) matched the rule '5' in %a/disabled_functions_param_array_several_levels_keys.php on line 3 \ No newline at end of file | ||
diff --git a/src/tests/disabled_functions_param_array_several_levels_keys_int.phpt b/src/tests/disabled_functions_param_array_several_levels_keys_int.phpt index d5b998a..647c394 100644 --- a/src/tests/disabled_functions_param_array_several_levels_keys_int.phpt +++ b/src/tests/disabled_functions_param_array_several_levels_keys_int.phpt | |||
| @@ -17,4 +17,5 @@ foo($a); | |||
| 17 | ?> | 17 | ?> |
| 18 | --EXPECTF-- | 18 | --EXPECTF-- |
| 19 | cccc | 19 | cccc |
| 20 | [snuffleupagus][0.0.0.0][disabled_function][drop] Aborted execution on call of the function 'foo' in %a/tests/disabled_functions_param_array_several_levels_keys_int.php:3, because its argument '$arr' content (ARRAY) matched the rule '6'. | 20 | |
| 21 | Fatal error: [snuffleupagus][disabled_function] Aborted execution on call of the function 'foo', because its argument '$arr' content (ARRAY) matched the rule '6' in %a/disabled_functions_param_array_several_levels_keys_int.php on line 3 \ No newline at end of file | ||
diff --git a/src/tests/disabled_functions_param_broken_line.phpt b/src/tests/disabled_functions_param_broken_line.phpt index cca001f..d709d15 100644 --- a/src/tests/disabled_functions_param_broken_line.phpt +++ b/src/tests/disabled_functions_param_broken_line.phpt | |||
| @@ -10,6 +10,8 @@ system("echo 1337"); | |||
| 10 | system("echo 1338"); | 10 | system("echo 1338"); |
| 11 | ?> | 11 | ?> |
| 12 | --EXPECTF-- | 12 | --EXPECTF-- |
| 13 | [snuffleupagus][0.0.0.0][config][error] Failed to parse arg 'qwe' of `line` on line 1. | 13 | PHP Fatal error: [snuffleupagus][config] Failed to parse arg 'qwe' of `line` on line 1 in Unknown on line 0 |
| 14 | |||
| 15 | Fatal error: [snuffleupagus][config] Failed to parse arg 'qwe' of `line` on line 1 in Unknown on line 0 | ||
| 14 | 1337 | 16 | 1337 |
| 15 | 1338 | 17 | 1338 \ No newline at end of file |
diff --git a/src/tests/disabled_functions_param_int.phpt b/src/tests/disabled_functions_param_int.phpt index fbbf2f0..e8b0a42 100644 --- a/src/tests/disabled_functions_param_int.phpt +++ b/src/tests/disabled_functions_param_int.phpt | |||
| @@ -18,4 +18,5 @@ foobar("10"); | |||
| 18 | ?> | 18 | ?> |
| 19 | --EXPECTF-- | 19 | --EXPECTF-- |
| 20 | 1 | 20 | 1 |
| 21 | [snuffleupagus][0.0.0.0][disabled_function][drop] Aborted execution on call of the function 'foobar' in %a/tests/disabled_functions_param_int.php:3, because its argument '$id' content (42) matched a rule. | 21 | |
| 22 | Fatal error: [snuffleupagus][disabled_function] Aborted execution on call of the function 'foobar', because its argument '$id' content (42) matched a rule in %a/disabled_functions_param_int.php on line 3 \ No newline at end of file | ||
diff --git a/src/tests/disabled_functions_param_invalid_pos.phpt b/src/tests/disabled_functions_param_invalid_pos.phpt index 91ddd93..14db1fc 100644 --- a/src/tests/disabled_functions_param_invalid_pos.phpt +++ b/src/tests/disabled_functions_param_invalid_pos.phpt | |||
| @@ -9,6 +9,7 @@ sp.configuration_file={PWD}/config/disabled_functions_invalid_pos.ini | |||
| 9 | system("echo 1"); | 9 | system("echo 1"); |
| 10 | ?> | 10 | ?> |
| 11 | --EXPECTF-- | 11 | --EXPECTF-- |
| 12 | [snuffleupagus][0.0.0.0][config][error] Failed to parse arg 'qwe' of `pos` on line 1. | 12 | PHP Fatal error: [snuffleupagus][config] Failed to parse arg 'qwe' of `pos` on line 1 in Unknown on line 0 |
| 13 | 1 | ||
| 14 | 13 | ||
| 14 | Fatal error: [snuffleupagus][config] Failed to parse arg 'qwe' of `pos` on line 1 in Unknown on line 0 | ||
| 15 | 1 \ No newline at end of file | ||
diff --git a/src/tests/disabled_functions_param_line.phpt b/src/tests/disabled_functions_param_line.phpt index 12ea749..75bfedd 100644 --- a/src/tests/disabled_functions_param_line.phpt +++ b/src/tests/disabled_functions_param_line.phpt | |||
| @@ -11,4 +11,5 @@ system("id"); | |||
| 11 | ?> | 11 | ?> |
| 12 | --EXPECTF-- | 12 | --EXPECTF-- |
| 13 | 1337 | 13 | 1337 |
| 14 | [snuffleupagus][0.0.0.0][disabled_function][drop] Aborted execution on call of the function 'system' in %a/disabled_functions_param_line.php:3. | 14 | |
| 15 | Fatal error: [snuffleupagus][disabled_function] Aborted execution on call of the function 'system' in %a/disabled_functions_param_line.php on line 3 \ No newline at end of file | ||
diff --git a/src/tests/disabled_functions_param_pos.phpt b/src/tests/disabled_functions_param_pos.phpt index 3e4fdc5..9127929 100644 --- a/src/tests/disabled_functions_param_pos.phpt +++ b/src/tests/disabled_functions_param_pos.phpt | |||
| @@ -9,5 +9,6 @@ sp.configuration_file={PWD}/config/disabled_functions_pos.ini | |||
| 9 | system("id"); | 9 | system("id"); |
| 10 | ?> | 10 | ?> |
| 11 | --EXPECTF-- | 11 | --EXPECTF-- |
| 12 | [snuffleupagus][0.0.0.0][config][error] It seems that you wrote a rule filtering on the 1337th argument of the function 'system', but it takes only 1 arguments. Matching on _all_ arguments instead. | 12 | Warning: [snuffleupagus][config] It seems that you wrote a rule filtering on the 1337th argument of the function 'system', but it takes only 1 arguments. Matching on _all_ arguments instead. in %a/disabled_functions_param_pos.php on line 2 |
| 13 | [snuffleupagus][0.0.0.0][disabled_function][drop] Aborted execution on call of the function 'system' in %a/disabled_functions_param_pos.php:2, because its argument 'command' content (id) matched a rule. | 13 | |
| 14 | Fatal error: [snuffleupagus][disabled_function] Aborted execution on call of the function 'system', because its argument 'command' content (id) matched a rule in %a/tests/disabled_functions_param_pos.php on line %d | ||
diff --git a/src/tests/disabled_functions_param_pos2.phpt b/src/tests/disabled_functions_param_pos2.phpt index 53487f8..87e18c0 100644 --- a/src/tests/disabled_functions_param_pos2.phpt +++ b/src/tests/disabled_functions_param_pos2.phpt | |||
| @@ -10,4 +10,4 @@ strlen("od"); | |||
| 10 | strlen("id"); | 10 | strlen("id"); |
| 11 | ?> | 11 | ?> |
| 12 | --EXPECTF-- | 12 | --EXPECTF-- |
| 13 | [snuffleupagus][0.0.0.0][disabled_function][drop] Aborted execution on call of the function 'strlen' in %a/disabled_functions_param_pos2.php:3, because its argument 'str' content (id) matched the rule 'strlen array'. | 13 | Fatal error: [snuffleupagus][disabled_function] Aborted execution on call of the function 'strlen', because its argument 'str' content (id) matched the rule 'strlen array' in %a/disabled_functions_param_pos2.php on line 3 \ No newline at end of file |
diff --git a/src/tests/disabled_functions_param_r.phpt b/src/tests/disabled_functions_param_r.phpt index e44b1d5..722f126 100644 --- a/src/tests/disabled_functions_param_r.phpt +++ b/src/tests/disabled_functions_param_r.phpt | |||
| @@ -10,4 +10,4 @@ system("id"); | |||
| 10 | system("echo win"); | 10 | system("echo win"); |
| 11 | ?> | 11 | ?> |
| 12 | --EXPECTF-- | 12 | --EXPECTF-- |
| 13 | [snuffleupagus][0.0.0.0][disabled_function][drop] Aborted execution on call of the function 'system' in %a/tests/disabled_functions_param_r.php:2, because its argument 'command' content (id) matched a rule. | 13 | Fatal error: [snuffleupagus][disabled_function] Aborted execution on call of the function 'system', because its argument 'command' content (id) matched a rule in %a/disabled_functions_param_r.php on line 2 \ No newline at end of file |
diff --git a/src/tests/disabled_functions_pos_type.phpt b/src/tests/disabled_functions_pos_type.phpt index 0b93fd1..7739dfb 100644 --- a/src/tests/disabled_functions_pos_type.phpt +++ b/src/tests/disabled_functions_pos_type.phpt | |||
| @@ -9,6 +9,8 @@ sp.configuration_file={PWD}/config/disabled_functions_pos.ini | |||
| 9 | system([123, 456]); | 9 | system([123, 456]); |
| 10 | ?> | 10 | ?> |
| 11 | --EXPECTF-- | 11 | --EXPECTF-- |
| 12 | [snuffleupagus][0.0.0.0][config][error] It seems that you wrote a rule filtering on the 1337th argument of the function 'system', but it takes only 1 arguments. Matching on _all_ arguments instead. | 12 | Warning: [snuffleupagus][config] It seems that you wrote a rule filtering on the 1337th argument of the function 'system', but it takes only 1 arguments. Matching on _all_ arguments instead. in %a/tests/disabled_functions_pos_type.php on line %d |
| 13 | [snuffleupagus][0.0.0.0][config][error] It seems that you wrote a rule filtering on the 1st argument of the function 'system', but it takes only 1 arguments. Matching on _all_ arguments instead. | 13 | |
| 14 | [snuffleupagus][0.0.0.0][disabled_function][drop] Aborted execution on call of the function 'system' in %a/tests/disabled_functions_pos_type.php:2, because its argument 'command' content (?) matched the rule '1'. | 14 | Warning: [snuffleupagus][config] It seems that you wrote a rule filtering on the 1st argument of the function 'system', but it takes only 1 arguments. Matching on _all_ arguments instead. in %a/tests/disabled_functions_pos_type.php on line %d |
| 15 | |||
| 16 | Fatal error: [snuffleupagus][disabled_function] Aborted execution on call of the function 'system', because its argument 'command' content (?) matched the rule '1' in %a/tests/disabled_functions_pos_type.php on line %d | ||
diff --git a/src/tests/disabled_functions_regexp_multiple.phpt b/src/tests/disabled_functions_regexp_multiple.phpt index 0211062..79f1fc7 100644 --- a/src/tests/disabled_functions_regexp_multiple.phpt +++ b/src/tests/disabled_functions_regexp_multiple.phpt | |||
| @@ -11,8 +11,9 @@ echo strcmp("1", "2") . "\n"; | |||
| 11 | print("After") . "\n"; | 11 | print("After") . "\n"; |
| 12 | ?> | 12 | ?> |
| 13 | --EXPECTF-- | 13 | --EXPECTF-- |
| 14 | [snuffleupagus][0.0.0.0][disabled_function][simulation] Aborted execution on call of the function 'strlen' in %a/disabled_functions_regexp_multiple.php:2. | 14 | Warning: [snuffleupagus][disabled_function] Aborted execution on call of the function 'strlen' in %a/disabled_functions_regexp_multiple.php on line 2 |
| 15 | 2 | 15 | 2 |
| 16 | [snuffleupagus][0.0.0.0][disabled_function][simulation] Aborted execution on call of the function 'strcmp' in %a/disabled_functions_regexp_multiple.php:3. | 16 | |
| 17 | Warning: [snuffleupagus][disabled_function] Aborted execution on call of the function 'strcmp' in %a/disabled_functions_regexp_multiple.php on line 3 | ||
| 17 | -1 | 18 | -1 |
| 18 | After | 19 | After \ No newline at end of file |
diff --git a/src/tests/disabled_functions_register_shutdown_function.phpt b/src/tests/disabled_functions_register_shutdown_function.phpt index 45c52a4..b6f1a10 100644 --- a/src/tests/disabled_functions_register_shutdown_function.phpt +++ b/src/tests/disabled_functions_register_shutdown_function.phpt | |||
| @@ -14,4 +14,5 @@ register_shutdown_function('my_super_function'); | |||
| 14 | ?> | 14 | ?> |
| 15 | --EXPECTF-- | 15 | --EXPECTF-- |
| 16 | 1337 | 16 | 1337 |
| 17 | [snuffleupagus][0.0.0.0][disabled_function][drop] Aborted execution on call of the function 'my_super_function' in %a/tests/disabled_functions_register_shutdown_function.php:3. | 17 | |
| 18 | Fatal error: [snuffleupagus][disabled_function] Aborted execution on call of the function 'my_super_function' in %a/disabled_functions_register_shutdown_function.php on line 3 \ No newline at end of file | ||
diff --git a/src/tests/disabled_functions_register_tick_function.phpt b/src/tests/disabled_functions_register_tick_function.phpt index 57cabc4..6e3fb6f 100644 --- a/src/tests/disabled_functions_register_tick_function.phpt +++ b/src/tests/disabled_functions_register_tick_function.phpt | |||
| @@ -15,4 +15,5 @@ register_tick_function('my_super_function'); | |||
| 15 | ?> | 15 | ?> |
| 16 | --EXPECTF-- | 16 | --EXPECTF-- |
| 17 | 1337 | 17 | 1337 |
| 18 | [snuffleupagus][0.0.0.0][disabled_function][drop] Aborted execution on call of the function 'my_super_function' in %a/tests/disabled_functions_register_tick_function.php:4. | 18 | |
| 19 | Fatal error: [snuffleupagus][disabled_function] Aborted execution on call of the function 'my_super_function' in %a/disabled_functions_register_tick_function.php on line 4 \ No newline at end of file | ||
diff --git a/src/tests/disabled_functions_require.phpt b/src/tests/disabled_functions_require.phpt index 4f22a45..77dfbf5 100644 --- a/src/tests/disabled_functions_require.phpt +++ b/src/tests/disabled_functions_require.phpt | |||
| @@ -13,11 +13,12 @@ require $dir . '/test.bla'; | |||
| 13 | require $dir . '/test.meh'; | 13 | require $dir . '/test.meh'; |
| 14 | echo "1337"; | 14 | echo "1337"; |
| 15 | ?> | 15 | ?> |
| 16 | --EXPECTF-- | ||
| 17 | BLA[snuffleupagus][0.0.0.0][disabled_function][drop] Aborted execution on call of the function 'require' in %a/disabled_functions_require.php:%d, because its argument 'inclusion path' content (%a/test.meh) matched a rule. | ||
| 18 | --CLEAN-- | 16 | --CLEAN-- |
| 19 | <?php | 17 | <?php |
| 20 | $dir = __DIR__; | 18 | $dir = __DIR__; |
| 21 | unlink($dir . '/test.bla'); | 19 | unlink($dir . '/test.bla'); |
| 22 | unlink($dir . '/test.meh'); | 20 | unlink($dir . '/test.meh'); |
| 23 | ?> | 21 | ?> |
| 22 | --EXPECTF-- | ||
| 23 | BLA | ||
| 24 | Fatal error: [snuffleupagus][disabled_function] Aborted execution on call of the function 'require', because its argument 'inclusion path' content (%a/test.meh) matched a rule in %a/disabled_functions_require.php on line 6 | ||
diff --git a/src/tests/disabled_functions_require_once.phpt b/src/tests/disabled_functions_require_once.phpt index 60b7841..84e93cd 100644 --- a/src/tests/disabled_functions_require_once.phpt +++ b/src/tests/disabled_functions_require_once.phpt | |||
| @@ -13,11 +13,12 @@ require_once $dir . '/test.bla'; | |||
| 13 | require_once $dir . '/test.meh'; | 13 | require_once $dir . '/test.meh'; |
| 14 | echo "1337"; | 14 | echo "1337"; |
| 15 | ?> | 15 | ?> |
| 16 | --EXPECTF-- | ||
| 17 | BLA[snuffleupagus][0.0.0.0][disabled_function][drop] Aborted execution on call of the function 'require_once' in %a/disabled_functions_require_once.php:%d, because its argument 'inclusion path' content (%a/test.meh) matched a rule. | ||
| 18 | --CLEAN-- | 16 | --CLEAN-- |
| 19 | <?php | 17 | <?php |
| 20 | $dir = __DIR__; | 18 | $dir = __DIR__; |
| 21 | unlink($dir . '/test.bla'); | 19 | unlink($dir . '/test.bla'); |
| 22 | unlink($dir . '/test.meh'); | 20 | unlink($dir . '/test.meh'); |
| 23 | ?> | 21 | ?> |
| 22 | --EXPECTF-- | ||
| 23 | BLA | ||
| 24 | Fatal error: [snuffleupagus][disabled_function] Aborted execution on call of the function 'require_once', because its argument 'inclusion path' content (%a/test.meh) matched a rule in %a/disabled_functions_require_once.php on line 6 | ||
diff --git a/src/tests/disabled_functions_require_simulation.phpt b/src/tests/disabled_functions_require_simulation.phpt index e092def..6c97480 100644 --- a/src/tests/disabled_functions_require_simulation.phpt +++ b/src/tests/disabled_functions_require_simulation.phpt | |||
| @@ -13,14 +13,15 @@ require $dir . '/test.bla'; | |||
| 13 | require $dir . '/test.sim'; | 13 | require $dir . '/test.sim'; |
| 14 | echo "1337\n"; | 14 | echo "1337\n"; |
| 15 | ?> | 15 | ?> |
| 16 | --EXPECTF-- | ||
| 17 | BLA | ||
| 18 | [snuffleupagus][0.0.0.0][disabled_function][simulation] Aborted execution on call of the function 'require' in %a/disabled_functions_require_simulation.php:%d, because its argument 'inclusion path' content (%a/test.sim) matched a rule. | ||
| 19 | MEH | ||
| 20 | 1337 | ||
| 21 | --CLEAN-- | 16 | --CLEAN-- |
| 22 | <?php | 17 | <?php |
| 23 | $dir = __DIR__; | 18 | $dir = __DIR__; |
| 24 | unlink($dir . '/test.bla'); | 19 | unlink($dir . '/test.bla'); |
| 25 | unlink($dir . '/test.sim'); | 20 | unlink($dir . '/test.sim'); |
| 26 | ?> | 21 | ?> |
| 22 | --EXPECTF-- | ||
| 23 | BLA | ||
| 24 | |||
| 25 | Warning: [snuffleupagus][disabled_function] Aborted execution on call of the function 'require', because its argument 'inclusion path' content (%a/test.sim) matched a rule in %a/disabled_functions_require_simulation.php on line 6 | ||
| 26 | MEH | ||
| 27 | 1337 | ||
diff --git a/src/tests/disabled_functions_ret.phpt b/src/tests/disabled_functions_ret.phpt index 7a16599..7c5d596 100644 --- a/src/tests/disabled_functions_ret.phpt +++ b/src/tests/disabled_functions_ret.phpt | |||
| @@ -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 | [snuffleupagus][0.0.0.0][disabled_function][drop] Aborted execution on return of the function 'strpos' in %a/disabled_functions_ret.php:2, because the function returned '0', which matched a rule. | 13 | Fatal error: [snuffleupagus][disabled_function] Aborted execution on return of the function 'strpos', because the function returned '0', which matched a rule in %a/disabled_functions_ret.php on line 2 \ No newline at end of file |
diff --git a/src/tests/disabled_functions_ret2.phpt b/src/tests/disabled_functions_ret2.phpt index 863b7e0..e32c585 100644 --- a/src/tests/disabled_functions_ret2.phpt +++ b/src/tests/disabled_functions_ret2.phpt | |||
| @@ -9,4 +9,4 @@ sp.configuration_file={PWD}/config/disabled_functions_ret.ini | |||
| 9 | echo stripos("pouet", "p"); | 9 | echo stripos("pouet", "p"); |
| 10 | ?> | 10 | ?> |
| 11 | --EXPECTF-- | 11 | --EXPECTF-- |
| 12 | [snuffleupagus][0.0.0.0][disabled_function][drop] Aborted execution on return of the function 'stripos' in %a/disabled_functions_ret2.php:2, because the function returned '0', which matched a rule. | 12 | Fatal error: [snuffleupagus][disabled_function] Aborted execution on return of the function 'stripos', because the function returned '0', which matched a rule in %a/disabled_functions_ret2.php on line 2 \ No newline at end of file |
diff --git a/src/tests/disabled_functions_ret3.phpt b/src/tests/disabled_functions_ret3.phpt index 87a44ef..dc60c43 100644 --- a/src/tests/disabled_functions_ret3.phpt +++ b/src/tests/disabled_functions_ret3.phpt | |||
| @@ -19,4 +19,5 @@ echo("We're at the end of the execution.\n"); | |||
| 19 | ?> | 19 | ?> |
| 20 | --EXPECTF-- | 20 | --EXPECTF-- |
| 21 | We're in function `a`. | 21 | We're in function `a`. |
| 22 | [snuffleupagus][0.0.0.0][disabled_function][drop] Aborted execution on return of the function 'Bob::a' in %a/disabled_functions_ret3.php:9, because the function returned '2', which matched a rule. | 22 | |
| 23 | Fatal error: [snuffleupagus][disabled_function] Aborted execution on return of the function 'Bob::a', because the function returned '2', which matched a rule in %a/disabled_functions_ret3.php on line 9 \ No newline at end of file | ||
diff --git a/src/tests/disabled_functions_ret_right_hash.phpt b/src/tests/disabled_functions_ret_right_hash.phpt index 04f7d05..1307172 100644 --- a/src/tests/disabled_functions_ret_right_hash.phpt +++ b/src/tests/disabled_functions_ret_right_hash.phpt | |||
| @@ -10,4 +10,5 @@ system("echo $((1 + 1336))"); | |||
| 10 | ?> | 10 | ?> |
| 11 | --EXPECTF-- | 11 | --EXPECTF-- |
| 12 | 1337 | 12 | 1337 |
| 13 | [snuffleupagus][0.0.0.0][disabled_function][drop] Aborted execution on return of the function 'system' in %a/tests/disabled_functions_ret_right_hash.php:2, because the function returned '1337', which matched a rule. | 13 | |
| 14 | Fatal error: [snuffleupagus][disabled_function] Aborted execution on return of the function 'system', because the function returned '1337', which matched a rule in %a/disabled_functions_ret_right_hash.php on line 2 \ No newline at end of file | ||
diff --git a/src/tests/disabled_functions_ret_simulation.phpt b/src/tests/disabled_functions_ret_simulation.phpt index 4368b12..bd4cea0 100644 --- a/src/tests/disabled_functions_ret_simulation.phpt +++ b/src/tests/disabled_functions_ret_simulation.phpt | |||
| @@ -11,8 +11,10 @@ echo stripos("pouet", "p") . "\n"; | |||
| 11 | strcmp("p", "p") . "\n"; | 11 | strcmp("p", "p") . "\n"; |
| 12 | ?> | 12 | ?> |
| 13 | --EXPECTF-- | 13 | --EXPECTF-- |
| 14 | [snuffleupagus][0.0.0.0][disabled_function][simulation] Aborted execution on return of the function 'strpos' in %a/disabled_functions_ret_simulation.php:2, because the function returned '0', which matched a rule. | 14 | Warning: [snuffleupagus][disabled_function] Aborted execution on return of the function 'strpos', because the function returned '0', which matched a rule in %a/disabled_functions_ret_simulation.php on line 2 |
| 15 | 0 | 15 | 0 |
| 16 | [snuffleupagus][0.0.0.0][disabled_function][simulation] Aborted execution on return of the function 'stripos' in %a/disabled_functions_ret_simulation.php:3, because the function returned '0', which matched the rule '1'. | 16 | |
| 17 | Warning: [snuffleupagus][disabled_function] Aborted execution on return of the function 'stripos', because the function returned '0', which matched the rule '1' in %a/disabled_functions_ret_simulation.php on line 3 | ||
| 17 | 0 | 18 | 0 |
| 18 | [snuffleupagus][0.0.0.0][disabled_function][drop] Aborted execution on return of the function 'strcmp' in %a/disabled_functions_ret_simulation.php:4, because the function returned '0', which matched a rule. | 19 | |
| 20 | Fatal error: [snuffleupagus][disabled_function] Aborted execution on return of the function 'strcmp', because the function returned '0', which matched a rule in %a/disabled_functions_ret_simulation.php on line 4 \ No newline at end of file | ||
diff --git a/src/tests/disabled_functions_ret_type.phpt b/src/tests/disabled_functions_ret_type.phpt index 4436157..88401ca 100644 --- a/src/tests/disabled_functions_ret_type.phpt +++ b/src/tests/disabled_functions_ret_type.phpt | |||
| @@ -13,4 +13,5 @@ echo strpos("pouet", "123"); | |||
| 13 | --EXPECTF-- | 13 | --EXPECTF-- |
| 14 | int(0) | 14 | int(0) |
| 15 | 1337 | 15 | 1337 |
| 16 | [snuffleupagus][0.0.0.0][disabled_function][drop] Aborted execution on return of the function 'strpos' in %a/disabled_functions_ret_type.php:%d, because the function returned 'FALSE', which matched the rule 'Return value is FALSE'. | 16 | |
| 17 | Fatal error: [snuffleupagus][disabled_function] Aborted execution on return of the function 'strpos', because the function returned 'FALSE', which matched the rule 'Return value is FALSE' in %a/disabled_functions_ret_type.php on line 4 \ No newline at end of file | ||
diff --git a/src/tests/disabled_functions_ret_type_array.phpt b/src/tests/disabled_functions_ret_type_array.phpt index 79b3d07..3ceac9e 100644 --- a/src/tests/disabled_functions_ret_type_array.phpt +++ b/src/tests/disabled_functions_ret_type_array.phpt | |||
| @@ -9,4 +9,4 @@ sp.configuration_file={PWD}/config/disabled_functions_ret_type_array.ini | |||
| 9 | echo get_loaded_extensions(); | 9 | echo get_loaded_extensions(); |
| 10 | ?> | 10 | ?> |
| 11 | --EXPECTF-- | 11 | --EXPECTF-- |
| 12 | [snuffleupagus][0.0.0.0][disabled_function][drop] Aborted execution on return of the function 'get_loaded_extensions' in %a/tests/disabled_functions_ret_type_array.php:2, because the function returned 'ARRAY', which matched the rule 'Return value is an array'. | 12 | Fatal error: [snuffleupagus][disabled_function] Aborted execution on return of the function 'get_loaded_extensions', because the function returned 'ARRAY', which matched the rule 'Return value is an array' in %a/disabled_functions_ret_type_array.php on line 2 \ No newline at end of file |
diff --git a/src/tests/disabled_functions_ret_type_double.phpt b/src/tests/disabled_functions_ret_type_double.phpt index 7f6dcce..b0e895c 100644 --- a/src/tests/disabled_functions_ret_type_double.phpt +++ b/src/tests/disabled_functions_ret_type_double.phpt | |||
| @@ -9,4 +9,4 @@ sp.configuration_file={PWD}/config/disabled_functions_ret_type_double.ini | |||
| 9 | echo cos(0.5) . "\n"; | 9 | echo cos(0.5) . "\n"; |
| 10 | ?> | 10 | ?> |
| 11 | --EXPECTF-- | 11 | --EXPECTF-- |
| 12 | [snuffleupagus][0.0.0.0][disabled_function][drop] Aborted execution on return of the function 'cos' %a/disabled_functions_ret_type_double.php:%d, because the function returned '0.877583', which matched the rule 'Return value is a double'. | 12 | Fatal error: [snuffleupagus][disabled_function] Aborted execution on return of the function 'cos', because the function returned '0.877583', which matched the rule 'Return value is a double' in %a/disabled_functions_ret_type_double.php on line 2 \ No newline at end of file |
diff --git a/src/tests/disabled_functions_ret_type_long.phpt b/src/tests/disabled_functions_ret_type_long.phpt index 1f13079..c389533 100644 --- a/src/tests/disabled_functions_ret_type_long.phpt +++ b/src/tests/disabled_functions_ret_type_long.phpt | |||
| @@ -9,4 +9,4 @@ sp.configuration_file={PWD}/config/disabled_functions_ret_type_long.ini | |||
| 9 | echo strlen("pouet") . "\n"; | 9 | echo strlen("pouet") . "\n"; |
| 10 | ?> | 10 | ?> |
| 11 | --EXPECTF-- | 11 | --EXPECTF-- |
| 12 | [snuffleupagus][0.0.0.0][disabled_function][drop] Aborted execution on return of the function 'strlen' in %a/disabled_functions_ret_type_long.php:%d, because the function returned '5', which matched the rule 'Return value is a long'. | 12 | Fatal error: [snuffleupagus][disabled_function] Aborted execution on return of the function 'strlen', because the function returned '5', which matched the rule 'Return value is a long' in %a/disabled_functions_ret_type_long.php on line 2 \ No newline at end of file |
diff --git a/src/tests/disabled_functions_ret_type_null.phpt b/src/tests/disabled_functions_ret_type_null.phpt index d000f07..894b3f5 100644 --- a/src/tests/disabled_functions_ret_type_null.phpt +++ b/src/tests/disabled_functions_ret_type_null.phpt | |||
| @@ -13,4 +13,4 @@ function my_function() { | |||
| 13 | var_dump(my_function()); | 13 | var_dump(my_function()); |
| 14 | ?> | 14 | ?> |
| 15 | --EXPECTF-- | 15 | --EXPECTF-- |
| 16 | [snuffleupagus][0.0.0.0][disabled_function][drop] Aborted execution on return of the function 'my_function' in %atests/disabled_functions_ret_type_null.php:6, because the function returned 'NULL', which matched the rule 'Return value is null'. | 16 | Fatal error: [snuffleupagus][disabled_function] Aborted execution on return of the function 'my_function', because the function returned 'NULL', which matched the rule 'Return value is null' in %a/disabled_functions_ret_type_null.php on line 6 \ No newline at end of file |
diff --git a/src/tests/disabled_functions_ret_type_object.phpt b/src/tests/disabled_functions_ret_type_object.phpt index 688245d..171cd4b 100644 --- a/src/tests/disabled_functions_ret_type_object.phpt +++ b/src/tests/disabled_functions_ret_type_object.phpt | |||
| @@ -13,4 +13,4 @@ $var = a(); | |||
| 13 | echo "fail"; | 13 | echo "fail"; |
| 14 | ?> | 14 | ?> |
| 15 | --EXPECTF-- | 15 | --EXPECTF-- |
| 16 | [snuffleupagus][0.0.0.0][disabled_function][drop] Aborted execution on return of the function 'a' in %a/tests/disabled_functions_ret_type_object.php:5, because the function returned 'OBJECT', which matched a rule. | 16 | Fatal error: [snuffleupagus][disabled_function] Aborted execution on return of the function 'a', because the function returned 'OBJECT', which matched a rule in %a/disabled_functions_ret_type_object.php on line 5 \ No newline at end of file |
diff --git a/src/tests/disabled_functions_ret_type_resource.phpt b/src/tests/disabled_functions_ret_type_resource.phpt index d7eeba3..4ae38b6 100644 --- a/src/tests/disabled_functions_ret_type_resource.phpt +++ b/src/tests/disabled_functions_ret_type_resource.phpt | |||
| @@ -9,4 +9,4 @@ sp.configuration_file={PWD}/config/disabled_functions_ret_type_resource.ini | |||
| 9 | echo fopen("/etc/passwd", "r"); | 9 | echo fopen("/etc/passwd", "r"); |
| 10 | ?> | 10 | ?> |
| 11 | --EXPECTF-- | 11 | --EXPECTF-- |
| 12 | [snuffleupagus][0.0.0.0][disabled_function][drop] Aborted execution on return of the function 'fopen' in %a/disabled_functions_ret_type_resource.php:2, because the function returned 'RESOURCE', which matched the rule 'Return value is a resource'. | 12 | Fatal error: [snuffleupagus][disabled_function] Aborted execution on return of the function 'fopen', because the function returned 'RESOURCE', which matched the rule 'Return value is a resource' in %a/disabled_functions_ret_type_resource.php on line 2 \ No newline at end of file |
diff --git a/src/tests/disabled_functions_ret_type_str.phpt b/src/tests/disabled_functions_ret_type_str.phpt index 2d81e3d..356ff43 100644 --- a/src/tests/disabled_functions_ret_type_str.phpt +++ b/src/tests/disabled_functions_ret_type_str.phpt | |||
| @@ -9,4 +9,4 @@ sp.configuration_file={PWD}/config/disabled_functions_ret_type_str.ini | |||
| 9 | echo substr("pouet", 3) . "\n"; | 9 | echo substr("pouet", 3) . "\n"; |
| 10 | ?> | 10 | ?> |
| 11 | --EXPECTF-- | 11 | --EXPECTF-- |
| 12 | [snuffleupagus][0.0.0.0][disabled_function][drop] Aborted execution on return of the function 'substr' in %a/disabled_functions_ret_type_str.php:%d, because the function returned 'et', which matched the rule 'Return value is a string'. | 12 | Fatal error: [snuffleupagus][disabled_function] Aborted execution on return of the function 'substr', because the function returned 'et', which matched the rule 'Return value is a string' in %a/disabled_functions_ret_type_str.php on line 2 \ No newline at end of file |
diff --git a/src/tests/disabled_functions_ret_type_true.phpt b/src/tests/disabled_functions_ret_type_true.phpt index bec72f9..8ddb1f7 100644 --- a/src/tests/disabled_functions_ret_type_true.phpt +++ b/src/tests/disabled_functions_ret_type_true.phpt | |||
| @@ -13,4 +13,5 @@ echo is_numeric("1234") . "\n"; | |||
| 13 | --EXPECTF-- | 13 | --EXPECTF-- |
| 14 | bool(false) | 14 | bool(false) |
| 15 | 1337 | 15 | 1337 |
| 16 | [snuffleupagus][0.0.0.0][disabled_function][drop] Aborted execution on return of the function 'is_numeric' in %a/disabled_functions_ret_type_true.php:%d, because the function returned 'TRUE', which matched the rule 'Return value is a true'. | 16 | |
| 17 | Fatal error: [snuffleupagus][disabled_function] Aborted execution on return of the function 'is_numeric', because the function returned 'TRUE', which matched the rule 'Return value is a true' in %a/disabled_functions_ret_type_true.php on line 4 \ No newline at end of file | ||
diff --git a/src/tests/disabled_functions_ret_val.phpt b/src/tests/disabled_functions_ret_val.phpt index 0a53236..40a3be9 100644 --- a/src/tests/disabled_functions_ret_val.phpt +++ b/src/tests/disabled_functions_ret_val.phpt | |||
| @@ -11,4 +11,5 @@ echo str_repeat("fufufu",1); | |||
| 11 | ?> | 11 | ?> |
| 12 | --EXPECTF-- | 12 | --EXPECTF-- |
| 13 | fufu | 13 | fufu |
| 14 | [snuffleupagus][0.0.0.0][disabled_function][drop] Aborted execution on return of the function 'str_repeat' in %a/disabled_functions_ret_val.php:3, because the function returned 'fufufu', which matched a rule. | 14 | |
| 15 | Fatal error: [snuffleupagus][disabled_function] Aborted execution on return of the function 'str_repeat', because the function returned 'fufufu', which matched a rule in %a/disabled_functions_ret_val.php on line 3 \ No newline at end of file | ||
diff --git a/src/tests/disabled_functions_ret_val_dump.phpt b/src/tests/disabled_functions_ret_val_dump.phpt index b29cafd..9fff77b 100644 --- a/src/tests/disabled_functions_ret_val_dump.phpt +++ b/src/tests/disabled_functions_ret_val_dump.phpt | |||
| @@ -19,4 +19,5 @@ echo str_repeat("fufufu",1); | |||
| 19 | ?> | 19 | ?> |
| 20 | --EXPECTF-- | 20 | --EXPECTF-- |
| 21 | fufu | 21 | fufu |
| 22 | [snuffleupagus][0.0.0.0][disabled_function][drop] Aborted execution on return of the function 'str_repeat' in %a/disabled_functions_ret_val_dump.php:%d, because the function returned 'fufufu', which matched a rule. | 22 | |
| 23 | Fatal error: [snuffleupagus][disabled_function] Aborted execution on return of the function 'str_repeat', because the function returned 'fufufu', which matched a rule in %a/src/tests/disabled_functions_ret_val_dump.php on line 3 \ No newline at end of file | ||
diff --git a/src/tests/disabled_functions_ret_val_rx.phpt b/src/tests/disabled_functions_ret_val_rx.phpt index cb383c4..ba06649 100644 --- a/src/tests/disabled_functions_ret_val_rx.phpt +++ b/src/tests/disabled_functions_ret_val_rx.phpt | |||
| @@ -11,4 +11,5 @@ echo str_repeat("fufufu",1); | |||
| 11 | ?> | 11 | ?> |
| 12 | --EXPECTF-- | 12 | --EXPECTF-- |
| 13 | fufu | 13 | fufu |
| 14 | [snuffleupagus][0.0.0.0][disabled_function][drop] Aborted execution on return of the function 'str_repeat' in %a/disabled_functions_ret_val_rx.php:3, because the function returned 'fufufu', which matched a rule. | 14 | |
| 15 | Fatal error: [snuffleupagus][disabled_function] Aborted execution on return of the function 'str_repeat', because the function returned 'fufufu', which matched a rule in %a/disabled_functions_ret_val_rx.php on line 3 \ No newline at end of file | ||
diff --git a/src/tests/disabled_functions_runtime.phpt b/src/tests/disabled_functions_runtime.phpt index 2bbe8b2..4ba1a53 100644 --- a/src/tests/disabled_functions_runtime.phpt +++ b/src/tests/disabled_functions_runtime.phpt | |||
| @@ -21,11 +21,12 @@ if (rand() % 2) { | |||
| 21 | test('1338');test('1337'); | 21 | test('1338');test('1337'); |
| 22 | 22 | ||
| 23 | ?> | 23 | ?> |
| 24 | --EXPECTF-- | ||
| 25 | 1338 | ||
| 26 | [snuffleupagus][0.0.0.0][disabled_function][drop] Aborted execution on call of the function 'test' in %a, because its argument '$param' content (1337) matched a rule. | ||
| 27 | --CLEAN-- | 24 | --CLEAN-- |
| 28 | <?php | 25 | <?php |
| 29 | unlink("file_to_include1.php"); | 26 | unlink("file_to_include1.php"); |
| 30 | unlink("file_to_include2.php"); | 27 | unlink("file_to_include2.php"); |
| 31 | ?> | 28 | ?> |
| 29 | --EXPECTF-- | ||
| 30 | 1338 | ||
| 31 | |||
| 32 | Fatal error: [snuffleupagus][disabled_function] Aborted execution on call of the function 'test', because its argument '$param' content (1337) matched a rule in %a/src/file_to_include%d.php on line 1 | ||
diff --git a/src/tests/disabled_functions_upper.phpt b/src/tests/disabled_functions_upper.phpt index 92192c5..8fa8ea3 100644 --- a/src/tests/disabled_functions_upper.phpt +++ b/src/tests/disabled_functions_upper.phpt | |||
| @@ -13,4 +13,4 @@ vaR_DUmp("this is a super test"); | |||
| 13 | echo sTRPOs("pouet", "o"); | 13 | echo sTRPOs("pouet", "o"); |
| 14 | ?> | 14 | ?> |
| 15 | --EXPECTF-- | 15 | --EXPECTF-- |
| 16 | [snuffleupagus][0.0.0.0][disabled_function][drop] Aborted execution on call of the function 'system' in %a/tests/disabled_functions_upper.php:%d. | 16 | Fatal error: [snuffleupagus][disabled_function] Aborted execution on call of the function 'system' in %a/disabled_functions_upper.php on line 2 \ No newline at end of file |
diff --git a/src/tests/disabled_functions_variadic.phpt b/src/tests/disabled_functions_variadic.phpt index e2abe67..1e2a0dd 100644 --- a/src/tests/disabled_functions_variadic.phpt +++ b/src/tests/disabled_functions_variadic.phpt | |||
| @@ -13,5 +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 | [snuffleupagus][0.0.0.0][disable_function][error] Snuffleupagus doesn't support variadic functions yet, sorry. Check https://github.com/nbs-system/snuffleupagus/issues/164 for details. | 16 | Warning: [snuffleupagus][disable_function] Snuffleupagus doesn't support variadic functions yet, sorry. Check https://github.com/nbs-system/snuffleupagus/issues/164 for details. in %a/tests/disabled_functions_variadic.php on line %d |
| 17 | [snuffleupagus][0.0.0.0][disabled_function][drop] Aborted execution on call of the function 'foo' in %a/disabled_functions_variadic.php:2. | 17 | |
| 18 | Fatal error: [snuffleupagus][disabled_function] Aborted execution on call of the function 'foo' in %a/tests/disabled_functions_variadic.php on line %d | ||
diff --git a/src/tests/disabled_functions_zero_cidr.phpt b/src/tests/disabled_functions_zero_cidr.phpt index 2980f3f..4e5f930 100644 --- a/src/tests/disabled_functions_zero_cidr.phpt +++ b/src/tests/disabled_functions_zero_cidr.phpt | |||
| @@ -14,4 +14,4 @@ system("echo 42"); | |||
| 14 | printf("1337"); | 14 | printf("1337"); |
| 15 | ?> | 15 | ?> |
| 16 | --EXPECTF-- | 16 | --EXPECTF-- |
| 17 | [snuffleupagus][127.0.0.1][disabled_function][drop] Aborted execution on call of the function 'system' in %a/tests/disabled_functions_zero_cidr.php:2. | 17 | Fatal error: [snuffleupagus][disabled_function] Aborted execution on call of the function 'system' in %a/disabled_functions_zero_cidr.php on line 2 \ No newline at end of file |
diff --git a/src/tests/disabled_native_functions_indirect.phpt b/src/tests/disabled_native_functions_indirect.phpt index 61ea48b..ba355d6 100644 --- a/src/tests/disabled_native_functions_indirect.phpt +++ b/src/tests/disabled_native_functions_indirect.phpt | |||
| @@ -9,4 +9,4 @@ sp.configuration_file={PWD}/config/disabled_functions.ini | |||
| 9 | array_map('system', [1,2,3,4]); | 9 | array_map('system', [1,2,3,4]); |
| 10 | ?> | 10 | ?> |
| 11 | --EXPECTF-- | 11 | --EXPECTF-- |
| 12 | [snuffleupagus][0.0.0.0][disabled_function][drop] Aborted execution on call of the function 'system' in%a/tests/disabled_native_functions_indirect.php:2. | 12 | Fatal error: [snuffleupagus][disabled_function] Aborted execution on call of the function 'system' in %a/disabled_native_functions_indirect.php on line 2 \ No newline at end of file |
diff --git a/src/tests/disabled_user_functions.phpt b/src/tests/disabled_user_functions.phpt index baa0a9a..9c17b79 100644 --- a/src/tests/disabled_user_functions.phpt +++ b/src/tests/disabled_user_functions.phpt | |||
| @@ -12,4 +12,4 @@ function my_super_function() { | |||
| 12 | my_super_function(); | 12 | my_super_function(); |
| 13 | ?> | 13 | ?> |
| 14 | --EXPECTF-- | 14 | --EXPECTF-- |
| 15 | [snuffleupagus][0.0.0.0][disabled_function][drop] Aborted execution on call of the function 'my_super_function' in %a/tests/disabled_user_functions.php:3. | 15 | Fatal error: [snuffleupagus][disabled_function] Aborted execution on call of the function 'my_super_function' in %a/disabled_user_functions.php on line 3 \ No newline at end of file |
diff --git a/src/tests/disabled_user_functions_indirect.phpt b/src/tests/disabled_user_functions_indirect.phpt index 8239002..f663ded 100644 --- a/src/tests/disabled_user_functions_indirect.phpt +++ b/src/tests/disabled_user_functions_indirect.phpt | |||
| @@ -12,4 +12,4 @@ function my_super_function() { | |||
| 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 | [snuffleupagus][0.0.0.0][disabled_function][drop] Aborted execution on call of the function 'my_super_function' in %a/tests/disabled_user_functions_indirect.php:3. | 15 | Fatal error: [snuffleupagus][disabled_function] Aborted execution on call of the function 'my_super_function' in %a/disabled_user_functions_indirect.php on line 3 \ No newline at end of file |
diff --git a/src/tests/dump_eval_blacklist.phpt b/src/tests/dump_eval_blacklist.phpt index 19da8cd..3ae402c 100644 --- a/src/tests/dump_eval_blacklist.phpt +++ b/src/tests/dump_eval_blacklist.phpt | |||
| @@ -35,5 +35,6 @@ if ($res[2] != "GET:get_a='data_get_a' get_b='data_get_b' \n") { | |||
| 35 | ?> | 35 | ?> |
| 36 | --EXPECTF-- | 36 | --EXPECTF-- |
| 37 | Outside of eval: 14 | 37 | Outside of eval: 14 |
| 38 | [snuffleupagus][0.0.0.0][eval][simulation] A call to strlen was tried in eval, in %a/dump_eval_blacklist.php:1, logging it. | 38 | |
| 39 | After eval: 4 | 39 | Warning: [snuffleupagus][eval] A call to strlen was tried in eval, in %a/src/tests/dump_eval_blacklist.php:1, logging it. in %a/src/tests/dump_eval_blacklist.php(9) : eval()'d code on line 1 |
| 40 | After eval: 4 \ No newline at end of file | ||
diff --git a/src/tests/dump_eval_whitelist.phpt b/src/tests/dump_eval_whitelist.phpt index 24ca1d1..cf24dba 100644 --- a/src/tests/dump_eval_whitelist.phpt +++ b/src/tests/dump_eval_whitelist.phpt | |||
| @@ -47,5 +47,6 @@ if ($res[2] != "GET:get_a='data_get_a' get_b='data_get_b' \n") { | |||
| 47 | --EXPECTF-- | 47 | --EXPECTF-- |
| 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 | [snuffleupagus][0.0.0.0][Eval_whitelist][simulation] The function 'my_other_fun' isn't in the eval whitelist, logging its call. | 50 | |
| 51 | Warning: [snuffleupagus][Eval_whitelist] The function 'my_other_fun' isn't in the eval whitelist, logging its call. in %a/tests/dump_eval_whitelist.php on line 12 | ||
| 51 | After eval: my_other_fun: 1234 | 52 | After eval: my_other_fun: 1234 |
diff --git a/src/tests/dump_request.phpt b/src/tests/dump_request.phpt index ceb03d5..a946c92 100644 --- a/src/tests/dump_request.phpt +++ b/src/tests/dump_request.phpt | |||
| @@ -39,5 +39,6 @@ if ($res[2] != "GET:get_a='data_get_a' get_b='data_get_b' \n") { | |||
| 39 | ?> | 39 | ?> |
| 40 | --EXPECTF-- | 40 | --EXPECTF-- |
| 41 | 1 | 41 | 1 |
| 42 | [snuffleupagus][0.0.0.0][disabled_function][simulation] Aborted execution on call of the function 'system' in %a/dump_request.php:%d. | 42 | |
| 43 | 1337 | 43 | Warning: [snuffleupagus][disabled_function] Aborted execution on call of the function 'system' in %a/src/tests/dump_request.php on line 7 |
| 44 | 1337 \ No newline at end of file | ||
diff --git a/src/tests/dump_request_invalid_folder.phpt b/src/tests/dump_request_invalid_folder.phpt index d58f280..0f45b41 100644 --- a/src/tests/dump_request_invalid_folder.phpt +++ b/src/tests/dump_request_invalid_folder.phpt | |||
| @@ -20,5 +20,7 @@ echo "2\n"; | |||
| 20 | ?> | 20 | ?> |
| 21 | --EXPECTF-- | 21 | --EXPECTF-- |
| 22 | 1 | 22 | 1 |
| 23 | [snuffleupagus][0.0.0.0][disabled_function][drop] Aborted execution on call of the function 'system' in %atests/dump_request_invalid_folder.php:3. | 23 | |
| 24 | [snuffleupagus][0.0.0.0][request_logging][error] Unable to create the folder '/root/NON_EXISTENT/FOLDER/PLEASE/'. | 24 | Warning: [snuffleupagus][request_logging] Unable to create the folder '/root/NON_EXISTENT/FOLDER/PLEASE/' in %a/tests/dump_request_invalid_folder.php on line %d |
| 25 | |||
| 26 | Fatal error: [snuffleupagus][disabled_function] Aborted execution on call of the function 'system' in %a/tests/dump_request_invalid_folder.php on line %d | ||
diff --git a/src/tests/dump_request_too_big.phpt b/src/tests/dump_request_too_big.phpt index af146c5..f236882 100644 --- a/src/tests/dump_request_too_big.phpt +++ b/src/tests/dump_request_too_big.phpt | |||
| @@ -39,5 +39,6 @@ if ($res[2] != "GET:get_a='data_get_a' get_b='data_get_b' get_c='aaaaaaaaaaaaaaa | |||
| 39 | ?> | 39 | ?> |
| 40 | --EXPECTF-- | 40 | --EXPECTF-- |
| 41 | 1 | 41 | 1 |
| 42 | [snuffleupagus][127.0.0.1][disabled_function][simulation] Aborted execution on call of the function 'system' in %a/dump_request_too_big.php:%d. | 42 | |
| 43 | Warning: [snuffleupagus][disabled_function] Aborted execution on call of the function 'system' in %a/src/tests/dump_request_too_big.php on line 8 | ||
| 43 | 1337 \ No newline at end of file | 44 | 1337 \ No newline at end of file |
diff --git a/src/tests/dump_segfault1.phpt b/src/tests/dump_segfault1.phpt index 24265d1..bb35aa6 100644 --- a/src/tests/dump_segfault1.phpt +++ b/src/tests/dump_segfault1.phpt | |||
| @@ -9,5 +9,4 @@ sp.configuration_file={PWD}/config/config_dump_segfault1.ini | |||
| 9 | echo strpos("pouet", "p") . "\n"; | 9 | echo strpos("pouet", "p") . "\n"; |
| 10 | ?> | 10 | ?> |
| 11 | --EXPECTF-- | 11 | --EXPECTF-- |
| 12 | [snuffleupagus][0.0.0.0][disabled_function][drop] Aborted execution on return of the function 'strpos' in %a/tests/dump_segfault1.php:2, because the function returned '0', which matched the rule 'test'. | 12 | Fatal error: [snuffleupagus][disabled_function] Aborted execution on return of the function 'strpos', because the function returned '0', which matched the rule 'test' in %a/dump_segfault1.php on line 2 \ No newline at end of file |
| 13 | |||
diff --git a/src/tests/dump_unserialize.phpt b/src/tests/dump_unserialize.phpt index dfa8501..592e9b0 100644 --- a/src/tests/dump_unserialize.phpt +++ b/src/tests/dump_unserialize.phpt | |||
| @@ -35,5 +35,5 @@ if ($res[2] != "GET:get_a='data_get_a' get_b='data_get_b' \n") { | |||
| 35 | ?> | 35 | ?> |
| 36 | --EXPECTF-- | 36 | --EXPECTF-- |
| 37 | 1 | 37 | 1 |
| 38 | [snuffleupagus][0.0.0.0][unserialize][drop] Invalid HMAC for s:1:"a";alyualskdufyhalkdjsfh | 38 | |
| 39 | NULL | 39 | Fatal error: [snuffleupagus][unserialize] Invalid HMAC for s:1:"a";alyualskdufyhalkdjsfh in %a/src/tests/dump_unserialize.php on line 8 \ No newline at end of file |
diff --git a/src/tests/encrypt_cookies_empty_env.phpt b/src/tests/encrypt_cookies_empty_env.phpt index beb4215..252f831 100644 --- a/src/tests/encrypt_cookies_empty_env.phpt +++ b/src/tests/encrypt_cookies_empty_env.phpt | |||
| @@ -12,4 +12,6 @@ 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 | 1 | 15 | Warning: [snuffleupagus][cookie_encryption] The environment variable 'SUPER_ENV_VAR' is empty, cookies are weakly encrypted in Unknown on line 0 |
| 16 | |||
| 17 | Fatal error: [snuffleupagus][cookie_encryption] Something went wrong with the decryption of super_cookie in Unknown on line 0 | ||
diff --git a/src/tests/encrypt_cookies_invalid_decryption.phpt b/src/tests/encrypt_cookies_invalid_decryption.phpt index a5187c1..c64675d 100644 --- a/src/tests/encrypt_cookies_invalid_decryption.phpt +++ b/src/tests/encrypt_cookies_invalid_decryption.phpt | |||
| @@ -16,8 +16,4 @@ EOF; | |||
| 16 | --FILE-- | 16 | --FILE-- |
| 17 | <?php var_dump($_COOKIE); ?> | 17 | <?php var_dump($_COOKIE); ?> |
| 18 | --EXPECT-- | 18 | --EXPECT-- |
| 19 | 19 | Fatal error: [snuffleupagus][cookie_encryption] Something went wrong with the decryption of super_cookie in Unknown on line 0 \ No newline at end of file | |
| 20 | array(1) { | ||
| 21 | ["awful_cookie"]=> | ||
| 22 | string(18) "awful_cookie_value" | ||
| 23 | } | ||
diff --git a/src/tests/encrypt_cookies_invalid_decryption2.phpt b/src/tests/encrypt_cookies_invalid_decryption2.phpt index f18cf6d..b3a55dd 100644 --- a/src/tests/encrypt_cookies_invalid_decryption2.phpt +++ b/src/tests/encrypt_cookies_invalid_decryption2.phpt | |||
| @@ -16,8 +16,4 @@ EOF; | |||
| 16 | --FILE-- | 16 | --FILE-- |
| 17 | <?php var_dump($_COOKIE); ?> | 17 | <?php var_dump($_COOKIE); ?> |
| 18 | --EXPECT-- | 18 | --EXPECT-- |
| 19 | 19 | Fatal error: [snuffleupagus][cookie_encryption] Buffer underflow tentative detected in cookie encryption handling in Unknown on line 0 \ No newline at end of file | |
| 20 | array(1) { | ||
| 21 | ["awful_cookie"]=> | ||
| 22 | string(18) "awful_cookie_value" | ||
| 23 | } | ||
diff --git a/src/tests/encrypt_cookies_invalid_decryption_short_cookie.phpt b/src/tests/encrypt_cookies_invalid_decryption_short_cookie.phpt index e5b6bfc..39f189c 100644 --- a/src/tests/encrypt_cookies_invalid_decryption_short_cookie.phpt +++ b/src/tests/encrypt_cookies_invalid_decryption_short_cookie.phpt | |||
| @@ -16,9 +16,10 @@ EOF; | |||
| 16 | --FILE-- | 16 | --FILE-- |
| 17 | <?php var_dump($_COOKIE); ?> | 17 | <?php var_dump($_COOKIE); ?> |
| 18 | --EXPECT-- | 18 | --EXPECT-- |
| 19 | Warning: [snuffleupagus][cookie_encryption] Buffer underflow tentative detected in cookie encryption handling for super_cookie. Using the cookie 'as it' instead of decrypting it in Unknown on line 0 | ||
| 19 | array(2) { | 20 | array(2) { |
| 20 | ["super_cookie"]=> | 21 | ["super_cookie"]=> |
| 21 | string(3) "AAA" | 22 | string(3) "AAA" |
| 22 | ["awful_cookie"]=> | 23 | ["awful_cookie"]=> |
| 23 | string(18) "awful_cookie_value" | 24 | string(18) "awful_cookie_value" |
| 24 | } | 25 | } \ No newline at end of file |
diff --git a/src/tests/encrypt_cookies_invalid_decryption_simulation.phpt b/src/tests/encrypt_cookies_invalid_decryption_simulation.phpt index 0bd1dc8..d2004b9 100644 --- a/src/tests/encrypt_cookies_invalid_decryption_simulation.phpt +++ b/src/tests/encrypt_cookies_invalid_decryption_simulation.phpt | |||
| @@ -18,10 +18,11 @@ EOF; | |||
| 18 | echo "1337\n"; | 18 | echo "1337\n"; |
| 19 | var_dump($_COOKIE); ?> | 19 | var_dump($_COOKIE); ?> |
| 20 | --EXPECT-- | 20 | --EXPECT-- |
| 21 | Warning: [snuffleupagus][cookie_encryption] Something went wrong with the decryption of super_cookie. Using the cookie 'as it' instead of decrypting it in Unknown on line 0 | ||
| 21 | 1337 | 22 | 1337 |
| 22 | array(2) { | 23 | array(2) { |
| 23 | ["super_cookie"]=> | 24 | ["super_cookie"]=> |
| 24 | string(124) "Wk9NR1RISVNJU05PVEVOQ1JZUFRFREFUQUxMV0hBVFRIRUhFTExJU0hIRUxMQVJFWU9VRE9JTkdaT01Hb2htYXliZXRoaXNpc2Fub2xkc2Vzc2lvbmNvb2tpZQo=" | 25 | string(124) "Wk9NR1RISVNJU05PVEVOQ1JZUFRFREFUQUxMV0hBVFRIRUhFTExJU0hIRUxMQVJFWU9VRE9JTkdaT01Hb2htYXliZXRoaXNpc2Fub2xkc2Vzc2lvbmNvb2tpZQo=" |
| 25 | ["awfulcookie"]=> | 26 | ["awfulcookie"]=> |
| 26 | string(16) "awfulcookievalue" | 27 | string(16) "awfulcookievalue" |
| 27 | } | 28 | } \ No newline at end of file |
diff --git a/src/tests/encrypt_cookies_no_env.phpt b/src/tests/encrypt_cookies_no_env.phpt index 47de27f..c3aeaef 100644 --- a/src/tests/encrypt_cookies_no_env.phpt +++ b/src/tests/encrypt_cookies_no_env.phpt | |||
| @@ -14,6 +14,7 @@ return <<<EOF | |||
| 14 | REMOTE_ADDR=127.0.0.1 | 14 | REMOTE_ADDR=127.0.0.1 |
| 15 | EOF; | 15 | EOF; |
| 16 | --FILE-- | 16 | --FILE-- |
| 17 | <?php echo "1\n\n\n\n\n"; ?> | 17 | <?php echo "1"; ?> |
| 18 | --EXPECT-- | 18 | --EXPECT-- |
| 19 | 1 | 19 | 1 |
| 20 | Fatal error: [snuffleupagus][config] You're trying to use the cookie encryption featureon line 2 without having set the `.cookie_env_var` option in`sp.global`: please set it first in Unknown on line 0 | ||
diff --git a/src/tests/encrypt_cookies_no_key.phpt b/src/tests/encrypt_cookies_no_key.phpt index b54690f..ca81593 100644 --- a/src/tests/encrypt_cookies_no_key.phpt +++ b/src/tests/encrypt_cookies_no_key.phpt | |||
| @@ -14,6 +14,7 @@ return <<<EOF | |||
| 14 | REMOTE_ADDR=127.0.0.1 | 14 | REMOTE_ADDR=127.0.0.1 |
| 15 | EOF; | 15 | EOF; |
| 16 | --FILE-- | 16 | --FILE-- |
| 17 | <?php echo "1\n\n\n\n\n"; ?> | 17 | <?php echo "1"; ?> |
| 18 | --EXPECT-- | 18 | --EXPECT-- |
| 19 | 1 | 19 | 1 |
| 20 | Fatal error: [snuffleupagus][config] You're trying to use the cookie encryption featureon line 2 without having set the `.encryption_key` option in`sp.global`: please set it first in Unknown on line 0 | ||
diff --git a/src/tests/encrypt_regexp_cookies_empty_env.phpt b/src/tests/encrypt_regexp_cookies_empty_env.phpt index 1ee6160..852c32e 100644 --- a/src/tests/encrypt_regexp_cookies_empty_env.phpt +++ b/src/tests/encrypt_regexp_cookies_empty_env.phpt | |||
| @@ -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 | 1 | 19 | Fatal error: [snuffleupagus][cookie_encryption] Buffer underflow tentative detected in cookie encryption handling in Unknown on line 0 \ No newline at end of file |
diff --git a/src/tests/encrypt_regexp_cookies_invalid_decryption.phpt b/src/tests/encrypt_regexp_cookies_invalid_decryption.phpt index 22bed26..0c02806 100644 --- a/src/tests/encrypt_regexp_cookies_invalid_decryption.phpt +++ b/src/tests/encrypt_regexp_cookies_invalid_decryption.phpt | |||
| @@ -16,8 +16,4 @@ EOF; | |||
| 16 | --FILE-- | 16 | --FILE-- |
| 17 | <?php var_dump($_COOKIE); ?> | 17 | <?php var_dump($_COOKIE); ?> |
| 18 | --EXPECT-- | 18 | --EXPECT-- |
| 19 | 19 | Fatal error: [snuffleupagus][cookie_encryption] Something went wrong with the decryption of super_cookie in Unknown on line 0 \ No newline at end of file | |
| 20 | array(1) { | ||
| 21 | ["awful_cookie"]=> | ||
| 22 | string(18) "awful_cookie_value" | ||
| 23 | } | ||
diff --git a/src/tests/encrypt_regexp_cookies_invalid_decryption2.phpt b/src/tests/encrypt_regexp_cookies_invalid_decryption2.phpt index 1a740c0..e75e036 100644 --- a/src/tests/encrypt_regexp_cookies_invalid_decryption2.phpt +++ b/src/tests/encrypt_regexp_cookies_invalid_decryption2.phpt | |||
| @@ -16,8 +16,4 @@ EOF; | |||
| 16 | --FILE-- | 16 | --FILE-- |
| 17 | <?php var_dump($_COOKIE); ?> | 17 | <?php var_dump($_COOKIE); ?> |
| 18 | --EXPECT-- | 18 | --EXPECT-- |
| 19 | 19 | Fatal error: [snuffleupagus][cookie_encryption] Buffer underflow tentative detected in cookie encryption handling in Unknown on line 0 \ No newline at end of file | |
| 20 | array(1) { | ||
| 21 | ["awful_cookie"]=> | ||
| 22 | string(18) "awful_cookie_value" | ||
| 23 | } | ||
diff --git a/src/tests/encrypt_regexp_cookies_no_env.phpt b/src/tests/encrypt_regexp_cookies_no_env.phpt index 37b95c1..1238075 100644 --- a/src/tests/encrypt_regexp_cookies_no_env.phpt +++ b/src/tests/encrypt_regexp_cookies_no_env.phpt | |||
| @@ -14,6 +14,7 @@ return <<<EOF | |||
| 14 | REMOTE_ADDR=127.0.0.1 | 14 | REMOTE_ADDR=127.0.0.1 |
| 15 | EOF; | 15 | EOF; |
| 16 | --FILE-- | 16 | --FILE-- |
| 17 | <?php echo "1\n\n\n\n\n"; ?> | 17 | <?php echo "1"; ?> |
| 18 | --EXPECT-- | 18 | --EXPECT-- |
| 19 | 1 | 19 | 1 |
| 20 | Fatal error: [snuffleupagus][config] You're trying to use the cookie encryption featureon line 2 without having set the `.cookie_env_var` option in`sp.global`: please set it first in Unknown on line 0 | ||
diff --git a/src/tests/encrypt_regexp_cookies_no_key.phpt b/src/tests/encrypt_regexp_cookies_no_key.phpt index 12512ce..5e6db7e 100644 --- a/src/tests/encrypt_regexp_cookies_no_key.phpt +++ b/src/tests/encrypt_regexp_cookies_no_key.phpt | |||
| @@ -14,6 +14,7 @@ return <<<EOF | |||
| 14 | REMOTE_ADDR=127.0.0.1 | 14 | REMOTE_ADDR=127.0.0.1 |
| 15 | EOF; | 15 | EOF; |
| 16 | --FILE-- | 16 | --FILE-- |
| 17 | <?php echo "1\n\n\n\n\n"; ?> | 17 | <?php echo "1"; ?> |
| 18 | --EXPECT-- | 18 | --EXPECT-- |
| 19 | 1 | 19 | 1 |
| 20 | Fatal error: [snuffleupagus][config] You're trying to use the cookie encryption featureon line 2 without having set the `.encryption_key` option in`sp.global`: please set it first in Unknown on line 0 | ||
diff --git a/src/tests/eval_backlist.phpt b/src/tests/eval_backlist.phpt index 20b2c92..f24af96 100644 --- a/src/tests/eval_backlist.phpt +++ b/src/tests/eval_backlist.phpt | |||
| @@ -13,4 +13,5 @@ echo "After eval: $a\n"; | |||
| 13 | ?> | 13 | ?> |
| 14 | --EXPECTF-- | 14 | --EXPECTF-- |
| 15 | Outside of eval: 14 | 15 | Outside of eval: 14 |
| 16 | [snuffleupagus][0.0.0.0][eval][drop] A call to strlen was tried in eval, in%atests/eval_backlist.php:1, dropping it. | 16 | |
| 17 | Fatal error: [snuffleupagus][eval] A call to strlen was tried in eval, in %a/eval_backlist.php:1, dropping it. in %a/eval_backlist.php(4) : eval()'d code on line 1 \ No newline at end of file | ||
diff --git a/src/tests/eval_backlist_list.phpt b/src/tests/eval_backlist_list.phpt index b1c7bfd..5bf0ea8 100644 --- a/src/tests/eval_backlist_list.phpt +++ b/src/tests/eval_backlist_list.phpt | |||
| @@ -13,4 +13,5 @@ echo "After eval: $a\n"; | |||
| 13 | ?> | 13 | ?> |
| 14 | --EXPECTF-- | 14 | --EXPECTF-- |
| 15 | Outside of eval: 14 | 15 | Outside of eval: 14 |
| 16 | [snuffleupagus][0.0.0.0][eval][drop] A call to strlen was tried in eval, in %a/tests/eval_backlist_list.php:1, dropping it. | 16 | |
| 17 | Fatal error: [snuffleupagus][eval] A call to strlen was tried in eval, in %a/eval_backlist_list.php:1, dropping it. in %a/eval_backlist_list.php(4) : eval()'d code on line 1 \ No newline at end of file | ||
diff --git a/src/tests/eval_backlist_simulation.phpt b/src/tests/eval_backlist_simulation.phpt index bea5115..3089c2d 100644 --- a/src/tests/eval_backlist_simulation.phpt +++ b/src/tests/eval_backlist_simulation.phpt | |||
| @@ -13,5 +13,6 @@ echo "After eval: $a\n"; | |||
| 13 | ?> | 13 | ?> |
| 14 | --EXPECTF-- | 14 | --EXPECTF-- |
| 15 | Outside of eval: 14 | 15 | Outside of eval: 14 |
| 16 | [snuffleupagus][0.0.0.0][eval][simulation] A call to strlen was tried in eval, in %a/tests/eval_backlist_simulation.php:1, logging it. | 16 | |
| 17 | After eval: 4 | 17 | Warning: [snuffleupagus][eval] A call to strlen was tried in eval, in %a/eval_backlist_simulation.php:1, logging it. in %a/eval_backlist_simulation.php(4) : eval()'d code on line 1 |
| 18 | After eval: 4 \ No newline at end of file | ||
diff --git a/src/tests/eval_backlist_whitelist.phpt b/src/tests/eval_backlist_whitelist.phpt index 9b0bb55..e5650b2 100644 --- a/src/tests/eval_backlist_whitelist.phpt +++ b/src/tests/eval_backlist_whitelist.phpt | |||
| @@ -20,4 +20,5 @@ echo "After eval: $a\n"; | |||
| 20 | --EXPECTF-- | 20 | --EXPECTF-- |
| 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 | [snuffleupagus][0.0.0.0][Eval_whitelist][drop] The function 'cos' isn't in the eval whitelist, dropping its call. | 23 | |
| 24 | Fatal error: [snuffleupagus][Eval_whitelist] The function 'cos' isn't in the eval whitelist, dropping its call. in %a/eval_backlist_whitelist.php(10) : eval()'d code on line 1 \ No newline at end of file | ||
diff --git a/src/tests/eval_backlist_whitelist_builtin.phpt b/src/tests/eval_backlist_whitelist_builtin.phpt index 47d223a..2f8bc19 100644 --- a/src/tests/eval_backlist_whitelist_builtin.phpt +++ b/src/tests/eval_backlist_whitelist_builtin.phpt | |||
| @@ -20,4 +20,5 @@ echo "After eval: $a\n"; | |||
| 20 | --EXPECTF-- | 20 | --EXPECTF-- |
| 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 | [snuffleupagus][0.0.0.0][Eval_whitelist][drop] The function 'cos' isn't in the eval whitelist, dropping its call. | 23 | |
| 24 | Fatal error: [snuffleupagus][Eval_whitelist] The function 'cos' isn't in the eval whitelist, dropping its call. in %a/eval_backlist_whitelist_builtin.php(10) : eval()'d code on line 1 \ No newline at end of file | ||
diff --git a/src/tests/eval_whitelist.phpt b/src/tests/eval_whitelist.phpt index 1611288..a602d0d 100644 --- a/src/tests/eval_whitelist.phpt +++ b/src/tests/eval_whitelist.phpt | |||
| @@ -24,4 +24,5 @@ echo "After eval: $a\n"; | |||
| 24 | --EXPECTF-- | 24 | --EXPECTF-- |
| 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 | [snuffleupagus][0.0.0.0][Eval_whitelist][drop] The function 'my_other_fun' isn't in the eval whitelist, dropping its call. | 27 | |
| 28 | Fatal error: [snuffleupagus][Eval_whitelist] The function 'my_other_fun' isn't in the eval whitelist, dropping its call. in %a/eval_whitelist.php on line 7 \ No newline at end of file | ||
diff --git a/src/tests/eval_whitelist_builtin.phpt b/src/tests/eval_whitelist_builtin.phpt index bd7c2ac..5ed383d 100644 --- a/src/tests/eval_whitelist_builtin.phpt +++ b/src/tests/eval_whitelist_builtin.phpt | |||
| @@ -16,4 +16,5 @@ echo "After eval: $a\n"; | |||
| 16 | --EXPECTF-- | 16 | --EXPECTF-- |
| 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 | [snuffleupagus][0.0.0.0][Eval_whitelist][drop] The function 'sin' isn't in the eval whitelist, dropping its call. | 19 | |
| 20 | Fatal error: [snuffleupagus][Eval_whitelist] The function 'sin' isn't in the eval whitelist, dropping its call. in %a/eval_whitelist_builtin.php(6) : eval()'d code on line 1 \ No newline at end of file | ||
diff --git a/src/tests/eval_whitelist_include_then_user.phpt b/src/tests/eval_whitelist_include_then_user.phpt index 6d4e36a..5ff3bff 100644 --- a/src/tests/eval_whitelist_include_then_user.phpt +++ b/src/tests/eval_whitelist_include_then_user.phpt | |||
| @@ -26,4 +26,5 @@ unlink($dir . '/test.bla'); | |||
| 26 | --EXPECTF-- | 26 | --EXPECTF-- |
| 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 | [snuffleupagus][0.0.0.0][Eval_whitelist][drop] The function 'sin' isn't in the eval whitelist, dropping its call. | 29 | |
| 30 | Fatal error: [snuffleupagus][Eval_whitelist] The function 'sin' isn't in the eval whitelist, dropping its call. in %a/test.bla on line 1 \ No newline at end of file | ||
diff --git a/src/tests/eval_whitelist_simulation.phpt b/src/tests/eval_whitelist_simulation.phpt index ff2f970..c4a3efa 100644 --- a/src/tests/eval_whitelist_simulation.phpt +++ b/src/tests/eval_whitelist_simulation.phpt | |||
| @@ -24,5 +24,6 @@ echo "After eval: $a\n"; | |||
| 24 | --EXPECTF-- | 24 | --EXPECTF-- |
| 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 | [snuffleupagus][0.0.0.0][Eval_whitelist][simulation] The function 'my_other_fun' isn't in the eval whitelist, logging its call. | 27 | |
| 28 | Warning: [snuffleupagus][Eval_whitelist] The function 'my_other_fun' isn't in the eval whitelist, logging its call. in %a/eval_whitelist_simulation.php on line 7 | ||
| 28 | 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_whitelist_user_then_builtin.phpt b/src/tests/eval_whitelist_user_then_builtin.phpt index 8db36fc..dbc7d93 100644 --- a/src/tests/eval_whitelist_user_then_builtin.phpt +++ b/src/tests/eval_whitelist_user_then_builtin.phpt | |||
| @@ -20,4 +20,5 @@ echo "After eval: $a\n"; | |||
| 20 | ?> | 20 | ?> |
| 21 | --EXPECTF-- | 21 | --EXPECTF-- |
| 22 | Outside of eval: -0.54402111088937 | 22 | Outside of eval: -0.54402111088937 |
| 23 | [snuffleupagus][0.0.0.0][Eval_whitelist][drop] The function 'sin' isn't in the eval whitelist, dropping its call. | 23 | |
| 24 | Fatal error: [snuffleupagus][Eval_whitelist] The function 'sin' isn't in the eval whitelist, dropping its call. in %a/eval_whitelist_user_then_builtin.php on line 4 \ No newline at end of file | ||
diff --git a/src/tests/glob_config.phpt b/src/tests/glob_config.phpt index 6a3d3d5..b557c8b 100644 --- a/src/tests/glob_config.phpt +++ b/src/tests/glob_config.phpt | |||
| @@ -16,8 +16,8 @@ foo(); | |||
| 16 | bla(); | 16 | bla(); |
| 17 | ?> | 17 | ?> |
| 18 | --EXPECTF-- | 18 | --EXPECTF-- |
| 19 | [snuffleupagus][0.0.0.0][disabled_function][simulation] Aborted execution on call of the function 'foo' in %s/tests/glob_config.php:%d. | 19 | Warning: [snuffleupagus][disabled_function] Aborted execution on call of the function 'foo' in %a/glob_config.php on line 3 |
| 20 | 1 | 20 | 1 |
| 21 | [snuffleupagus][0.0.0.0][disabled_function][simulation] Aborted execution on call of the function 'bla' in %s/tests/glob_config.php:%d. | ||
| 22 | 2 | ||
| 23 | 21 | ||
| 22 | Warning: [snuffleupagus][disabled_function] Aborted execution on call of the function 'bla' in %a/glob_config.php on line 6 | ||
| 23 | 2 \ No newline at end of file | ||
diff --git a/src/tests/inexistent_conf_file.phpt b/src/tests/inexistent_conf_file.phpt index c7c3fcd..ebe2aaa 100644 --- a/src/tests/inexistent_conf_file.phpt +++ b/src/tests/inexistent_conf_file.phpt | |||
| @@ -7,4 +7,6 @@ sp.configuration_file={PWD}/config/unexistent_configuration_file.ini | |||
| 7 | --FILE-- | 7 | --FILE-- |
| 8 | <?php ?> | 8 | <?php ?> |
| 9 | --EXPECTF-- | 9 | --EXPECTF-- |
| 10 | [snuffleupagus][0.0.0.0][config][error] Could not open configuration file %a/tests/config/unexistent_configuration_file.ini : No such file or directory | 10 | PHP Fatal error: [snuffleupagus][config] Could not open configuration file %a/config/unexistent_configuration_file.ini : No such file or directory in Unknown on line 0 |
| 11 | |||
| 12 | Fatal error: [snuffleupagus][config] Could not open configuration file %a/config/unexistent_configuration_file.ini : No such file or directory in Unknown on line 0 \ No newline at end of file | ||
diff --git a/src/tests/inexistent_conf_file_list.phpt b/src/tests/inexistent_conf_file_list.phpt index 2f6e204..6b3026e 100644 --- a/src/tests/inexistent_conf_file_list.phpt +++ b/src/tests/inexistent_conf_file_list.phpt | |||
| @@ -7,4 +7,6 @@ sp.configuration_file={PWD}/../../config/default.rules,{PWD}/non_existent_config | |||
| 7 | --FILE-- | 7 | --FILE-- |
| 8 | <?php ?> | 8 | <?php ?> |
| 9 | --EXPECTF-- | 9 | --EXPECTF-- |
| 10 | [snuffleupagus][0.0.0.0][config][error] Could not open configuration file%a/non_existent_configuration_file : No such file or directory | 10 | PHP Fatal error: [snuffleupagus][config] Could not open configuration file %a/non_existent_configuration_file : No such file or directory in Unknown on line 0 |
| 11 | |||
| 12 | Fatal error: [snuffleupagus][config] Could not open configuration file %a/non_existent_configuration_file : No such file or directory in Unknown on line 0 \ No newline at end of file | ||
diff --git a/src/tests/multi_config.phpt b/src/tests/multi_config.phpt index c5509a4..2bdc372 100644 --- a/src/tests/multi_config.phpt +++ b/src/tests/multi_config.phpt | |||
| @@ -16,8 +16,8 @@ foo(); | |||
| 16 | bla(); | 16 | bla(); |
| 17 | ?> | 17 | ?> |
| 18 | --EXPECTF-- | 18 | --EXPECTF-- |
| 19 | [snuffleupagus][0.0.0.0][disabled_function][simulation] Aborted execution on call of the function 'foo' in %s/tests/multi_config.php:%d. | 19 | Warning: [snuffleupagus][disabled_function] Aborted execution on call of the function 'foo' in %a/multi_config.php on line 3 |
| 20 | 1 | 20 | 1 |
| 21 | [snuffleupagus][0.0.0.0][disabled_function][simulation] Aborted execution on call of the function 'bla' in %s/tests/multi_config.php:%d. | ||
| 22 | 2 | ||
| 23 | 21 | ||
| 22 | Warning: [snuffleupagus][disabled_function] Aborted execution on call of the function 'bla' in %a/multi_config.php on line 6 | ||
| 23 | 2 \ No newline at end of file | ||
diff --git a/src/tests/nested_eval_blacklist.phpt b/src/tests/nested_eval_blacklist.phpt index b12bf93..9671a65 100644 --- a/src/tests/nested_eval_blacklist.phpt +++ b/src/tests/nested_eval_blacklist.phpt | |||
| @@ -25,4 +25,5 @@ Outside of eval: 14 | |||
| 25 | Inception lvl 1... | 25 | Inception lvl 1... |
| 26 | Inception lvl 2... | 26 | Inception lvl 2... |
| 27 | Inception lvl 3... | 27 | Inception lvl 3... |
| 28 | [snuffleupagus][0.0.0.0][eval][drop] A call to strlen was tried in eval, in %a/tests/nested_eval_blacklist.php(5) : eval()'d code(4) : eval()'d code:3, dropping it. | 28 | |
| 29 | Fatal error: [snuffleupagus][eval] A call to strlen was tried in eval, in %a/nested_eval_blacklist.php(5) : eval()'d code(4) : eval()'d code:3, dropping it. in %a/nested_eval_blacklist.php(5) : eval()'d code(4) : eval()'d code(4) : eval()'d code on line 3 \ No newline at end of file | ||
diff --git a/src/tests/nested_eval_blacklist2.phpt b/src/tests/nested_eval_blacklist2.phpt index 3b13e30..aee41db 100644 --- a/src/tests/nested_eval_blacklist2.phpt +++ b/src/tests/nested_eval_blacklist2.phpt | |||
| @@ -25,4 +25,5 @@ Outside of eval: 14 | |||
| 25 | Inception lvl 1... | 25 | Inception lvl 1... |
| 26 | Inception lvl 2... | 26 | Inception lvl 2... |
| 27 | Inception lvl 3... | 27 | Inception lvl 3... |
| 28 | [snuffleupagus][0.0.0.0][eval][drop] A call to strlen was tried in eval, in %a/tests/nested_eval_blacklist2.php(5) : eval()'d code:7, dropping it. | 28 | |
| 29 | Fatal error: [snuffleupagus][eval] A call to strlen was tried in eval, in %a/nested_eval_blacklist2.php(5) : eval()'d code:7, dropping it. in %a/nested_eval_blacklist2.php(5) : eval()'d code(4) : eval()'d code on line 7 \ No newline at end of file | ||
diff --git a/src/tests/noncore_function_hooking.phpt b/src/tests/noncore_function_hooking.phpt index 2cb4686..52bb114 100644 --- a/src/tests/noncore_function_hooking.phpt +++ b/src/tests/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 | [snuffleupagus][0.0.0.0][disabled_function][drop] Aborted execution on call of the function 'custom_fun' in %a/tests/noncore_function_hooking.php:3. | 15 | Fatal error: [snuffleupagus][disabled_function] Aborted execution on call of the function 'custom_fun' in %a/noncore_function_hooking.php on line 3 \ No newline at end of file |
diff --git a/src/tests/unserialize_fail.phpt b/src/tests/unserialize_fail.phpt index 5c0bb80..c6411a5 100644 --- a/src/tests/unserialize_fail.phpt +++ b/src/tests/unserialize_fail.phpt | |||
| @@ -12,12 +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 | [snuffleupagus][0.0.0.0][unserialize][drop] The serialized object is too small. | 15 | Fatal error: [snuffleupagus][unserialize] The serialized object is too small. in %a/unserialize_fail.php on line 2 \ No newline at end of file |
| 16 | bool(false) | ||
| 17 | [snuffleupagus][0.0.0.0][unserialize][drop] Invalid HMAC for s:1:"a";alyualskdufyhalkdjsfh | ||
| 18 | NULL | ||
| 19 | [snuffleupagus][0.0.0.0][unserialize][drop] The serialized object is too small. | ||
| 20 | bool(false) | ||
| 21 | |||
| 22 | Warning: unserialize() expects at most 2 parameters, 4 given in %a/tests/unserialize_fail.php on line %d | ||
| 23 | bool(false) \ No newline at end of file | ||
diff --git a/src/tests/unserialize_sim.phpt b/src/tests/unserialize_sim.phpt index 0d8280c..68f8172 100644 --- a/src/tests/unserialize_sim.phpt +++ b/src/tests/unserialize_sim.phpt | |||
| @@ -11,7 +11,8 @@ echo $a; | |||
| 11 | var_dump(unserialize($a)); | 11 | var_dump(unserialize($a)); |
| 12 | var_dump(unserialize('s:1:"a";alyualskdufyhalkdjsfhalkjdhflaksjdfhlkasdhflkahdawkuerylksjdfhlkssjgdflaksjdh1337sjdf')); | 12 | var_dump(unserialize('s:1:"a";alyualskdufyhalkdjsfhalkjdhflaksjdfhlkasdhflkahdawkuerylksjdfhlkssjgdflaksjdh1337sjdf')); |
| 13 | ?> | 13 | ?> |
| 14 | --EXPECT-- | 14 | --EXPECTF-- |
| 15 | s:1:"a";650609b417904d0d9bbf1fc44a975d13ecdf6b02b715c1a06271fb3b673f25b1string(1) "a" | 15 | s:1:"a";650609b417904d0d9bbf1fc44a975d13ecdf6b02b715c1a06271fb3b673f25b1string(1) "a" |
| 16 | [snuffleupagus][0.0.0.0][unserialize][simulation] Invalid HMAC for s:1:"a";alyualskdufyhalkdjsfh | 16 | |
| 17 | Warning: [snuffleupagus][unserialize] Invalid HMAC for s:1:"a";alyualskdufyhalkdjsfh in %a/src/tests/unserialize_sim.php on line 5 | ||
| 17 | string(1) "a" | 18 | string(1) "a" |
diff --git a/src/tests/upload_validation.phpt b/src/tests/upload_validation.phpt index c802c16..bdcbc60 100644 --- a/src/tests/upload_validation.phpt +++ b/src/tests/upload_validation.phpt | |||
| @@ -14,3 +14,4 @@ echo 1; | |||
| 14 | ?> | 14 | ?> |
| 15 | --EXPECTF-- | 15 | --EXPECTF-- |
| 16 | 1 | 16 | 1 |
| 17 | Fatal error: [snuffleupagus][config] A rule can't be enabled and disabled on line 1 in Unknown on line 0 \ No newline at end of file | ||
diff --git a/src/tests/upload_validation_invalid.phpt b/src/tests/upload_validation_invalid.phpt index 25a6750..0dbdbbb 100644 --- a/src/tests/upload_validation_invalid.phpt +++ b/src/tests/upload_validation_invalid.phpt | |||
| @@ -13,5 +13,9 @@ Content-Disposition: form-data; name="test"; filename="test.php" | |||
| 13 | echo 1; | 13 | echo 1; |
| 14 | ?> | 14 | ?> |
| 15 | --EXPECTF-- | 15 | --EXPECTF-- |
| 16 | [snuffleupagus][0.0.0.0][upload_validation][error] Could not call './tests/data/upload_invalid.sh' : Exec format error | 16 | Warning: [snuffleupagus][upload_validation] Could not call './tests/data/upload_invalid.sh' : Exec format error in Unknown on line 0 |
| 17 | [snuffleupagus][0.0.0.0][upload_validation][drop] The upload of test.php on ? was rejected. | 17 | X-Powered-By: PHP/%a |
| 18 | Content-type: text/html; charset=UTF-8%a | ||
| 19 | %a | ||
| 20 | |||
| 21 | Fatal error: [snuffleupagus][upload_validation] The upload of test.php on ? was rejected. in Unknown on line 0 | ||
diff --git a/src/tests/upload_validation_ko.phpt b/src/tests/upload_validation_ko.phpt index 8579a17..d632e60 100644 --- a/src/tests/upload_validation_ko.phpt +++ b/src/tests/upload_validation_ko.phpt | |||
| @@ -11,4 +11,4 @@ Content-Disposition: form-data; name="test"; filename="test.php" | |||
| 11 | --blabla-- | 11 | --blabla-- |
| 12 | --FILE-- | 12 | --FILE-- |
| 13 | --EXPECTF-- | 13 | --EXPECTF-- |
| 14 | [snuffleupagus][0.0.0.0][upload_validation][drop] The upload of test.php on ? was rejected. | 14 | Fatal error: [snuffleupagus][upload_validation] The upload of test.php on ? was rejected. in Unknown on line 0 \ No newline at end of file |
diff --git a/src/tests/upload_validation_ko_simulation.phpt b/src/tests/upload_validation_ko_simulation.phpt index d281411..b47c405 100644 --- a/src/tests/upload_validation_ko_simulation.phpt +++ b/src/tests/upload_validation_ko_simulation.phpt | |||
| @@ -12,4 +12,5 @@ Content-Disposition: form-data; name="test"; filename="test.php" | |||
| 12 | --FILE-- | 12 | --FILE-- |
| 13 | <?php echo 1337; ?> | 13 | <?php echo 1337; ?> |
| 14 | --EXPECTF-- | 14 | --EXPECTF-- |
| 15 | 1337 | 15 | Warning: [snuffleupagus][upload_validation] The upload of test.php on ? was rejected. in Unknown on line 0 |
| 16 | 1337 \ No newline at end of file | ||
diff --git a/src/tests/upload_validation_no_exec.phpt b/src/tests/upload_validation_no_exec.phpt index 90a58da..ca52017 100644 --- a/src/tests/upload_validation_no_exec.phpt +++ b/src/tests/upload_validation_no_exec.phpt | |||
| @@ -12,7 +12,6 @@ Content-Disposition: form-data; name="test"; filename="test.php" | |||
| 12 | --FILE-- | 12 | --FILE-- |
| 13 | <?php | 13 | <?php |
| 14 | var_dump($_FILES); | 14 | var_dump($_FILES); |
| 15 | echo "\n\n\n\n\n\n\n\n\n\n\n\n\n\n"; | ||
| 16 | ?> | 15 | ?> |
| 17 | --EXPECTF-- | 16 | --EXPECTF-- |
| 18 | array(1) { | 17 | array(1) { |
| @@ -30,3 +29,5 @@ array(1) { | |||
| 30 | int(0) | 29 | int(0) |
| 31 | } | 30 | } |
| 32 | } | 31 | } |
| 32 | |||
| 33 | Fatal error: [snuffleupagus][config] The `script` (tests/data/upload_no_exec.sh) isn't executable on line 1 in Unknown on line 0 | ||
diff --git a/src/tests/upload_validation_real.phpt b/src/tests/upload_validation_real.phpt index f1d29d4..d419590 100644 --- a/src/tests/upload_validation_real.phpt +++ b/src/tests/upload_validation_real.phpt | |||
| @@ -41,5 +41,4 @@ Some random text again | |||
| 41 | echo 1; | 41 | echo 1; |
| 42 | ?> | 42 | ?> |
| 43 | --EXPECTF-- | 43 | --EXPECTF-- |
| 44 | Upload_validation: Found an opcode: INIT_FCALL | 44 | Fatal error: [snuffleupagus][upload_validation] The upload of test.php on ? was rejected. in Unknown on line 0 \ No newline at end of file |
| 45 | [snuffleupagus][0.0.0.0][upload_validation][drop] The upload of test.php on ? was rejected. | ||
