@@ 124-136 (lines=13) @@ | ||
121 | { |
|
122 | // Check if there is a limit of input number in php |
|
123 | // Throw exception if the limit is reached |
|
124 | if (ini_get('max_input_vars') || ini_get('suhosin.get.max_vars')) { |
|
125 | $maxGet = $this->getMinInConfiguration(ini_get('max_input_vars'), ini_get('suhosin.get.max_vars')); |
|
126 | if ($maxGet !== null) { |
|
127 | $this->count = 0; |
|
128 | array_walk_recursive($_GET, array($this, 'countRecursive')); |
|
129 | if ($this->count === $maxGet) { |
|
130 | if ($this->log !== null) { |
|
131 | $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]); |
|
132 | } |
|
133 | 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.'); |
|
134 | } |
|
135 | } |
|
136 | } |
|
137 | if (ini_get('max_input_vars') || ini_get('suhosin.post.max_vars')) { |
|
138 | $maxPost = $this->getMinInConfiguration(ini_get('max_input_vars'), ini_get('suhosin.post.max_vars')); |
|
139 | if ($maxPost !== null) { |
|
@@ 137-149 (lines=13) @@ | ||
134 | } |
|
135 | } |
|
136 | } |
|
137 | if (ini_get('max_input_vars') || ini_get('suhosin.post.max_vars')) { |
|
138 | $maxPost = $this->getMinInConfiguration(ini_get('max_input_vars'), ini_get('suhosin.post.max_vars')); |
|
139 | if ($maxPost !== null) { |
|
140 | $this->count = 0; |
|
141 | array_walk_recursive($_POST, array($this, 'countRecursive')); |
|
142 | if ($this->count === $maxPost) { |
|
143 | if ($this->log !== null) { |
|
144 | $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]); |
|
145 | } |
|
146 | 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.'); |
|
147 | } |
|
148 | } |
|
149 | } |
|
150 | if (ini_get('max_input_vars') || ini_get('suhosin.request.max_vars')) { |
|
151 | $maxRequest = $this->getMinInConfiguration(ini_get('max_input_vars'), ini_get('suhosin.request.max_vars')); |
|
152 | if ($maxRequest !== null) { |
|
@@ 150-162 (lines=13) @@ | ||
147 | } |
|
148 | } |
|
149 | } |
|
150 | if (ini_get('max_input_vars') || ini_get('suhosin.request.max_vars')) { |
|
151 | $maxRequest = $this->getMinInConfiguration(ini_get('max_input_vars'), ini_get('suhosin.request.max_vars')); |
|
152 | if ($maxRequest !== null) { |
|
153 | $this->count = 0; |
|
154 | array_walk_recursive($_REQUEST, array($this, 'countRecursive')); |
|
155 | if ($this->count === $maxRequest) { |
|
156 | if ($this->log !== null) { |
|
157 | $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]); |
|
158 | } |
|
159 | 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.'); |
|
160 | } |
|
161 | } |
|
162 | } |
|
163 | if (isset($_SERVER['REQUEST_METHOD']) && strtolower($_SERVER['REQUEST_METHOD']) == 'post' && empty($_POST) && empty($_FILES)) { |
|
164 | $maxPostSize = self::iniGetBytes('post_max_size'); |
|
165 | if ($_SERVER['CONTENT_LENGTH'] > $maxPostSize) { |