From 912080926895ba932a877a09c2e7d2592ce34f06 Mon Sep 17 00:00:00 2001 From: brown-midas Date: Thu, 7 Dec 2023 10:30:49 +0000 Subject: make 'phar' filenames work in sp.disabled_functions, fixes #472 --- src/sp_config_keywords.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/sp_config_keywords.c b/src/sp_config_keywords.c index e7ff3e6..6733503 100644 --- a/src/sp_config_keywords.c +++ b/src/sp_config_keywords.c @@ -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; } -- cgit v1.3