From 423e133c569b7d749cba3e1b97e9e138e5f0f892 Mon Sep 17 00:00:00 2001 From: jvoisin Date: Tue, 12 Jul 2022 20:57:19 +0200 Subject: Log `eval` content when matching on its parameter --- src/sp_execute.c | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) (limited to 'src/sp_execute.c') diff --git a/src/sp_execute.c b/src/sp_execute.c index a8798e4..2b8bb2e 100644 --- a/src/sp_execute.c +++ b/src/sp_execute.c @@ -136,9 +136,11 @@ static inline void sp_execute_handler(INTERNAL_FUNCTION_PARAMETERS, bool interna if (UNEXPECTED(EX(func)->op_array.type == ZEND_EVAL_CODE)) { const sp_list_node *config = zend_hash_str_find_ptr(SPCFG(disabled_functions), ZEND_STRL("eval")); - zend_string *filename = get_eval_filename(zend_get_executed_filename()); - is_builtin_matching(filename, "eval", NULL, config, SPCFG(disabled_functions)); - zend_string_release(filename); +#if PHP_VERSION_ID >= 80000 + is_builtin_matching(SPG(eval_source_string), "eval", "code", config, SPCFG(disabled_functions)); +#else + is_builtin_matching(Z_STR_P(SPG(eval_source_string)), "eval", "code", config, SPCFG(disabled_functions)); +#endif SPG(in_eval)++; sp_orig_execute(execute_data); -- cgit v1.3