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