diff options
| author | Stefan | 2010-03-04 21:52:03 +0100 |
|---|---|---|
| committer | Stefan | 2010-03-04 21:52:03 +0100 |
| commit | 8d22a97250131c7246ee58f35d27445a15c619c3 (patch) | |
| tree | f069df544fb46d989f634119b2ed452304a8e53c /execute.c | |
| parent | 2a789c5c933496f4d374a73f3b9b42704c4c8502 (diff) | |
Changed simulation mode now affects (dis)allowed functions
Diffstat (limited to 'execute.c')
| -rw-r--r-- | execute.c | 18 |
1 files changed, 13 insertions, 5 deletions
| @@ -1577,7 +1577,7 @@ static void suhosin_execute_internal(zend_execute_data *execute_data_ptr, int re | |||
| 1577 | #ifdef ZEND_ENGINE_2 | 1577 | #ifdef ZEND_ENGINE_2 |
| 1578 | return_value = (*(temp_variable *)((char *) execute_data_ptr->Ts + execute_data_ptr->opline->result.u.var)).var.ptr; | 1578 | return_value = (*(temp_variable *)((char *) execute_data_ptr->Ts + execute_data_ptr->opline->result.u.var)).var.ptr; |
| 1579 | #else | 1579 | #else |
| 1580 | return_value = execute_data_ptr->Ts[execute_data_ptr->opline->result.u.var].var.ptr; | 1580 | return_value = execute_data_ptr->Ts[execute_data_ptr->opline->result.u.var].var.ptr; |
| 1581 | #endif | 1581 | #endif |
| 1582 | ht = execute_data_ptr->opline->extended_value; | 1582 | ht = execute_data_ptr->opline->extended_value; |
| 1583 | 1583 | ||
| @@ -1588,12 +1588,16 @@ static void suhosin_execute_internal(zend_execute_data *execute_data_ptr, int re | |||
| 1588 | if (SUHOSIN_G(eval_whitelist) != NULL) { | 1588 | if (SUHOSIN_G(eval_whitelist) != NULL) { |
| 1589 | if (!zend_hash_exists(SUHOSIN_G(eval_whitelist), lcname, function_name_strlen+1)) { | 1589 | if (!zend_hash_exists(SUHOSIN_G(eval_whitelist), lcname, function_name_strlen+1)) { |
| 1590 | suhosin_log(S_EXECUTOR, "function outside of eval whitelist called: %s()", lcname); | 1590 | suhosin_log(S_EXECUTOR, "function outside of eval whitelist called: %s()", lcname); |
| 1591 | goto execute_internal_bailout; | 1591 | if (!SUHOSIN_G(simulation)) { |
| 1592 | goto execute_internal_bailout; | ||
| 1593 | } | ||
| 1592 | } | 1594 | } |
| 1593 | } else if (SUHOSIN_G(eval_blacklist) != NULL) { | 1595 | } else if (SUHOSIN_G(eval_blacklist) != NULL) { |
| 1594 | if (zend_hash_exists(SUHOSIN_G(eval_blacklist), lcname, function_name_strlen+1)) { | 1596 | if (zend_hash_exists(SUHOSIN_G(eval_blacklist), lcname, function_name_strlen+1)) { |
| 1595 | suhosin_log(S_EXECUTOR, "function within eval blacklist called: %s()", lcname); | 1597 | suhosin_log(S_EXECUTOR, "function within eval blacklist called: %s()", lcname); |
| 1596 | goto execute_internal_bailout; | 1598 | if (!SUHOSIN_G(simulation)) { |
| 1599 | goto execute_internal_bailout; | ||
| 1600 | } | ||
| 1597 | } | 1601 | } |
| 1598 | } | 1602 | } |
| 1599 | } | 1603 | } |
| @@ -1601,12 +1605,16 @@ static void suhosin_execute_internal(zend_execute_data *execute_data_ptr, int re | |||
| 1601 | if (SUHOSIN_G(func_whitelist) != NULL) { | 1605 | if (SUHOSIN_G(func_whitelist) != NULL) { |
| 1602 | if (!zend_hash_exists(SUHOSIN_G(func_whitelist), lcname, function_name_strlen+1)) { | 1606 | if (!zend_hash_exists(SUHOSIN_G(func_whitelist), lcname, function_name_strlen+1)) { |
| 1603 | suhosin_log(S_EXECUTOR, "function outside of whitelist called: %s()", lcname); | 1607 | suhosin_log(S_EXECUTOR, "function outside of whitelist called: %s()", lcname); |
| 1604 | goto execute_internal_bailout; | 1608 | if (!SUHOSIN_G(simulation)) { |
| 1609 | goto execute_internal_bailout; | ||
| 1610 | } | ||
| 1605 | } | 1611 | } |
| 1606 | } else if (SUHOSIN_G(func_blacklist) != NULL) { | 1612 | } else if (SUHOSIN_G(func_blacklist) != NULL) { |
| 1607 | if (zend_hash_exists(SUHOSIN_G(func_blacklist), lcname, function_name_strlen+1)) { | 1613 | if (zend_hash_exists(SUHOSIN_G(func_blacklist), lcname, function_name_strlen+1)) { |
| 1608 | suhosin_log(S_EXECUTOR, "function within blacklist called: %s()", lcname); | 1614 | suhosin_log(S_EXECUTOR, "function within blacklist called: %s()", lcname); |
| 1609 | goto execute_internal_bailout; | 1615 | if (!SUHOSIN_G(simulation)) { |
| 1616 | goto execute_internal_bailout; | ||
| 1617 | } | ||
| 1610 | } | 1618 | } |
| 1611 | } | 1619 | } |
| 1612 | 1620 | ||
