mirror of
https://github.com/php/php-src.git
synced 2025-08-15 21:48:51 +02:00
limit nesting level of input variables
This commit is contained in:
parent
f1d075a102
commit
32fb34e2d1
3 changed files with 8 additions and 0 deletions
|
@ -119,10 +119,16 @@ PHPAPI void php_register_variable_ex(char *var, zval *val, zval *track_vars_arra
|
|||
index_len = var_len;
|
||||
|
||||
if (is_array) {
|
||||
int nest_level = 0;
|
||||
while (1) {
|
||||
char *index_s;
|
||||
int new_idx_len = 0;
|
||||
|
||||
if(++nest_level > PG(max_nesting_level)) {
|
||||
/* too many levels of nesting */
|
||||
php_error_docref(NULL TSRMLS_CC, E_ERROR, "Input variable nesting level more than allowed %d (change max_input_nesting_level in php.ini to increase the limit)", PG(max_input_nesting_level));
|
||||
}
|
||||
|
||||
ip++;
|
||||
index_s = ip;
|
||||
if (isspace(*ip)) {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue