summaryrefslogtreecommitdiff
path: root/src/sp_config_keywords.c
diff options
context:
space:
mode:
authorjvoisin2017-11-29 11:36:57 +0100
committerGitHub2017-11-29 11:36:57 +0100
commit10437787b0e8ede80976de4a1c22775fc1282f36 (patch)
tree1ab911ab000989b98449475eda655a797e278049 /src/sp_config_keywords.c
parent8df77884f38e7a7334b56aafe2f441567f175af8 (diff)
Implement eval hooking
It's not possible to hook the `eval` builtin like other functions.
Diffstat (limited to 'src/sp_config_keywords.c')
-rw-r--r--src/sp_config_keywords.c6
1 files changed, 6 insertions, 0 deletions
diff --git a/src/sp_config_keywords.c b/src/sp_config_keywords.c
index 077d78f..0e52846 100644
--- a/src/sp_config_keywords.c
+++ b/src/sp_config_keywords.c
@@ -24,6 +24,9 @@ static int get_construct_type(sp_disabled_function const *const df) {
24 .type = ZEND_STRLEN, 24 .type = ZEND_STRLEN,
25 .keys = {"strlen", NULL} 25 .keys = {"strlen", NULL}
26 },{ 26 },{
27 .type = ZEND_EVAL_CODE,
28 .keys = {"eval", NULL}
29 },{
27 .type = 0, 30 .type = 0,
28 .keys = {NULL} 31 .keys = {NULL}
29 } 32 }
@@ -299,6 +302,9 @@ int parse_disabled_functions(char *line) {
299 case ZEND_INCLUDE_OR_EVAL: 302 case ZEND_INCLUDE_OR_EVAL:
300 sp_list_insert(SNUFFLEUPAGUS_G(config).config_disabled_constructs->construct_include, df); 303 sp_list_insert(SNUFFLEUPAGUS_G(config).config_disabled_constructs->construct_include, df);
301 return ret; 304 return ret;
305 case ZEND_EVAL_CODE:
306 sp_list_insert(SNUFFLEUPAGUS_G(config).config_disabled_constructs->construct_eval, df);
307 return ret;
302 case ZEND_ECHO: 308 case ZEND_ECHO:
303 default: 309 default:
304 break; 310 break;