Skip to content

Commit

Permalink
make 'phar' filenames work in sp.disabled_functions
Browse files Browse the repository at this point in the history
This fixes #472
  • Loading branch information
jvoisin committed Dec 7, 2023
2 parents 78ce29e + 9120809 commit 4c37ccb
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/sp_config_keywords.c
Original file line number Diff line number Diff line change
Expand Up @@ -368,7 +368,7 @@ SP_PARSE_FN(parse_disabled_functions) {
goto out;
}
if (df->filename && (*ZSTR_VAL(df->filename) != '/') &&
(0 != strncmp(ZSTR_VAL(df->filename), "phar://", sizeof("phar://")))) {
(0 != strncmp(ZSTR_VAL(df->filename), "phar://", strlen("phar://")))) {
sp_log_err("config", "Invalid configuration line: 'sp.disabled_functions': '.filename' must be an absolute path or a phar archive on line %zu", parsed_rule->lineno);
goto out;
}
Expand Down

0 comments on commit 4c37ccb

Please sign in to comment.