summaryrefslogtreecommitdiff
path: root/src/sp_execute.c
diff options
context:
space:
mode:
authorjvoisin2022-07-12 20:57:19 +0200
committerjvoisin2022-07-12 21:15:07 +0200
commit423e133c569b7d749cba3e1b97e9e138e5f0f892 (patch)
tree34d169dc6bf6543a8dcfba9de498650d5b7f512f /src/sp_execute.c
parentd310283dd5b2dbd74d5077c436911fce4e2d2b7e (diff)
Log `eval` content when matching on its parameter
Diffstat (limited to 'src/sp_execute.c')
-rw-r--r--src/sp_execute.c8
1 files changed, 5 insertions, 3 deletions
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
136 if (UNEXPECTED(EX(func)->op_array.type == ZEND_EVAL_CODE)) { 136 if (UNEXPECTED(EX(func)->op_array.type == ZEND_EVAL_CODE)) {
137 const sp_list_node *config = zend_hash_str_find_ptr(SPCFG(disabled_functions), ZEND_STRL("eval")); 137 const sp_list_node *config = zend_hash_str_find_ptr(SPCFG(disabled_functions), ZEND_STRL("eval"));
138 138
139 zend_string *filename = get_eval_filename(zend_get_executed_filename()); 139#if PHP_VERSION_ID >= 80000
140 is_builtin_matching(filename, "eval", NULL, config, SPCFG(disabled_functions)); 140 is_builtin_matching(SPG(eval_source_string), "eval", "code", config, SPCFG(disabled_functions));
141 zend_string_release(filename); 141#else
142 is_builtin_matching(Z_STR_P(SPG(eval_source_string)), "eval", "code", config, SPCFG(disabled_functions));
143#endif
142 144
143 SPG(in_eval)++; 145 SPG(in_eval)++;
144 sp_orig_execute(execute_data); 146 sp_orig_execute(execute_data);