|
@@ 142-154 (lines=13) @@
|
| 139 |
|
{ |
| 140 |
|
// Check if there is a limit of input number in php |
| 141 |
|
// Throw exception if the limit is reached |
| 142 |
|
if (ini_get('max_input_vars') || ini_get('suhosin.get.max_vars')) { |
| 143 |
|
$maxGet = $this->getMinInConfiguration(ini_get('max_input_vars'), ini_get('suhosin.get.max_vars')); |
| 144 |
|
if ($maxGet !== null) { |
| 145 |
|
$this->count = 0; |
| 146 |
|
array_walk_recursive($_GET, array($this, 'countRecursive')); |
| 147 |
|
if ($this->count == $maxGet) { |
| 148 |
|
if ($this->log != null) { |
| 149 |
|
$this->log->error('Max input vars reaches for get parameters ({maxGet}). Check your variable max_input_vars in php.ini or suhosin module suhosin.get.max_vars.', ['maxGet' => $maxGet]); |
| 150 |
|
} |
| 151 |
|
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.'); |
| 152 |
|
} |
| 153 |
|
} |
| 154 |
|
} |
| 155 |
|
if (ini_get('max_input_vars') || ini_get('suhosin.post.max_vars')) { |
| 156 |
|
$maxPost = $this->getMinInConfiguration(ini_get('max_input_vars'), ini_get('suhosin.post.max_vars')); |
| 157 |
|
if ($maxPost !== null) { |
|
@@ 155-167 (lines=13) @@
|
| 152 |
|
} |
| 153 |
|
} |
| 154 |
|
} |
| 155 |
|
if (ini_get('max_input_vars') || ini_get('suhosin.post.max_vars')) { |
| 156 |
|
$maxPost = $this->getMinInConfiguration(ini_get('max_input_vars'), ini_get('suhosin.post.max_vars')); |
| 157 |
|
if ($maxPost !== null) { |
| 158 |
|
$this->count = 0; |
| 159 |
|
array_walk_recursive($_POST, array($this, 'countRecursive')); |
| 160 |
|
if ($this->count == $maxPost) { |
| 161 |
|
if ($this->log != null) { |
| 162 |
|
$this->log->error('Max input vars reaches for post parameters ({maxPost}). Check your variable max_input_vars in php.ini or suhosin module suhosin.post.max_vars.', ['maxPost' => $maxPost]); |
| 163 |
|
} |
| 164 |
|
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.'); |
| 165 |
|
} |
| 166 |
|
} |
| 167 |
|
} |
| 168 |
|
if (ini_get('max_input_vars') || ini_get('suhosin.request.max_vars')) { |
| 169 |
|
$maxRequest = $this->getMinInConfiguration(ini_get('max_input_vars'), ini_get('suhosin.request.max_vars')); |
| 170 |
|
if ($maxRequest !== null) { |
|
@@ 168-180 (lines=13) @@
|
| 165 |
|
} |
| 166 |
|
} |
| 167 |
|
} |
| 168 |
|
if (ini_get('max_input_vars') || ini_get('suhosin.request.max_vars')) { |
| 169 |
|
$maxRequest = $this->getMinInConfiguration(ini_get('max_input_vars'), ini_get('suhosin.request.max_vars')); |
| 170 |
|
if ($maxRequest !== null) { |
| 171 |
|
$this->count = 0; |
| 172 |
|
array_walk_recursive($_REQUEST, array($this, 'countRecursive')); |
| 173 |
|
if ($this->count == $maxRequest) { |
| 174 |
|
if ($this->log != null) { |
| 175 |
|
$this->log->error('Max input vars reaches for request parameters ({maxRequest}). Check your variable max_input_vars in php.ini or suhosin module suhosin.request.max_vars.', ['maxRequest' => $maxRequest]); |
| 176 |
|
} |
| 177 |
|
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.'); |
| 178 |
|
} |
| 179 |
|
} |
| 180 |
|
} |
| 181 |
|
if (isset($_SERVER['REQUEST_METHOD']) && strtolower($_SERVER['REQUEST_METHOD']) == 'post' && empty($_POST) && empty($_FILES)) { |
| 182 |
|
$maxPostSize = self::iniGetBytes('post_max_size'); |
| 183 |
|
if ($_SERVER['CONTENT_LENGTH'] > $maxPostSize) { |