diff options
| author | crKontrol | 2018-08-02 14:41:20 +0200 |
|---|---|---|
| committer | Thibault "bui" Koechlin | 2018-08-02 14:41:20 +0200 |
| commit | 69b95a117957ceaab16f5dfb68a41500a7958ba9 (patch) | |
| tree | 23568b0770d5e8667f94ca300a1e95be2bb62022 /src/sp_config_keywords.c | |
| parent | 210a90e7fe5e45b55031ce1a7d02539ea3185879 (diff) | |
fix #203 (#204)
sp.disable_function.function().filename doesn't take phar:///
Diffstat (limited to 'src/sp_config_keywords.c')
| -rw-r--r-- | src/sp_config_keywords.c | 16 |
1 files changed, 10 insertions, 6 deletions
diff --git a/src/sp_config_keywords.c b/src/sp_config_keywords.c index 8e1c2dc..fb20a43 100644 --- a/src/sp_config_keywords.c +++ b/src/sp_config_keywords.c | |||
| @@ -278,7 +278,8 @@ int parse_cookie(char *line) { | |||
| 278 | return -1; | 278 | return -1; |
| 279 | } | 279 | } |
| 280 | } | 280 | } |
| 281 | SNUFFLEUPAGUS_G(config).config_cookie->cookies = | 281 | SNUFFLEUPAGUS_G(config) |
| 282 | .config_cookie->cookies = | ||
| 282 | sp_list_insert(SNUFFLEUPAGUS_G(config).config_cookie->cookies, cookie); | 283 | sp_list_insert(SNUFFLEUPAGUS_G(config).config_cookie->cookies, cookie); |
| 283 | return SUCCESS; | 284 | return SUCCESS; |
| 284 | } | 285 | } |
| @@ -392,11 +393,14 @@ int parse_disabled_functions(char *line) { | |||
| 392 | " must take a function name on line %zu.", | 393 | " must take a function name on line %zu.", |
| 393 | line, sp_line_no); | 394 | line, sp_line_no); |
| 394 | return -1; | 395 | return -1; |
| 395 | } else if (df->filename && *ZSTR_VAL(df->filename) != '/') { | 396 | } else if (df->filename && (*ZSTR_VAL(df->filename) != '/') && |
| 396 | sp_log_err("config", | 397 | (0 != |
| 397 | "Invalid configuration line: 'sp.disabled_functions%s':" | 398 | strncmp(ZSTR_VAL(df->filename), "phar://", strlen("phar://")))) { |
| 398 | "'.filename' must be an absolute path on line %zu.", | 399 | sp_log_err( |
| 399 | line, sp_line_no); | 400 | "config", |
| 401 | "Invalid configuration line: 'sp.disabled_functions%s':" | ||
| 402 | "'.filename' must be an absolute path or a phar archive on line %zu.", | ||
| 403 | line, sp_line_no); | ||
| 400 | return -1; | 404 | return -1; |
| 401 | } else if (!(allow ^ drop)) { | 405 | } else if (!(allow ^ drop)) { |
| 402 | sp_log_err("config", | 406 | sp_log_err("config", |
