|
@@ 110-119 (lines=10) @@
|
| 107 |
|
{ |
| 108 |
|
// Check if there is a limit of input number in php |
| 109 |
|
// Throw exception if the limit is reached |
| 110 |
|
if (ini_get('max_input_vars') || ini_get('suhosin.get.max_vars')) { |
| 111 |
|
$maxGet = $this->getMinInConfiguration(ini_get('max_input_vars'), ini_get('suhosin.get.max_vars')); |
| 112 |
|
if ($maxGet !== null) { |
| 113 |
|
$this->count = 0; |
| 114 |
|
array_walk_recursive($_GET, array($this, 'countRecursive')); |
| 115 |
|
if ($this->count === $maxGet) { |
| 116 |
|
throw new SplashException('Max input vars reaches for get parameters ('.$maxGet.'). Check your variable max_input_vars in php.ini or suhosin module suhosin.get.max_vars.'); |
| 117 |
|
} |
| 118 |
|
} |
| 119 |
|
} |
| 120 |
|
if (ini_get('max_input_vars') || ini_get('suhosin.post.max_vars')) { |
| 121 |
|
$maxPost = $this->getMinInConfiguration(ini_get('max_input_vars'), ini_get('suhosin.post.max_vars')); |
| 122 |
|
if ($maxPost !== null) { |
|
@@ 120-129 (lines=10) @@
|
| 117 |
|
} |
| 118 |
|
} |
| 119 |
|
} |
| 120 |
|
if (ini_get('max_input_vars') || ini_get('suhosin.post.max_vars')) { |
| 121 |
|
$maxPost = $this->getMinInConfiguration(ini_get('max_input_vars'), ini_get('suhosin.post.max_vars')); |
| 122 |
|
if ($maxPost !== null) { |
| 123 |
|
$this->count = 0; |
| 124 |
|
array_walk_recursive($_POST, array($this, 'countRecursive')); |
| 125 |
|
if ($this->count === $maxPost) { |
| 126 |
|
throw new SplashException('Max input vars reaches for post parameters ('.$maxPost.'). Check your variable max_input_vars in php.ini or suhosin module suhosin.post.max_vars.'); |
| 127 |
|
} |
| 128 |
|
} |
| 129 |
|
} |
| 130 |
|
if (ini_get('max_input_vars') || ini_get('suhosin.request.max_vars')) { |
| 131 |
|
$maxRequest = $this->getMinInConfiguration(ini_get('max_input_vars'), ini_get('suhosin.request.max_vars')); |
| 132 |
|
if ($maxRequest !== null) { |
|
@@ 130-139 (lines=10) @@
|
| 127 |
|
} |
| 128 |
|
} |
| 129 |
|
} |
| 130 |
|
if (ini_get('max_input_vars') || ini_get('suhosin.request.max_vars')) { |
| 131 |
|
$maxRequest = $this->getMinInConfiguration(ini_get('max_input_vars'), ini_get('suhosin.request.max_vars')); |
| 132 |
|
if ($maxRequest !== null) { |
| 133 |
|
$this->count = 0; |
| 134 |
|
array_walk_recursive($_REQUEST, array($this, 'countRecursive')); |
| 135 |
|
if ($this->count === $maxRequest) { |
| 136 |
|
throw new SplashException('Max input vars reaches for request parameters ('.$maxRequest.'). Check your variable max_input_vars in php.ini or suhosin module suhosin.request.max_vars.'); |
| 137 |
|
} |
| 138 |
|
} |
| 139 |
|
} |
| 140 |
|
if (isset($_SERVER['REQUEST_METHOD']) && strtolower($_SERVER['REQUEST_METHOD']) == 'post' && empty($_POST) && empty($_FILES)) { |
| 141 |
|
$maxPostSize = self::iniGetBytes('post_max_size'); |
| 142 |
|
if ($_SERVER['CONTENT_LENGTH'] > $maxPostSize) { |