diff options
| author | jvoisin | 2018-01-04 15:59:59 +0100 |
|---|---|---|
| committer | GitHub | 2018-01-04 15:59:59 +0100 |
| commit | 3b113be573cdbca20ce9ec9c0a6efb25ccf51db5 (patch) | |
| tree | 5fabbd1da7cd740f26354ffbd2234eba71ffdead /src/sp_execute.c | |
| parent | 84e423300c440e96c34ada2620e0f78f827592e8 (diff) | |
Eval blacklist
Add support for eval filtering, only blacklist for now
Diffstat (limited to 'src/sp_execute.c')
| -rw-r--r-- | src/sp_execute.c | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/src/sp_execute.c b/src/sp_execute.c index 7dd0798..a50bfd5 100644 --- a/src/sp_execute.c +++ b/src/sp_execute.c | |||
| @@ -68,6 +68,7 @@ static void sp_execute_ex(zend_execute_data *execute_data) { | |||
| 68 | } | 68 | } |
| 69 | 69 | ||
| 70 | if (execute_data->func->op_array.type == ZEND_EVAL_CODE) { | 70 | if (execute_data->func->op_array.type == ZEND_EVAL_CODE) { |
| 71 | SNUFFLEUPAGUS_G(in_eval) = true; | ||
| 71 | sp_list_node *config = | 72 | sp_list_node *config = |
| 72 | SNUFFLEUPAGUS_G(config).config_disabled_constructs->construct_eval; | 73 | SNUFFLEUPAGUS_G(config).config_disabled_constructs->construct_eval; |
| 73 | char *filename = get_eval_filename((char *)zend_get_executed_filename()); | 74 | char *filename = get_eval_filename((char *)zend_get_executed_filename()); |
| @@ -86,6 +87,8 @@ static void sp_execute_ex(zend_execute_data *execute_data) { | |||
| 86 | if (true == should_drop_on_ret(execute_data->return_value, execute_data)) { | 87 | if (true == should_drop_on_ret(execute_data->return_value, execute_data)) { |
| 87 | sp_terminate(); | 88 | sp_terminate(); |
| 88 | } | 89 | } |
| 90 | |||
| 91 | SNUFFLEUPAGUS_G(in_eval) = false; | ||
| 89 | } | 92 | } |
| 90 | 93 | ||
| 91 | static int sp_stream_open(const char *filename, zend_file_handle *handle) { | 94 | static int sp_stream_open(const char *filename, zend_file_handle *handle) { |
