blob: 9668058c1a39319a384f44272686a0991042749e [file] [log] [blame]
Derek Allard2067d1a2008-11-13 22:59:24 +00001<?php if ( ! defined('BASEPATH')) exit('No direct script access allowed');
2/**
3 * CodeIgniter
4 *
Greg Aker741de1c2010-11-10 14:52:57 -06005 * An open source application development framework for PHP 5.1.6 or newer
Derek Allard2067d1a2008-11-13 22:59:24 +00006 *
7 * @package CodeIgniter
8 * @author ExpressionEngine Dev Team
Greg Aker0711dc82011-01-05 10:49:40 -06009 * @copyright Copyright (c) 2008 - 2011, EllisLab, Inc.
Derek Allard2067d1a2008-11-13 22:59:24 +000010 * @license http://codeigniter.com/user_guide/license.html
11 * @link http://codeigniter.com
12 * @since Version 1.0
13 * @filesource
14 */
15
16// ------------------------------------------------------------------------
17
18/**
19 * Input Class
20 *
21 * Pre-processes global input data for security
22 *
23 * @package CodeIgniter
24 * @subpackage Libraries
25 * @category Input
26 * @author ExpressionEngine Dev Team
27 * @link http://codeigniter.com/user_guide/libraries/input.html
28 */
29class CI_Input {
Derek Allard2067d1a2008-11-13 22:59:24 +000030
Derek Jones69fc4fc2010-03-02 13:36:31 -060031 var $ip_address = FALSE;
32 var $user_agent = FALSE;
33 var $_allow_get_array = FALSE;
34 var $_standardize_newlines = TRUE;
35 var $_enable_xss = FALSE; // Set automatically based on config setting
36 var $_enable_csrf = FALSE; // Set automatically based on config setting
37
Greg Akerec2f5712010-11-15 16:22:12 -060038 protected $headers = array();
39
40
Derek Allard2067d1a2008-11-13 22:59:24 +000041 /**
Greg Akera9263282010-11-10 15:26:43 -060042 * Constructor
43 *
44 * Sets whether to globally enable the XSS processing
45 * and whether to allow the $_GET array
46 *
47 */
48 public function __construct()
Derek Allard2067d1a2008-11-13 22:59:24 +000049 {
50 log_message('debug', "Input Class Initialized");
51
Derek Jones69fc4fc2010-03-02 13:36:31 -060052 $this->_allow_get_array = (config_item('enable_query_strings') === TRUE) ? TRUE : FALSE;
53 $this->_enable_xss = (config_item('global_xss_filtering') === TRUE) ? TRUE : FALSE;
54 $this->_enable_csrf = (config_item('csrf_protection') === TRUE) ? TRUE : FALSE;
55
56 // Do we need to load the security class?
57 if ($this->_enable_xss == TRUE OR $this->_enable_csrf == TRUE)
58 {
59 $this->security =& load_class('Security');
60 }
61
62 // Do we need the Unicode class?
63 if (UTF8_ENABLED === TRUE)
64 {
65 global $UNI;
66 $this->uni =& $UNI;
67 }
68
69 // Sanitize global arrays
Derek Allard2067d1a2008-11-13 22:59:24 +000070 $this->_sanitize_globals();
71 }
72
73 // --------------------------------------------------------------------
74
75 /**
Greg Akera9263282010-11-10 15:26:43 -060076 * Fetch from array
77 *
78 * This is a helper function to retrieve values from global arrays
79 *
80 * @access private
81 * @param array
82 * @param string
83 * @param bool
84 * @return string
85 */
Derek Allard2067d1a2008-11-13 22:59:24 +000086 function _fetch_from_array(&$array, $index = '', $xss_clean = FALSE)
87 {
88 if ( ! isset($array[$index]))
89 {
90 return FALSE;
91 }
92
93 if ($xss_clean === TRUE)
94 {
Derek Jones69fc4fc2010-03-02 13:36:31 -060095 $_security =& load_class('Security');
96 return $_security->xss_clean($array[$index]);
Derek Allard2067d1a2008-11-13 22:59:24 +000097 }
98
99 return $array[$index];
100 }
101
102 // --------------------------------------------------------------------
103
104 /**
105 * Fetch an item from the GET array
106 *
107 * @access public
108 * @param string
109 * @param bool
110 * @return string
111 */
112 function get($index = '', $xss_clean = FALSE)
113 {
114 return $this->_fetch_from_array($_GET, $index, $xss_clean);
115 }
116
117 // --------------------------------------------------------------------
118
119 /**
120 * Fetch an item from the POST array
121 *
122 * @access public
123 * @param string
124 * @param bool
125 * @return string
126 */
127 function post($index = '', $xss_clean = FALSE)
128 {
129 return $this->_fetch_from_array($_POST, $index, $xss_clean);
130 }
131
Derek Jones69fc4fc2010-03-02 13:36:31 -0600132
Derek Allard2067d1a2008-11-13 22:59:24 +0000133 // --------------------------------------------------------------------
134
135 /**
136 * Fetch an item from either the GET array or the POST
137 *
138 * @access public
139 * @param string The index key
140 * @param bool XSS cleaning
141 * @return string
142 */
143 function get_post($index = '', $xss_clean = FALSE)
144 {
145 if ( ! isset($_POST[$index]) )
146 {
147 return $this->get($index, $xss_clean);
148 }
149 else
150 {
151 return $this->post($index, $xss_clean);
152 }
153 }
154
155 // --------------------------------------------------------------------
156
157 /**
158 * Fetch an item from the COOKIE array
159 *
160 * @access public
161 * @param string
162 * @param bool
163 * @return string
164 */
165 function cookie($index = '', $xss_clean = FALSE)
166 {
167 return $this->_fetch_from_array($_COOKIE, $index, $xss_clean);
168 }
169
Derek Jones69fc4fc2010-03-02 13:36:31 -0600170 // ------------------------------------------------------------------------
171
172 /**
173 * Set cookie
174 *
175 * Accepts six parameter, or you can submit an associative
176 * array in the first parameter containing all the values.
177 *
178 * @access public
179 * @param mixed
180 * @param string the value of the cookie
181 * @param string the number of seconds until expiration
182 * @param string the cookie domain. Usually: .yourdomain.com
183 * @param string the cookie path
184 * @param string the cookie prefix
185 * @return void
186 */
187 function set_cookie($name = '', $value = '', $expire = '', $domain = '', $path = '/', $prefix = '')
188 {
189 if (is_array($name))
190 {
191 foreach (array('value', 'expire', 'domain', 'path', 'prefix', 'name') as $item)
192 {
193 if (isset($name[$item]))
194 {
195 $$item = $name[$item];
196 }
197 }
198 }
199
200 if ($prefix == '' AND config_item('cookie_prefix') != '')
201 {
202 $prefix = config_item('cookie_prefix');
203 }
204 if ($domain == '' AND config_item('cookie_domain') != '')
205 {
206 $domain = config_item('cookie_domain');
207 }
208 if ($path == '/' AND config_item('cookie_path') != '/')
209 {
210 $path = config_item('cookie_path');
211 }
212
213 if ( ! is_numeric($expire))
214 {
215 $expire = time() - 86500;
216 }
217 else
218 {
219 if ($expire > 0)
220 {
221 $expire = time() + $expire;
222 }
223 else
224 {
225 $expire = 0;
226 }
227 }
228
229 setcookie($prefix.$name, $value, $expire, $path, $domain, 0);
230 }
231
Derek Allard2067d1a2008-11-13 22:59:24 +0000232 // --------------------------------------------------------------------
233
234 /**
235 * Fetch an item from the SERVER array
236 *
237 * @access public
238 * @param string
239 * @param bool
240 * @return string
241 */
242 function server($index = '', $xss_clean = FALSE)
243 {
244 return $this->_fetch_from_array($_SERVER, $index, $xss_clean);
245 }
246
247 // --------------------------------------------------------------------
248
249 /**
250 * Fetch the IP Address
251 *
252 * @access public
253 * @return string
254 */
255 function ip_address()
256 {
257 if ($this->ip_address !== FALSE)
258 {
259 return $this->ip_address;
260 }
Barry Mienydd671972010-10-04 16:33:58 +0200261
Derek Jones42b2e172009-02-05 16:59:45 +0000262 if (config_item('proxy_ips') != '' && $this->server('HTTP_X_FORWARDED_FOR') && $this->server('REMOTE_ADDR'))
Derek Jonesc5972282009-02-04 21:40:20 +0000263 {
Derek Jones42b2e172009-02-05 16:59:45 +0000264 $proxies = preg_split('/[\s,]/', config_item('proxy_ips'), -1, PREG_SPLIT_NO_EMPTY);
Derek Jonesc5972282009-02-04 21:40:20 +0000265 $proxies = is_array($proxies) ? $proxies : array($proxies);
Derek Allard2067d1a2008-11-13 22:59:24 +0000266
Derek Jonesc5972282009-02-04 21:40:20 +0000267 $this->ip_address = in_array($_SERVER['REMOTE_ADDR'], $proxies) ? $_SERVER['HTTP_X_FORWARDED_FOR'] : $_SERVER['REMOTE_ADDR'];
268 }
269 elseif ($this->server('REMOTE_ADDR') AND $this->server('HTTP_CLIENT_IP'))
Derek Allard2067d1a2008-11-13 22:59:24 +0000270 {
271 $this->ip_address = $_SERVER['HTTP_CLIENT_IP'];
272 }
273 elseif ($this->server('REMOTE_ADDR'))
274 {
275 $this->ip_address = $_SERVER['REMOTE_ADDR'];
276 }
277 elseif ($this->server('HTTP_CLIENT_IP'))
278 {
279 $this->ip_address = $_SERVER['HTTP_CLIENT_IP'];
280 }
281 elseif ($this->server('HTTP_X_FORWARDED_FOR'))
282 {
283 $this->ip_address = $_SERVER['HTTP_X_FORWARDED_FOR'];
284 }
285
286 if ($this->ip_address === FALSE)
287 {
288 $this->ip_address = '0.0.0.0';
289 return $this->ip_address;
290 }
291
Robin Sowell76b369e2010-03-19 11:15:28 -0400292 if (strpos($this->ip_address, ',') !== FALSE)
Derek Allard2067d1a2008-11-13 22:59:24 +0000293 {
294 $x = explode(',', $this->ip_address);
Derek Jonesc5972282009-02-04 21:40:20 +0000295 $this->ip_address = trim(end($x));
Derek Allard2067d1a2008-11-13 22:59:24 +0000296 }
297
298 if ( ! $this->valid_ip($this->ip_address))
299 {
300 $this->ip_address = '0.0.0.0';
301 }
302
303 return $this->ip_address;
304 }
305
306 // --------------------------------------------------------------------
307
308 /**
309 * Validate IP Address
310 *
311 * Updated version suggested by Geert De Deckere
Barry Mienydd671972010-10-04 16:33:58 +0200312 *
Derek Allard2067d1a2008-11-13 22:59:24 +0000313 * @access public
314 * @param string
315 * @return string
316 */
317 function valid_ip($ip)
318 {
319 $ip_segments = explode('.', $ip);
320
321 // Always 4 segments needed
322 if (count($ip_segments) != 4)
323 {
324 return FALSE;
325 }
326 // IP can not start with 0
327 if ($ip_segments[0][0] == '0')
328 {
329 return FALSE;
330 }
331 // Check each segment
332 foreach ($ip_segments as $segment)
333 {
Barry Mienydd671972010-10-04 16:33:58 +0200334 // IP segments must be digits and can not be
Derek Allard2067d1a2008-11-13 22:59:24 +0000335 // longer than 3 digits or greater then 255
336 if ($segment == '' OR preg_match("/[^0-9]/", $segment) OR $segment > 255 OR strlen($segment) > 3)
337 {
338 return FALSE;
339 }
340 }
341
342 return TRUE;
343 }
344
345 // --------------------------------------------------------------------
346
347 /**
348 * User Agent
349 *
350 * @access public
351 * @return string
352 */
353 function user_agent()
354 {
355 if ($this->user_agent !== FALSE)
356 {
357 return $this->user_agent;
358 }
359
360 $this->user_agent = ( ! isset($_SERVER['HTTP_USER_AGENT'])) ? FALSE : $_SERVER['HTTP_USER_AGENT'];
361
362 return $this->user_agent;
363 }
364
365 // --------------------------------------------------------------------
366
367 /**
Derek Jones69fc4fc2010-03-02 13:36:31 -0600368 * Sanitize Globals
Derek Allard2067d1a2008-11-13 22:59:24 +0000369 *
Derek Jones69fc4fc2010-03-02 13:36:31 -0600370 * This function does the following:
371 *
372 * Unsets $_GET data (if query strings are not enabled)
373 *
374 * Unsets all globals if register_globals is enabled
375 *
376 * Standardizes newline characters to \n
377 *
378 * @access private
379 * @return void
Derek Allard2067d1a2008-11-13 22:59:24 +0000380 */
Derek Jones69fc4fc2010-03-02 13:36:31 -0600381 function _sanitize_globals()
Derek Allard2067d1a2008-11-13 22:59:24 +0000382 {
Derek Jones69fc4fc2010-03-02 13:36:31 -0600383 // It would be "wrong" to unset any of these GLOBALS.
Greg Akerec2f5712010-11-15 16:22:12 -0600384 $protected = array('_SERVER', '_GET', '_POST', '_FILES', '_REQUEST',
385 '_SESSION', '_ENV', 'GLOBALS', 'HTTP_RAW_POST_DATA',
386 'system_folder', 'application_folder', 'BM', 'EXT',
387 'CFG', 'URI', 'RTR', 'OUT', 'IN');
Derek Allard2067d1a2008-11-13 22:59:24 +0000388
Barry Mienydd671972010-10-04 16:33:58 +0200389 // Unset globals for securiy.
Derek Jones69fc4fc2010-03-02 13:36:31 -0600390 // This is effectively the same as register_globals = off
391 foreach (array($_GET, $_POST, $_COOKIE) as $global)
Derek Allard2067d1a2008-11-13 22:59:24 +0000392 {
Derek Jones69fc4fc2010-03-02 13:36:31 -0600393 if ( ! is_array($global))
Derek Allard2067d1a2008-11-13 22:59:24 +0000394 {
Derek Jones69fc4fc2010-03-02 13:36:31 -0600395 if ( ! in_array($global, $protected))
396 {
397 global $$global;
398 $$global = NULL;
399 }
Derek Allard2067d1a2008-11-13 22:59:24 +0000400 }
Derek Jones69fc4fc2010-03-02 13:36:31 -0600401 else
402 {
403 foreach ($global as $key => $val)
404 {
405 if ( ! in_array($key, $protected))
406 {
407 global $$key;
408 $$key = NULL;
409 }
410 }
411 }
Derek Allard2067d1a2008-11-13 22:59:24 +0000412 }
413
Derek Jones69fc4fc2010-03-02 13:36:31 -0600414 // Is $_GET data allowed? If not we'll set the $_GET to an empty array
415 if ($this->_allow_get_array == FALSE)
Derek Allard2067d1a2008-11-13 22:59:24 +0000416 {
Derek Jones69fc4fc2010-03-02 13:36:31 -0600417 $_GET = array();
Derek Allard2067d1a2008-11-13 22:59:24 +0000418 }
419 else
420 {
Derek Jones69fc4fc2010-03-02 13:36:31 -0600421 if (is_array($_GET) AND count($_GET) > 0)
Derek Allard2067d1a2008-11-13 22:59:24 +0000422 {
Derek Jones69fc4fc2010-03-02 13:36:31 -0600423 foreach($_GET as $key => $val)
424 {
425 $_GET[$this->_clean_input_keys($key)] = $this->_clean_input_data($val);
426 }
Derek Allard2067d1a2008-11-13 22:59:24 +0000427 }
428 }
429
Derek Jones69fc4fc2010-03-02 13:36:31 -0600430 // Clean $_POST Data
431 if (is_array($_POST) AND count($_POST) > 0)
Derek Allard2067d1a2008-11-13 22:59:24 +0000432 {
Derek Jones69fc4fc2010-03-02 13:36:31 -0600433 foreach($_POST as $key => $val)
434 {
435 $_POST[$this->_clean_input_keys($key)] = $this->_clean_input_data($val);
436 }
Derek Allard2067d1a2008-11-13 22:59:24 +0000437 }
438
Derek Jones69fc4fc2010-03-02 13:36:31 -0600439 // Clean $_COOKIE Data
440 if (is_array($_COOKIE) AND count($_COOKIE) > 0)
Derek Allard2067d1a2008-11-13 22:59:24 +0000441 {
Derek Jones69fc4fc2010-03-02 13:36:31 -0600442 // Also get rid of specially treated cookies that might be set by a server
443 // or silly application, that are of no use to a CI application anyway
444 // but that when present will trip our 'Disallowed Key Characters' alarm
445 // http://www.ietf.org/rfc/rfc2109.txt
446 // note that the key names below are single quoted strings, and are not PHP variables
447 unset($_COOKIE['$Version']);
448 unset($_COOKIE['$Path']);
449 unset($_COOKIE['$Domain']);
450
451 foreach($_COOKIE as $key => $val)
452 {
453 $_COOKIE[$this->_clean_input_keys($key)] = $this->_clean_input_data($val);
454 }
Derek Allard2067d1a2008-11-13 22:59:24 +0000455 }
456
Derek Jones69fc4fc2010-03-02 13:36:31 -0600457 // Sanitize PHP_SELF
458 $_SERVER['PHP_SELF'] = strip_tags($_SERVER['PHP_SELF']);
459
460
461 // CSRF Protection check
462 if ($this->_enable_csrf == TRUE)
Derek Allard2067d1a2008-11-13 22:59:24 +0000463 {
Derek Jones69fc4fc2010-03-02 13:36:31 -0600464 $this->security->csrf_verify();
Derek Allard2067d1a2008-11-13 22:59:24 +0000465 }
Derek Allard2067d1a2008-11-13 22:59:24 +0000466
Derek Jones69fc4fc2010-03-02 13:36:31 -0600467 log_message('debug', "Global POST and COOKIE data sanitized");
Derek Allard2067d1a2008-11-13 22:59:24 +0000468 }
469
470 // --------------------------------------------------------------------
471
472 /**
Derek Jones69fc4fc2010-03-02 13:36:31 -0600473 * Clean Input Data
Derek Allard2067d1a2008-11-13 22:59:24 +0000474 *
Derek Jones69fc4fc2010-03-02 13:36:31 -0600475 * This is a helper function. It escapes data and
476 * standardizes newline characters to \n
Derek Allard2067d1a2008-11-13 22:59:24 +0000477 *
478 * @access private
479 * @param string
Derek Allard2067d1a2008-11-13 22:59:24 +0000480 * @return string
481 */
Derek Jones69fc4fc2010-03-02 13:36:31 -0600482 function _clean_input_data($str)
Derek Allard2067d1a2008-11-13 22:59:24 +0000483 {
Derek Jones69fc4fc2010-03-02 13:36:31 -0600484 if (is_array($str))
Derek Allard2067d1a2008-11-13 22:59:24 +0000485 {
Derek Jones69fc4fc2010-03-02 13:36:31 -0600486 $new_array = array();
487 foreach ($str as $key => $val)
488 {
489 $new_array[$this->_clean_input_keys($key)] = $this->_clean_input_data($val);
490 }
491 return $new_array;
Derek Allard2067d1a2008-11-13 22:59:24 +0000492 }
493
Derek Jones69fc4fc2010-03-02 13:36:31 -0600494 // We strip slashes if magic quotes is on to keep things consistent
495 if (get_magic_quotes_gpc())
Derek Allard2067d1a2008-11-13 22:59:24 +0000496 {
Derek Jones69fc4fc2010-03-02 13:36:31 -0600497 $str = stripslashes($str);
498 }
499
500 // Clean UTF-8 if supported
501 if (UTF8_ENABLED === TRUE)
502 {
503 $str = $this->uni->clean_string($str);
504 }
505
506 // Should we filter the input data?
507 if ($this->_enable_xss === TRUE)
508 {
509 $str = $this->security->xss_clean($str);
510 }
511
512 // Standardize newlines if needed
513 if ($this->_standardize_newlines == TRUE)
514 {
515 if (strpos($str, "\r") !== FALSE)
516 {
517 $str = str_replace(array("\r\n", "\r"), "\n", $str);
518 }
Derek Allard2067d1a2008-11-13 22:59:24 +0000519 }
520
521 return $str;
522 }
523
524 // --------------------------------------------------------------------
525
526 /**
Derek Jones69fc4fc2010-03-02 13:36:31 -0600527 * Clean Keys
Derek Allard2067d1a2008-11-13 22:59:24 +0000528 *
Derek Jones69fc4fc2010-03-02 13:36:31 -0600529 * This is a helper function. To prevent malicious users
530 * from trying to exploit keys we make sure that keys are
531 * only named with alpha-numeric text and a few other items.
Derek Allard2067d1a2008-11-13 22:59:24 +0000532 *
Derek Jones69fc4fc2010-03-02 13:36:31 -0600533 * @access private
Derek Allard2067d1a2008-11-13 22:59:24 +0000534 * @param string
535 * @return string
536 */
Derek Jones69fc4fc2010-03-02 13:36:31 -0600537 function _clean_input_keys($str)
Derek Allard2067d1a2008-11-13 22:59:24 +0000538 {
Derek Jones69fc4fc2010-03-02 13:36:31 -0600539 if ( ! preg_match("/^[a-z0-9:_\/-]+$/i", $str))
Derek Allard2067d1a2008-11-13 22:59:24 +0000540 {
Derek Jones69fc4fc2010-03-02 13:36:31 -0600541 exit('Disallowed Key Characters.');
Derek Allard2067d1a2008-11-13 22:59:24 +0000542 }
543
Derek Jones69fc4fc2010-03-02 13:36:31 -0600544 // Clean UTF-8 if supported
545 if (UTF8_ENABLED === TRUE)
546 {
547 $str = $this->uni->clean_string($str);
548 }
Derek Allard2067d1a2008-11-13 22:59:24 +0000549
Derek Jones69fc4fc2010-03-02 13:36:31 -0600550 return $str;
551 }
Derek Allard2067d1a2008-11-13 22:59:24 +0000552
Greg Akerec2f5712010-11-15 16:22:12 -0600553 // --------------------------------------------------------------------
554
555 /**
556 * Request Headers
557 *
558 * In Apache, you can simply call apache_request_headers(), however for
559 * people running other webservers the function is undefined.
560 *
561 * @return array
562 */
563 public function request_headers($xss_clean = FALSE)
564 {
565 // Look at Apache go!
566 if (function_exists('apache_request_headers'))
567 {
568 $headers = apache_request_headers();
569 }
570 else
571 {
572 $headers['Content-Type'] = (isset($_SERVER['CONTENT_TYPE'])) ? $_SERVER['CONTENT_TYPE'] : @getenv('CONTENT_TYPE');
573
574 foreach ($_SERVER as $key => $val)
575 {
576 if (strncmp($key, 'HTTP_', 5) === 0)
577 {
578 $headers[substr($key, 5)] = $this->_fetch_from_array($_SERVER, $key, $xss_clean);
579 }
580 }
581 }
582
583 // take SOME_HEADER and turn it into Some-Header
584 foreach ($headers as $key => $val)
585 {
586 $key = str_replace('_', ' ', strtolower($key));
587 $key = str_replace(' ', '-', ucwords($key));
588
589 $this->headers[$key] = $val;
590 }
591
592 return $this->headers;
593 }
594
595 // --------------------------------------------------------------------
596
597 /**
598 * Get Request Header
599 *
600 * Returns the value of a single member of the headers class member
601 *
602 * @param string array key for $this->headers
603 * @param boolean XSS Clean or not
604 * @return mixed FALSE on failure, string on success
605 */
606 public function get_request_header($index, $xss_clean = FALSE)
607 {
608 if (empty($this->headers))
609 {
610 $this->request_headers();
611 }
612
613 if ( ! isset($this->headers[$index]))
614 {
615 return FALSE;
616 }
617
618 if ($xss_clean === TRUE)
619 {
620 $_security =& load_class('Security');
621 return $_security->xss_clean($this->headers[$index]);
622 }
623
624 return $this->headers[$index];
625 }
626
Greg Aker081ac9d2010-11-22 14:42:53 -0600627 // --------------------------------------------------------------------
628
629 /**
630 * Is ajax Request?
631 *
632 * Test to see if a request contains the HTTP_X_REQUESTED_WITH header
633 *
634 * @return boolean
635 */
636 public function is_ajax_request()
637 {
Greg Aker2fae66e2010-12-09 15:49:34 -0600638 return ($this->server('HTTP_X_REQUESTED_WITH') === 'XMLHttpRequest');
Greg Aker081ac9d2010-11-22 14:42:53 -0600639 }
640
Derek Allard2067d1a2008-11-13 22:59:24 +0000641}
642// END Input class
643
644/* End of file Input.php */
Derek Jonesc68dfbf2010-03-02 12:59:23 -0600645/* Location: ./system/core/Input.php */