From 1c775e7d0b95bbf972f3924319a8d46f54be0dc9 Mon Sep 17 00:00:00 2001 From: Razican Date: Tue, 11 Nov 2014 12:23:05 +0200 Subject: Remove URI filter for parenthesis and dollar symbols, as talked in #47. Signed-off-by: Razican --- system/core/URI.php | 7 ------- 1 file changed, 7 deletions(-) (limited to 'system/core') diff --git a/system/core/URI.php b/system/core/URI.php index 1817374b7..7809e17c0 100644 --- a/system/core/URI.php +++ b/system/core/URI.php @@ -326,13 +326,6 @@ class CI_URI { { show_error('The URI you submitted has disallowed characters.', 400); } - - // Convert programatic characters to entities and return - return str_replace( - array('$', '(', ')', '%28', '%29'), // Bad - array('$', '(', ')', '(', ')'), // Good - $str - ); } // -------------------------------------------------------------------- -- cgit v1.2.3-24-g4f1b From fa11460e34b90016f185a03bc39c529577ee2cd7 Mon Sep 17 00:00:00 2001 From: Razican Date: Tue, 11 Nov 2014 12:25:40 +0200 Subject: Fixed return. Signed-off-by: Razican --- system/core/URI.php | 2 ++ 1 file changed, 2 insertions(+) (limited to 'system/core') diff --git a/system/core/URI.php b/system/core/URI.php index 7809e17c0..067338d2a 100644 --- a/system/core/URI.php +++ b/system/core/URI.php @@ -326,6 +326,8 @@ class CI_URI { { show_error('The URI you submitted has disallowed characters.', 400); } + + return $str; } // -------------------------------------------------------------------- -- cgit v1.2.3-24-g4f1b From 89432af4adb4011ad8aa5252838dc76a3a5acec7 Mon Sep 17 00:00:00 2001 From: Ahmad Anbar Date: Tue, 2 Dec 2014 10:04:46 +0200 Subject: Allow pulling multiple get/post ...etc at once --- system/core/Input.php | 12 ++++++++++++ 1 file changed, 12 insertions(+) (limited to 'system/core') diff --git a/system/core/Input.php b/system/core/Input.php index 81555df9a..0dcb6f425 100644 --- a/system/core/Input.php +++ b/system/core/Input.php @@ -168,6 +168,18 @@ class CI_Input { return $output; } + // allow fetching multiple keys at once + if (is_array($index)) + { + $output = array(); + foreach($index as $var) + { + $output[$var] = $this->_fetch_from_array($array, $var, $xss_clean); + } + + return $output; + } + is_bool($xss_clean) OR $xss_clean = $this->_enable_xss; if (isset($array[$index])) -- cgit v1.2.3-24-g4f1b From ff89a4e7709933dda52698cd4abd389754ae8675 Mon Sep 17 00:00:00 2001 From: Ahmad Anbar Date: Tue, 2 Dec 2014 17:26:30 +0200 Subject: Added changelog entry updated documentation Fixed code style. --- system/core/Input.php | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) (limited to 'system/core') diff --git a/system/core/Input.php b/system/core/Input.php index 0dcb6f425..11b2e94e0 100644 --- a/system/core/Input.php +++ b/system/core/Input.php @@ -150,7 +150,7 @@ class CI_Input { * Internal method used to retrieve values from global arrays. * * @param array &$array $_GET, $_POST, $_COOKIE, $_SERVER, etc. - * @param string $index Index for item to be fetched from $array + * @param mixed $index Index for item to be fetched from $array * @param bool $xss_clean Whether to apply XSS filtering * @return mixed */ @@ -172,7 +172,7 @@ class CI_Input { if (is_array($index)) { $output = array(); - foreach($index as $var) + foreach ($index as $var) { $output[$var] = $this->_fetch_from_array($array, $var, $xss_clean); } @@ -222,7 +222,7 @@ class CI_Input { /** * Fetch an item from the GET array * - * @param string $index Index for item to be fetched from $_GET + * @param mixed $index Index for item to be fetched from $_GET * @param bool $xss_clean Whether to apply XSS filtering * @return mixed */ @@ -236,7 +236,7 @@ class CI_Input { /** * Fetch an item from the POST array * - * @param string $index Index for item to be fetched from $_POST + * @param mixed $index Index for item to be fetched from $_POST * @param bool $xss_clean Whether to apply XSS filtering * @return mixed */ @@ -282,7 +282,7 @@ class CI_Input { /** * Fetch an item from the COOKIE array * - * @param string $index Index for item to be fetched from $_COOKIE + * @param mixed $index Index for item to be fetched from $_COOKIE * @param bool $xss_clean Whether to apply XSS filtering * @return mixed */ @@ -296,7 +296,7 @@ class CI_Input { /** * Fetch an item from the SERVER array * - * @param string $index Index for item to be fetched from $_SERVER + * @param mixed $index Index for item to be fetched from $_SERVER * @param bool $xss_clean Whether to apply XSS filtering * @return mixed */ -- cgit v1.2.3-24-g4f1b From ef29f83f786aa968be3d9b7b55ccdc45f33c475d Mon Sep 17 00:00:00 2001 From: Andrey Andreev Date: Tue, 2 Dec 2014 18:03:47 +0200 Subject: Some optimizations & polishing following PR #3381 --- system/core/Input.php | 19 +++++-------------- 1 file changed, 5 insertions(+), 14 deletions(-) (limited to 'system/core') diff --git a/system/core/Input.php b/system/core/Input.php index 11b2e94e0..d1353e9dc 100644 --- a/system/core/Input.php +++ b/system/core/Input.php @@ -156,32 +156,23 @@ class CI_Input { */ protected function _fetch_from_array(&$array, $index = NULL, $xss_clean = NULL) { - // If $index is NULL, it means that the whole $array is requested - if ($index === NULL) - { - $output = array(); - foreach (array_keys($array) as $key) - { - $output[$key] = $this->_fetch_from_array($array, $key, $xss_clean); - } + is_bool($xss_clean) OR $xss_clean = $this->_enable_xss; - return $output; - } + // If $index is NULL, it means that the whole $array is requested + isset($index) OR $index = array_keys($array); // allow fetching multiple keys at once if (is_array($index)) { $output = array(); - foreach ($index as $var) + foreach (array_keys($array) as $key) { - $output[$var] = $this->_fetch_from_array($array, $var, $xss_clean); + $output[$key] = $this->_fetch_from_array($array, $key, $xss_clean); } return $output; } - is_bool($xss_clean) OR $xss_clean = $this->_enable_xss; - if (isset($array[$index])) { $value = $array[$index]; -- cgit v1.2.3-24-g4f1b From 6b3bf4c026cb8cb85ce53a985c64b22006695ce6 Mon Sep 17 00:00:00 2001 From: Andrey Andreev Date: Tue, 2 Dec 2014 18:04:41 +0200 Subject: Fix an error from the previous commit --- system/core/Input.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'system/core') diff --git a/system/core/Input.php b/system/core/Input.php index d1353e9dc..0c6025d1e 100644 --- a/system/core/Input.php +++ b/system/core/Input.php @@ -165,7 +165,7 @@ class CI_Input { if (is_array($index)) { $output = array(); - foreach (array_keys($array) as $key) + foreach ($index as $key) { $output[$key] = $this->_fetch_from_array($array, $key, $xss_clean); } -- cgit v1.2.3-24-g4f1b From ac41ca63f7e7f9ce24a2c2f023e8e648c8a56634 Mon Sep 17 00:00:00 2001 From: Stefano Mazzega Date: Wed, 3 Dec 2014 11:55:47 +0100 Subject: add querystring to page caching. #2349 --- system/core/Output.php | 9 +++++++++ 1 file changed, 9 insertions(+) (limited to 'system/core') diff --git a/system/core/Output.php b/system/core/Output.php index 8b7d6efbd..4743690c9 100644 --- a/system/core/Output.php +++ b/system/core/Output.php @@ -564,6 +564,9 @@ class CI_Output { .$CI->config->item('index_page') .$CI->uri->uri_string(); + // append querystring + $uri .= (empty($_SERVER['QUERY_STRING'])) ? '' : '?' . $_SERVER['QUERY_STRING']; + $cache_path .= md5($uri); if ( ! $fp = @fopen($cache_path, 'w+b')) @@ -648,6 +651,9 @@ class CI_Output { // Build the file path. The file name is an MD5 hash of the full URI $uri = $CFG->item('base_url').$CFG->item('index_page').$URI->uri_string; + // append querystring + $uri .= (empty($_SERVER['QUERY_STRING'])) ? '' : '?' . $_SERVER['QUERY_STRING']; + $filepath = $cache_path.md5($uri); if ( ! file_exists($filepath) OR ! $fp = @fopen($filepath, 'rb')) @@ -727,6 +733,9 @@ class CI_Output { $uri = $CI->uri->uri_string(); } + // append querystring + $uri .= (empty($_SERVER['QUERY_STRING'])) ? '' : '?' . $_SERVER['QUERY_STRING']; + $cache_path .= md5($CI->config->item('base_url').$CI->config->item('index_page').$uri); if ( ! @unlink($cache_path)) -- cgit v1.2.3-24-g4f1b From 6d61a058611b87043b25849fc144c256dbd79323 Mon Sep 17 00:00:00 2001 From: Stefano Mazzega Date: Wed, 3 Dec 2014 12:10:13 +0100 Subject: add querystring to page caching. #2349 --- system/core/Output.php | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'system/core') diff --git a/system/core/Output.php b/system/core/Output.php index 4743690c9..58a9d896b 100644 --- a/system/core/Output.php +++ b/system/core/Output.php @@ -565,7 +565,7 @@ class CI_Output { .$CI->uri->uri_string(); // append querystring - $uri .= (empty($_SERVER['QUERY_STRING'])) ? '' : '?' . $_SERVER['QUERY_STRING']; + $uri .= (empty($_SERVER['QUERY_STRING'])) ? '' : '?' . $_SERVER['QUERY_STRING']; $cache_path .= md5($uri); @@ -652,7 +652,7 @@ class CI_Output { // Build the file path. The file name is an MD5 hash of the full URI $uri = $CFG->item('base_url').$CFG->item('index_page').$URI->uri_string; // append querystring - $uri .= (empty($_SERVER['QUERY_STRING'])) ? '' : '?' . $_SERVER['QUERY_STRING']; + $uri .= (empty($_SERVER['QUERY_STRING'])) ? '' : '?' . $_SERVER['QUERY_STRING']; $filepath = $cache_path.md5($uri); @@ -734,7 +734,7 @@ class CI_Output { } // append querystring - $uri .= (empty($_SERVER['QUERY_STRING'])) ? '' : '?' . $_SERVER['QUERY_STRING']; + $uri .= (empty($_SERVER['QUERY_STRING'])) ? '' : '?' . $_SERVER['QUERY_STRING']; $cache_path .= md5($CI->config->item('base_url').$CI->config->item('index_page').$uri); -- cgit v1.2.3-24-g4f1b From af14e26e72ed484b2388b88bf8df245c2490a387 Mon Sep 17 00:00:00 2001 From: Stefano Mazzega Date: Wed, 3 Dec 2014 13:43:07 +0100 Subject: Fixed code style. Update changelog. #2349 --- system/core/Output.php | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'system/core') diff --git a/system/core/Output.php b/system/core/Output.php index 58a9d896b..081423c99 100644 --- a/system/core/Output.php +++ b/system/core/Output.php @@ -565,7 +565,7 @@ class CI_Output { .$CI->uri->uri_string(); // append querystring - $uri .= (empty($_SERVER['QUERY_STRING'])) ? '' : '?' . $_SERVER['QUERY_STRING']; + empty($_SERVER['QUERY_STRING']) OR $uri .= '?'.$_SERVER['QUERY_STRING']; $cache_path .= md5($uri); @@ -652,7 +652,7 @@ class CI_Output { // Build the file path. The file name is an MD5 hash of the full URI $uri = $CFG->item('base_url').$CFG->item('index_page').$URI->uri_string; // append querystring - $uri .= (empty($_SERVER['QUERY_STRING'])) ? '' : '?' . $_SERVER['QUERY_STRING']; + empty($_SERVER['QUERY_STRING']) OR $uri .= '?'.$_SERVER['QUERY_STRING']; $filepath = $cache_path.md5($uri); @@ -734,7 +734,7 @@ class CI_Output { } // append querystring - $uri .= (empty($_SERVER['QUERY_STRING'])) ? '' : '?' . $_SERVER['QUERY_STRING']; + empty($_SERVER['QUERY_STRING']) OR $uri .= '?'.$_SERVER['QUERY_STRING']; $cache_path .= md5($CI->config->item('base_url').$CI->config->item('index_page').$uri); -- cgit v1.2.3-24-g4f1b From 335722503937979d9a6b10fc625c47527d3935f0 Mon Sep 17 00:00:00 2001 From: Andrey Andreev Date: Wed, 3 Dec 2014 20:19:38 +0200 Subject: Some polishing following PR #3384 --- system/core/Output.php | 7 ++----- 1 file changed, 2 insertions(+), 5 deletions(-) (limited to 'system/core') diff --git a/system/core/Output.php b/system/core/Output.php index 081423c99..af3c1e721 100644 --- a/system/core/Output.php +++ b/system/core/Output.php @@ -564,8 +564,7 @@ class CI_Output { .$CI->config->item('index_page') .$CI->uri->uri_string(); - // append querystring - empty($_SERVER['QUERY_STRING']) OR $uri .= '?'.$_SERVER['QUERY_STRING']; + empty($_SERVER['QUERY_STRING']) OR $uri .= '?'.$_SERVER['QUERY_STRING']; $cache_path .= md5($uri); @@ -650,8 +649,7 @@ class CI_Output { $cache_path = ($CFG->item('cache_path') === '') ? APPPATH.'cache/' : $CFG->item('cache_path'); // Build the file path. The file name is an MD5 hash of the full URI - $uri = $CFG->item('base_url').$CFG->item('index_page').$URI->uri_string; - // append querystring + $uri = $CFG->item('base_url').$CFG->item('index_page').$URI->uri_string; empty($_SERVER['QUERY_STRING']) OR $uri .= '?'.$_SERVER['QUERY_STRING']; $filepath = $cache_path.md5($uri); @@ -733,7 +731,6 @@ class CI_Output { $uri = $CI->uri->uri_string(); } - // append querystring empty($_SERVER['QUERY_STRING']) OR $uri .= '?'.$_SERVER['QUERY_STRING']; $cache_path .= md5($CI->config->item('base_url').$CI->config->item('index_page').$uri); -- cgit v1.2.3-24-g4f1b From dfcca20182d608f68f56a6129cc57b41503244d9 Mon Sep 17 00:00:00 2001 From: Andrey Andreev Date: Thu, 4 Dec 2014 02:38:11 +0200 Subject: Another correction following #3384 --- system/core/Output.php | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) (limited to 'system/core') diff --git a/system/core/Output.php b/system/core/Output.php index af3c1e721..f5521882c 100644 --- a/system/core/Output.php +++ b/system/core/Output.php @@ -729,10 +729,9 @@ class CI_Output { if (empty($uri)) { $uri = $CI->uri->uri_string(); + empty($_SERVER['QUERY_STRING']) OR $uri .= '?'.$_SERVER['QUERY_STRING']; } - empty($_SERVER['QUERY_STRING']) OR $uri .= '?'.$_SERVER['QUERY_STRING']; - $cache_path .= md5($CI->config->item('base_url').$CI->config->item('index_page').$uri); if ( ! @unlink($cache_path)) -- cgit v1.2.3-24-g4f1b From a704aa715b682df78552fab76a7f5ba9cbe06923 Mon Sep 17 00:00:00 2001 From: Andrey Andreev Date: Thu, 4 Dec 2014 12:37:07 +0200 Subject: Add 'cache_query_string' configuration option Close #2349 --- system/core/Output.php | 17 ++++++++++++++--- 1 file changed, 14 insertions(+), 3 deletions(-) (limited to 'system/core') diff --git a/system/core/Output.php b/system/core/Output.php index f5521882c..e8f0b1590 100644 --- a/system/core/Output.php +++ b/system/core/Output.php @@ -564,7 +564,10 @@ class CI_Output { .$CI->config->item('index_page') .$CI->uri->uri_string(); - empty($_SERVER['QUERY_STRING']) OR $uri .= '?'.$_SERVER['QUERY_STRING']; + if ($CI->config->item('cache_query_string') && ! empty($_SERVER['QUERY_STRING'])) + { + $uri .= '?'.$_SERVER['QUERY_STRING']; + } $cache_path .= md5($uri); @@ -650,7 +653,11 @@ class CI_Output { // Build the file path. The file name is an MD5 hash of the full URI $uri = $CFG->item('base_url').$CFG->item('index_page').$URI->uri_string; - empty($_SERVER['QUERY_STRING']) OR $uri .= '?'.$_SERVER['QUERY_STRING']; + + if ($CFG->item('cache_query_string') && ! empty($_SERVER['QUERY_STRING'])) + { + $uri .= '?'.$_SERVER['QUERY_STRING']; + } $filepath = $cache_path.md5($uri); @@ -729,7 +736,11 @@ class CI_Output { if (empty($uri)) { $uri = $CI->uri->uri_string(); - empty($_SERVER['QUERY_STRING']) OR $uri .= '?'.$_SERVER['QUERY_STRING']; + + if ($CI->config->item('cache_query_string') && ! empty($_SERVER['QUERY_STRING'])) + { + $uri .= '?'.$_SERVER['QUERY_STRING']; + } } $cache_path .= md5($CI->config->item('base_url').$CI->config->item('index_page').$uri); -- cgit v1.2.3-24-g4f1b From bfa233f559a50ee0674a209fa56f866edc814fd9 Mon Sep 17 00:00:00 2001 From: Andrey Andreev Date: Fri, 5 Dec 2014 12:00:11 +0200 Subject: Further changes related to issue #47, PR #3323 - Removed a test that was created specifically for the 'convert programmatic characters to entities' feature. - Changed filter_uri() to accept by reference and to not return anything as its only purpose now is to trigger a show_error() call. - Added changelog messages and updated the upgrade instructions. --- system/core/Router.php | 13 ++++++++----- system/core/URI.php | 9 ++++----- 2 files changed, 12 insertions(+), 10 deletions(-) (limited to 'system/core') diff --git a/system/core/Router.php b/system/core/Router.php index 7f18adbf5..d86735f5f 100644 --- a/system/core/Router.php +++ b/system/core/Router.php @@ -171,18 +171,21 @@ class CI_Router { $_d = isset($_GET[$_d]) ? trim($_GET[$_d], " \t\n\r\0\x0B/") : ''; if ($_d !== '') { - $this->set_directory($this->uri->filter_uri($_d)); + $this->uri->filter_uri($_d); + $this->set_directory($_d); } - $_c = $this->config->item('controller_trigger'); + $_c = trim($this->config->item('controller_trigger')); if ( ! empty($_GET[$_c])) { - $this->set_class(trim($this->uri->filter_uri(trim($_GET[$_c])))); + $this->uri->filter_uri($_GET[$_c]); + $this->set_class($_GET[$_c]); - $_f = $this->config->item('function_trigger'); + $_f = trim($this->config->item('function_trigger')); if ( ! empty($_GET[$_f])) { - $this->set_method(trim($this->uri->filter_uri($_GET[$_f]))); + $this->uri->filter_uri($_GET[$_f]); + $this->set_method($_GET[$_f]); } $this->uri->rsegments = array( diff --git a/system/core/URI.php b/system/core/URI.php index 067338d2a..790910169 100644 --- a/system/core/URI.php +++ b/system/core/URI.php @@ -173,8 +173,9 @@ class CI_URI { // Populate the segments array foreach (explode('/', trim($this->uri_string, '/')) as $val) { + $val = trim($val); // Filter segments for security - $val = trim($this->filter_uri($val)); + $this->filter_uri($val); if ($val !== '') { @@ -318,16 +319,14 @@ class CI_URI { * Filters segments for malicious characters. * * @param string $str - * @return string + * @return void */ - public function filter_uri($str) + public function filter_uri(&$str) { if ( ! empty($str) && ! empty($this->_permitted_uri_chars) && ! preg_match('/^['.$this->_permitted_uri_chars.']+$/i'.(UTF8_ENABLED ? 'u' : ''), $str)) { show_error('The URI you submitted has disallowed characters.', 400); } - - return $str; } // -------------------------------------------------------------------- -- cgit v1.2.3-24-g4f1b From 162b1a9824deba1369d756eccc9535544452b479 Mon Sep 17 00:00:00 2001 From: Andrey Andreev Date: Mon, 8 Dec 2014 10:59:51 +0200 Subject: Fix 'Array to string conversion' notice in CSRF validation Rel: #3398 --- system/core/Security.php | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'system/core') diff --git a/system/core/Security.php b/system/core/Security.php index 6ed0f8d4f..8adc35676 100755 --- a/system/core/Security.php +++ b/system/core/Security.php @@ -977,8 +977,8 @@ class CI_Security { // We don't necessarily want to regenerate it with // each page load since a page could contain embedded // sub-pages causing this feature to fail - if (isset($_COOKIE[$this->_csrf_cookie_name]) && - preg_match('#^[0-9a-f]{32}$#iS', $_COOKIE[$this->_csrf_cookie_name]) === 1) + if (isset($_COOKIE[$this->_csrf_cookie_name]) && is_string($_COOKIE[$this->_csrf_cookie_name]) + && preg_match('#^[0-9a-f]{32}$#iS', $_COOKIE[$this->_csrf_cookie_name]) === 1) { return $this->_csrf_hash = $_COOKIE[$this->_csrf_cookie_name]; } -- cgit v1.2.3-24-g4f1b From 466e8ccb0ad647fd8e477e881dfddc14c6d7cbc8 Mon Sep 17 00:00:00 2001 From: Andrey Andreev Date: Mon, 15 Dec 2014 17:28:23 +0200 Subject: Remove output minifier This feature has proven to be problematic and it's not nearly as flexible as a dedicated minifier library like Minify (http://www.minifier.org/, https://github.com/matthiasmullie/minify). The same results in terms of saving traffic can also be achievied via gzip compression (which should also be done on the httpd level, but we also support anyway) and stuff like mod_pagespeed. Reverts PR #965 Related issues as a track record proving how problematic this has been: #2078 #1499 #2163 #2092 #2387 #2637 #2710 #2120 #2171 #2631 #2326 #2795 #2791 #2772 Additionally, the count of contributors suggesting that the only way to fix the minifier problems is to remove it, is around the same as the count of people suggesting the feature to be implemented in the first place. It was experimental anyway ... the experiment failed. --- system/core/Output.php | 208 ------------------------------------------------- 1 file changed, 208 deletions(-) (limited to 'system/core') diff --git a/system/core/Output.php b/system/core/Output.php index e8f0b1590..09d251fe2 100644 --- a/system/core/Output.php +++ b/system/core/Output.php @@ -426,14 +426,6 @@ class CI_Output { // -------------------------------------------------------------------- - // Is minify requested? - if ($CFG->item('minify_output') === TRUE) - { - $output = $this->minify($output, $this->mime_type); - } - - // -------------------------------------------------------------------- - // Do we need to write a cache file? Only if the controller does not have its // own _output() method and we are not dealing with a cache file, which we // can determine by the existence of the $CI object above @@ -784,206 +776,6 @@ class CI_Output { } } - // -------------------------------------------------------------------- - - /** - * Minify - * - * Reduce excessive size of HTML/CSS/JavaScript content. - * - * @param string $output Output to minify - * @param string $type Output content MIME type - * @return string Minified output - */ - public function minify($output, $type = 'text/html') - { - switch ($type) - { - case 'text/html': - - if (($size_before = strlen($output)) === 0) - { - return ''; - } - - // Find all the
,,}msU', $output, $textareas_clean);
-				preg_match_all('{}msU', $output, $javascript_clean);
-
-				// Minify the CSS in all the }msU', $output, $style_clean);
-				foreach ($style_clean[0] as $s)
-				{
-					$output = str_replace($s, $this->_minify_js_css($s, 'css', TRUE), $output);
-				}
-
-				// Minify the javascript in }msU', $output, $javascript_messed);
-					$output = str_replace($javascript_messed[0], $javascript_mini, $output);
-				}
-
-				$size_removed = $size_before - strlen($output);
-				$savings_percent = round(($size_removed / $size_before * 100));
-
-				log_message('debug', 'Minifier shaved '.($size_removed / 1000).'KB ('.$savings_percent.'%) off final HTML output.');
-
-			break;
-
-			case 'text/css':
-
-				return $this->_minify_js_css($output, 'css');
-
-			case 'text/javascript':
-			case 'application/javascript':
-			case 'application/x-javascript':
-
-				return $this->_minify_js_css($output, 'js');
-
-			default: break;
-		}
-
-		return $output;
-	}
-
-	// --------------------------------------------------------------------
-
-	/**
-	 * Minify JavaScript and CSS code
-	 *
-	 * Strips comments and excessive whitespace characters
-	 *
-	 * @param	string	$output
-	 * @param	string	$type	'js' or 'css'
-	 * @param	bool	$tags	Whether $output contains the 'script' or 'style' tag
-	 * @return	string
-	 */
-	protected function _minify_js_css($output, $type, $tags = FALSE)
-	{
-		if ($tags === TRUE)
-		{
-			$tags = array('close' => strrchr($output, '<'));
-
-			$open_length = strpos($output, '>') + 1;
-			$tags['open'] = substr($output, 0, $open_length);
-
-			$output = substr($output, $open_length, -strlen($tags['close']));
-
-			// Strip spaces from the tags
-			$tags = preg_replace('#\s{2,}#', ' ', $tags);
-		}
-
-		$output = trim($output);
-
-		if ($type === 'js')
-		{
-			// Catch all string literals and comment blocks
-			if (preg_match_all('#((?:((??@\[\]^`{|}~])\s*#'	=> '$1',	// Remove spaces following and preceeding JS-wise non-special & non-word characters
-				'#\s{2,}#'					=> ' '		// Reduce the remaining multiple whitespace characters to a single space
-			);
-		}
-		else
-		{
-			$patterns = array(
-				'#/\*.*(?=\*/)\*/#s'	=> '',		// Remove /* block comments */
-				'#\n?//[^\n]*#'		=> '',		// Remove // line comments
-				'#\s*([^\w.\#%])\s*#U'	=> '$1',	// Remove spaces following and preceeding non-word characters, excluding dots, hashes and the percent sign
-				'#\s{2,}#'		=> ' '		// Reduce the remaining multiple space characters to a single space
-			);
-		}
-
-		$$varname = preg_replace(array_keys($patterns), array_values($patterns), $$varname);
-
-		// Glue back JS quoted strings
-		if ($type === 'js')
-		{
-			$js_code += $js_literals;
-			ksort($js_code);
-			$output = implode($js_code);
-			unset($js_code, $js_literals, $varname, $patterns);
-		}
-
-		return is_array($tags)
-			? $tags['open'].$output.$tags['close']
-			: $output;
-	}
-
 }
 
 /* End of file Output.php */
-- 
cgit v1.2.3-24-g4f1b


From bb177984d7207ecf0bf0e14a389e54d59e9ea0b8 Mon Sep 17 00:00:00 2001
From: warpcode 
Date: Tue, 16 Dec 2014 11:29:53 +0000
Subject: Fix Issue #3417

---
 system/core/Security.php | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

(limited to 'system/core')

diff --git a/system/core/Security.php b/system/core/Security.php
index 8adc35676..2ac61a540 100755
--- a/system/core/Security.php
+++ b/system/core/Security.php
@@ -673,7 +673,7 @@ class CI_Security {
 
 			// Decode numeric & UTF16 two byte entities
 			$str = html_entity_decode(
-				preg_replace('/(&#(?:x0*[0-9a-f]{2,5}(?![0-9a-f;]))|(?:0*\d{2,4}(?![0-9;])))/iS', '$1;', $str),
+				preg_replace('/(&#(?:x0*[0-9a-f]{2,5}(?![0-9a-f;])|(?:0*\d{2,4}(?![0-9;]))))/iS', '$1;', $str),
 				$flag,
 				$charset
 			);
@@ -995,4 +995,4 @@ class CI_Security {
 }
 
 /* End of file Security.php */
-/* Location: ./system/core/Security.php */
\ No newline at end of file
+/* Location: ./system/core/Security.php */
-- 
cgit v1.2.3-24-g4f1b


From e11657cc3f721a59ccb9cf37d3c099bd6d02e6ab Mon Sep 17 00:00:00 2001
From: Jason Taylor 
Date: Tue, 16 Dec 2014 12:33:36 +0000
Subject: Remove trailing newline

---
 system/core/Security.php | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

(limited to 'system/core')

diff --git a/system/core/Security.php b/system/core/Security.php
index 2ac61a540..8ad0518a4 100755
--- a/system/core/Security.php
+++ b/system/core/Security.php
@@ -995,4 +995,4 @@ class CI_Security {
 }
 
 /* End of file Security.php */
-/* Location: ./system/core/Security.php */
+/* Location: ./system/core/Security.php */
\ No newline at end of file
-- 
cgit v1.2.3-24-g4f1b


From 42bc6d51e15c180f35632d5c03c649225f8dbf74 Mon Sep 17 00:00:00 2001
From: Andrey Andreev 
Date: Tue, 16 Dec 2014 16:16:45 +0200
Subject: Fix #3419

---
 system/core/Config.php | 69 ++++++++++++++++++++------------------------------
 1 file changed, 28 insertions(+), 41 deletions(-)

(limited to 'system/core')

diff --git a/system/core/Config.php b/system/core/Config.php
index d8a606c14..ca865cebf 100644
--- a/system/core/Config.php
+++ b/system/core/Config.php
@@ -120,74 +120,61 @@ class CI_Config {
 
 		foreach ($this->_config_paths as $path)
 		{
-			$found = FALSE;
-			foreach (array(ENVIRONMENT.'/'.$file, $file) as $location)
+			foreach (array($file, ENVIRONMENT.'/'.$file) as $location)
 			{
 				$file_path = $path.'config/'.$location.'.php';
 
 				if (in_array($file_path, $this->is_loaded, TRUE))
 				{
-					$loaded = TRUE;
-					continue 2;
+					return TRUE;
 				}
 
-				if (file_exists($file_path))
+				if ( ! file_exists($file_path))
 				{
-					$found = TRUE;
-					break;
+					continue;
 				}
-			}
-
-			if ($found === FALSE)
-			{
-				continue;
-			}
 
-			include($file_path);
+				include($file_path);
 
-			if ( ! isset($config) OR ! is_array($config))
-			{
-				if ($fail_gracefully === TRUE)
+				if ( ! isset($config) OR ! is_array($config))
 				{
-					return FALSE;
+					if ($fail_gracefully === TRUE)
+					{
+						return FALSE;
+					}
+
+					show_error('Your '.$file_path.' file does not appear to contain a valid configuration array.');
 				}
-				show_error('Your '.$file_path.' file does not appear to contain a valid configuration array.');
-			}
 
-			if ($use_sections === TRUE)
-			{
-				if (isset($this->config[$file]))
+				if ($use_sections === TRUE)
 				{
-					$this->config[$file] = array_merge($this->config[$file], $config);
+					$this->config[$file] = isset($this->config[$file])
+						? array_merge($this->config[$file], $config)
+						: $config;
 				}
 				else
 				{
-					$this->config[$file] = $config;
+					$this->config = array_merge($this->config, $config);
 				}
+
+				$this->is_loaded[] = $file_path;
+				$config = NULL;
+				$loaded = TRUE;
+				log_message('debug', 'Config file loaded: '.$file_path);
 			}
-			else
+
+			if ($loaded === TRUE)
 			{
-				$this->config = array_merge($this->config, $config);
+				return TRUE;
 			}
-
-			$this->is_loaded[] = $file_path;
-			unset($config);
-
-			$loaded = TRUE;
-			log_message('debug', 'Config file loaded: '.$file_path);
-			break;
 		}
 
-		if ($loaded === FALSE)
+		if ($fail_gracefully === TRUE)
 		{
-			if ($fail_gracefully === TRUE)
-			{
-				return FALSE;
-			}
-			show_error('The configuration file '.$file.'.php does not exist.');
+			return FALSE;
 		}
 
-		return TRUE;
+		show_error('The configuration file '.$file.'.php does not exist.');
 	}
 
 	// --------------------------------------------------------------------
-- 
cgit v1.2.3-24-g4f1b


From 95c31adc770164f27c8dd678f30c60494827af02 Mon Sep 17 00:00:00 2001
From: Andrey Andreev 
Date: Wed, 17 Dec 2014 19:01:31 +0200
Subject: Extend fix for #3419

---
 system/core/Loader.php | 38 +++++++++++++++++++++-----------------
 1 file changed, 21 insertions(+), 17 deletions(-)

(limited to 'system/core')

diff --git a/system/core/Loader.php b/system/core/Loader.php
index e0a7d5e1b..afdedf522 100644
--- a/system/core/Loader.php
+++ b/system/core/Loader.php
@@ -1090,31 +1090,38 @@ class CI_Loader {
 
 			if (is_array($config_component->_config_paths))
 			{
-				// Break on the first found file, thus package files
-				// are not overridden by default paths
+				$found = FALSE;
 				foreach ($config_component->_config_paths as $path)
 				{
 					// We test for both uppercase and lowercase, for servers that
-					// are case-sensitive with regard to file names. Check for environment
-					// first, global next
+					// are case-sensitive with regard to file names. Load global first,
+					// override with environment next
+					if (file_exists($path.'config/'.strtolower($class).'.php'))
+					{
+						include($path.'config/'.strtolower($class).'.php');
+						$found = TRUE;
+					}
+					elseif (file_exists($path.'config/'.ucfirst(strtolower($class)).'.php'))
+					{
+						include($path.'config/'.ucfirst(strtolower($class)).'.php');
+						$found = TRUE;
+					}
+
 					if (file_exists($path.'config/'.ENVIRONMENT.'/'.strtolower($class).'.php'))
 					{
 						include($path.'config/'.ENVIRONMENT.'/'.strtolower($class).'.php');
-						break;
+						$found = TRUE;
 					}
 					elseif (file_exists($path.'config/'.ENVIRONMENT.'/'.ucfirst(strtolower($class)).'.php'))
 					{
 						include($path.'config/'.ENVIRONMENT.'/'.ucfirst(strtolower($class)).'.php');
-						break;
+						$found = TRUE;
 					}
-					elseif (file_exists($path.'config/'.strtolower($class).'.php'))
-					{
-						include($path.'config/'.strtolower($class).'.php');
-						break;
-					}
-					elseif (file_exists($path.'config/'.ucfirst(strtolower($class)).'.php'))
+
+					// Break on the first found configuration, thus package
+					// files are not overridden by default paths
+					if ($found === TRUE)
 					{
-						include($path.'config/'.ucfirst(strtolower($class)).'.php');
 						break;
 					}
 				}
@@ -1193,14 +1200,11 @@ class CI_Loader {
 	 */
 	protected function _ci_autoloader()
 	{
+		include(APPPATH.'config/autoload.php');
 		if (file_exists(APPPATH.'config/'.ENVIRONMENT.'/autoload.php'))
 		{
 			include(APPPATH.'config/'.ENVIRONMENT.'/autoload.php');
 		}
-		else
-		{
-			include(APPPATH.'config/autoload.php');
-		}
 
 		if ( ! isset($autoload))
 		{
-- 
cgit v1.2.3-24-g4f1b


From 72d63cdb448284251a2fccb45f509117e45ea2b9 Mon Sep 17 00:00:00 2001
From: Claudio Galdiolo 
Date: Mon, 22 Dec 2014 15:18:14 -0500
Subject: fix typo in the comments

---
 system/core/CodeIgniter.php | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

(limited to 'system/core')

diff --git a/system/core/CodeIgniter.php b/system/core/CodeIgniter.php
index 88e730bc3..b1da42d54 100644
--- a/system/core/CodeIgniter.php
+++ b/system/core/CodeIgniter.php
@@ -145,7 +145,7 @@ if ( ! is_php('5.4'))
  * The subclass prefix allows CI to know if a core class is
  * being extended via a library in the local application
  * "libraries" folder. Since CI allows config items to be
- * overriden via data set in the main index.php file,
+ * overridden via data set in the main index.php file,
  * before proceeding we need to know if a subclass_prefix
  * override exists. If so, we will set this value now,
  * before any classes are loaded
-- 
cgit v1.2.3-24-g4f1b


From 1e5a9b18f0cbef5092b95378e34ad8e7eaf0c7e7 Mon Sep 17 00:00:00 2001
From: Andrey Andreev 
Date: Sat, 3 Jan 2015 20:25:38 +0200
Subject: Fix #3453

Allow hyphens and underscores in language idioms.
---
 system/core/Lang.php | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

(limited to 'system/core')

diff --git a/system/core/Lang.php b/system/core/Lang.php
index c0cd34a3d..9aaf944ce 100644
--- a/system/core/Lang.php
+++ b/system/core/Lang.php
@@ -106,7 +106,7 @@ class CI_Lang {
 
 		$langfile .= '.php';
 
-		if (empty($idiom) OR ! ctype_alpha($idiom))
+		if (empty($idiom) OR ! preg_match('/^[a-z_-]$/i', $idiom))
 		{
 			$config =& get_config();
 			$idiom = empty($config['language']) ? 'english' : $config['language'];
-- 
cgit v1.2.3-24-g4f1b


From 4be16041b2bd585d5715cb65e147241bbdff2106 Mon Sep 17 00:00:00 2001
From: vlakoff 
Date: Sun, 4 Jan 2015 17:16:20 +0100
Subject: Change order of hooks loading

Let override hooks via environment-specific config.
---
 system/core/Hooks.php | 8 ++++----
 1 file changed, 4 insertions(+), 4 deletions(-)

(limited to 'system/core')

diff --git a/system/core/Hooks.php b/system/core/Hooks.php
index 57e4a99a6..4ec7698d7 100644
--- a/system/core/Hooks.php
+++ b/system/core/Hooks.php
@@ -99,14 +99,14 @@ class CI_Hooks {
 		}
 
 		// Grab the "hooks" definition file.
-		if (file_exists(APPPATH.'config/'.ENVIRONMENT.'/hooks.php'))
+		if (file_exists(APPPATH.'config/hooks.php'))
 		{
-			include(APPPATH.'config/'.ENVIRONMENT.'/hooks.php');
+			include(APPPATH.'config/hooks.php');
 		}
 
-		if (file_exists(APPPATH.'config/hooks.php'))
+		if (file_exists(APPPATH.'config/'.ENVIRONMENT.'/hooks.php'))
 		{
-			include(APPPATH.'config/hooks.php');
+			include(APPPATH.'config/'.ENVIRONMENT.'/hooks.php');
 		}
 
 		// If there are no hooks, we're done.
-- 
cgit v1.2.3-24-g4f1b


From 93455e31f1f88fa88394091a5156ac96e61c4179 Mon Sep 17 00:00:00 2001
From: Andrey Andreev 
Date: Fri, 9 Jan 2015 16:15:45 +0200
Subject: Fix E_WARNING in CI_Security::entity_decode() on PHP<5.3.4

Related: #3057
Previous commit: 487d1ae060e6414e0a59c9752a4914fa3b8c4710
---
 system/core/Security.php | 7 ++++++-
 1 file changed, 6 insertions(+), 1 deletion(-)

(limited to 'system/core')

diff --git a/system/core/Security.php b/system/core/Security.php
index 8ad0518a4..6b1140562 100755
--- a/system/core/Security.php
+++ b/system/core/Security.php
@@ -644,7 +644,12 @@ class CI_Security {
 			{
 				if ( ! isset($_entities))
 				{
-					$_entities = array_map('strtolower', get_html_translation_table(HTML_ENTITIES, $flag, $charset));
+					$_entities = array_map(
+						'strtolower',
+						is_php('5.3.4')
+							? get_html_translation_table(HTML_ENTITIES, $flag, $charset)
+							: get_html_translation_table(HTML_ENTITIES, $flag)
+					);
 
 					// If we're not on PHP 5.4+, add the possibly dangerous HTML 5
 					// entities to the array manually
-- 
cgit v1.2.3-24-g4f1b


From fe9309d22c1b088f5363954d6dac013c8c955894 Mon Sep 17 00:00:00 2001
From: Andrey Andreev 
Date: Fri, 9 Jan 2015 17:48:58 +0200
Subject: Bulk (mostly documentation) update

 - Remove PHP version from license notices
 - Bump year number in copyright notices
 - Recommend PHP 5.4 or newer to be used
 - Tell Travis-CI to test on PHP 5.3.0 instead of the latest 5.3 version

Related: #3450
---
 system/core/Benchmark.php       | 6 +++---
 system/core/CodeIgniter.php     | 6 +++---
 system/core/Common.php          | 6 +++---
 system/core/Config.php          | 6 +++---
 system/core/Controller.php      | 6 +++---
 system/core/Exceptions.php      | 6 +++---
 system/core/Hooks.php           | 6 +++---
 system/core/Input.php           | 6 +++---
 system/core/Lang.php            | 6 +++---
 system/core/Loader.php          | 6 +++---
 system/core/Log.php             | 6 +++---
 system/core/Model.php           | 6 +++---
 system/core/Output.php          | 6 +++---
 system/core/Router.php          | 6 +++---
 system/core/Security.php        | 6 +++---
 system/core/URI.php             | 6 +++---
 system/core/Utf8.php            | 6 +++---
 system/core/compat/hash.php     | 6 +++---
 system/core/compat/mbstring.php | 6 +++---
 system/core/compat/password.php | 6 +++---
 system/core/compat/standard.php | 6 +++---
 21 files changed, 63 insertions(+), 63 deletions(-)
 mode change 100755 => 100644 system/core/Security.php

(limited to 'system/core')

diff --git a/system/core/Benchmark.php b/system/core/Benchmark.php
index b661e9451..86f3ae1aa 100644
--- a/system/core/Benchmark.php
+++ b/system/core/Benchmark.php
@@ -2,11 +2,11 @@
 /**
  * CodeIgniter
  *
- * An open source application development framework for PHP 5.2.4 or newer
+ * An open source application development framework for PHP
  *
  * This content is released under the MIT License (MIT)
  *
- * Copyright (c) 2014, British Columbia Institute of Technology
+ * Copyright (c) 2014 - 2015, British Columbia Institute of Technology
  *
  * Permission is hereby granted, free of charge, to any person obtaining a copy
  * of this software and associated documentation files (the "Software"), to deal
@@ -29,7 +29,7 @@
  * @package	CodeIgniter
  * @author	EllisLab Dev Team
  * @copyright	Copyright (c) 2008 - 2014, EllisLab, Inc. (http://ellislab.com/)
- * @copyright	Copyright (c) 2014, British Columbia Institute of Technology (http://bcit.ca/)
+ * @copyright	Copyright (c) 2014 - 2015, British Columbia Institute of Technology (http://bcit.ca/)
  * @license	http://opensource.org/licenses/MIT	MIT License
  * @link	http://codeigniter.com
  * @since	Version 1.0.0
diff --git a/system/core/CodeIgniter.php b/system/core/CodeIgniter.php
index b1da42d54..59fdba0e5 100644
--- a/system/core/CodeIgniter.php
+++ b/system/core/CodeIgniter.php
@@ -2,11 +2,11 @@
 /**
  * CodeIgniter
  *
- * An open source application development framework for PHP 5.2.4 or newer
+ * An open source application development framework for PHP
  *
  * This content is released under the MIT License (MIT)
  *
- * Copyright (c) 2014, British Columbia Institute of Technology
+ * Copyright (c) 2014 - 2015, British Columbia Institute of Technology
  *
  * Permission is hereby granted, free of charge, to any person obtaining a copy
  * of this software and associated documentation files (the "Software"), to deal
@@ -29,7 +29,7 @@
  * @package	CodeIgniter
  * @author	EllisLab Dev Team
  * @copyright	Copyright (c) 2008 - 2014, EllisLab, Inc. (http://ellislab.com/)
- * @copyright	Copyright (c) 2014, British Columbia Institute of Technology (http://bcit.ca/)
+ * @copyright	Copyright (c) 2014 - 2015, British Columbia Institute of Technology (http://bcit.ca/)
  * @license	http://opensource.org/licenses/MIT	MIT License
  * @link	http://codeigniter.com
  * @since	Version 1.0.0
diff --git a/system/core/Common.php b/system/core/Common.php
index efb52e788..b5a36636e 100644
--- a/system/core/Common.php
+++ b/system/core/Common.php
@@ -2,11 +2,11 @@
 /**
  * CodeIgniter
  *
- * An open source application development framework for PHP 5.2.4 or newer
+ * An open source application development framework for PHP
  *
  * This content is released under the MIT License (MIT)
  *
- * Copyright (c) 2014, British Columbia Institute of Technology
+ * Copyright (c) 2014 - 2015, British Columbia Institute of Technology
  *
  * Permission is hereby granted, free of charge, to any person obtaining a copy
  * of this software and associated documentation files (the "Software"), to deal
@@ -29,7 +29,7 @@
  * @package	CodeIgniter
  * @author	EllisLab Dev Team
  * @copyright	Copyright (c) 2008 - 2014, EllisLab, Inc. (http://ellislab.com/)
- * @copyright	Copyright (c) 2014, British Columbia Institute of Technology (http://bcit.ca/)
+ * @copyright	Copyright (c) 2014 - 2015, British Columbia Institute of Technology (http://bcit.ca/)
  * @license	http://opensource.org/licenses/MIT	MIT License
  * @link	http://codeigniter.com
  * @since	Version 1.0.0
diff --git a/system/core/Config.php b/system/core/Config.php
index ca865cebf..d5ce91f48 100644
--- a/system/core/Config.php
+++ b/system/core/Config.php
@@ -2,11 +2,11 @@
 /**
  * CodeIgniter
  *
- * An open source application development framework for PHP 5.2.4 or newer
+ * An open source application development framework for PHP
  *
  * This content is released under the MIT License (MIT)
  *
- * Copyright (c) 2014, British Columbia Institute of Technology
+ * Copyright (c) 2014 - 2015, British Columbia Institute of Technology
  *
  * Permission is hereby granted, free of charge, to any person obtaining a copy
  * of this software and associated documentation files (the "Software"), to deal
@@ -29,7 +29,7 @@
  * @package	CodeIgniter
  * @author	EllisLab Dev Team
  * @copyright	Copyright (c) 2008 - 2014, EllisLab, Inc. (http://ellislab.com/)
- * @copyright	Copyright (c) 2014, British Columbia Institute of Technology (http://bcit.ca/)
+ * @copyright	Copyright (c) 2014 - 2015, British Columbia Institute of Technology (http://bcit.ca/)
  * @license	http://opensource.org/licenses/MIT	MIT License
  * @link	http://codeigniter.com
  * @since	Version 1.0.0
diff --git a/system/core/Controller.php b/system/core/Controller.php
index f553d1f3d..06005b058 100644
--- a/system/core/Controller.php
+++ b/system/core/Controller.php
@@ -2,11 +2,11 @@
 /**
  * CodeIgniter
  *
- * An open source application development framework for PHP 5.2.4 or newer
+ * An open source application development framework for PHP
  *
  * This content is released under the MIT License (MIT)
  *
- * Copyright (c) 2014, British Columbia Institute of Technology
+ * Copyright (c) 2014 - 2015, British Columbia Institute of Technology
  *
  * Permission is hereby granted, free of charge, to any person obtaining a copy
  * of this software and associated documentation files (the "Software"), to deal
@@ -29,7 +29,7 @@
  * @package	CodeIgniter
  * @author	EllisLab Dev Team
  * @copyright	Copyright (c) 2008 - 2014, EllisLab, Inc. (http://ellislab.com/)
- * @copyright	Copyright (c) 2014, British Columbia Institute of Technology (http://bcit.ca/)
+ * @copyright	Copyright (c) 2014 - 2015, British Columbia Institute of Technology (http://bcit.ca/)
  * @license	http://opensource.org/licenses/MIT	MIT License
  * @link	http://codeigniter.com
  * @since	Version 1.0.0
diff --git a/system/core/Exceptions.php b/system/core/Exceptions.php
index 0531a4e92..550e03b78 100644
--- a/system/core/Exceptions.php
+++ b/system/core/Exceptions.php
@@ -2,11 +2,11 @@
 /**
  * CodeIgniter
  *
- * An open source application development framework for PHP 5.2.4 or newer
+ * An open source application development framework for PHP
  *
  * This content is released under the MIT License (MIT)
  *
- * Copyright (c) 2014, British Columbia Institute of Technology
+ * Copyright (c) 2014 - 2015, British Columbia Institute of Technology
  *
  * Permission is hereby granted, free of charge, to any person obtaining a copy
  * of this software and associated documentation files (the "Software"), to deal
@@ -29,7 +29,7 @@
  * @package	CodeIgniter
  * @author	EllisLab Dev Team
  * @copyright	Copyright (c) 2008 - 2014, EllisLab, Inc. (http://ellislab.com/)
- * @copyright	Copyright (c) 2014, British Columbia Institute of Technology (http://bcit.ca/)
+ * @copyright	Copyright (c) 2014 - 2015, British Columbia Institute of Technology (http://bcit.ca/)
  * @license	http://opensource.org/licenses/MIT	MIT License
  * @link	http://codeigniter.com
  * @since	Version 1.0.0
diff --git a/system/core/Hooks.php b/system/core/Hooks.php
index 4ec7698d7..429d6bceb 100644
--- a/system/core/Hooks.php
+++ b/system/core/Hooks.php
@@ -2,11 +2,11 @@
 /**
  * CodeIgniter
  *
- * An open source application development framework for PHP 5.2.4 or newer
+ * An open source application development framework for PHP
  *
  * This content is released under the MIT License (MIT)
  *
- * Copyright (c) 2014, British Columbia Institute of Technology
+ * Copyright (c) 2014 - 2015, British Columbia Institute of Technology
  *
  * Permission is hereby granted, free of charge, to any person obtaining a copy
  * of this software and associated documentation files (the "Software"), to deal
@@ -29,7 +29,7 @@
  * @package	CodeIgniter
  * @author	EllisLab Dev Team
  * @copyright	Copyright (c) 2008 - 2014, EllisLab, Inc. (http://ellislab.com/)
- * @copyright	Copyright (c) 2014, British Columbia Institute of Technology (http://bcit.ca/)
+ * @copyright	Copyright (c) 2014 - 2015, British Columbia Institute of Technology (http://bcit.ca/)
  * @license	http://opensource.org/licenses/MIT	MIT License
  * @link	http://codeigniter.com
  * @since	Version 1.0.0
diff --git a/system/core/Input.php b/system/core/Input.php
index 0c6025d1e..358417c79 100644
--- a/system/core/Input.php
+++ b/system/core/Input.php
@@ -2,11 +2,11 @@
 /**
  * CodeIgniter
  *
- * An open source application development framework for PHP 5.2.4 or newer
+ * An open source application development framework for PHP
  *
  * This content is released under the MIT License (MIT)
  *
- * Copyright (c) 2014, British Columbia Institute of Technology
+ * Copyright (c) 2014 - 2015, British Columbia Institute of Technology
  *
  * Permission is hereby granted, free of charge, to any person obtaining a copy
  * of this software and associated documentation files (the "Software"), to deal
@@ -29,7 +29,7 @@
  * @package	CodeIgniter
  * @author	EllisLab Dev Team
  * @copyright	Copyright (c) 2008 - 2014, EllisLab, Inc. (http://ellislab.com/)
- * @copyright	Copyright (c) 2014, British Columbia Institute of Technology (http://bcit.ca/)
+ * @copyright	Copyright (c) 2014 - 2015, British Columbia Institute of Technology (http://bcit.ca/)
  * @license	http://opensource.org/licenses/MIT	MIT License
  * @link	http://codeigniter.com
  * @since	Version 1.0.0
diff --git a/system/core/Lang.php b/system/core/Lang.php
index 9aaf944ce..c74729035 100644
--- a/system/core/Lang.php
+++ b/system/core/Lang.php
@@ -2,11 +2,11 @@
 /**
  * CodeIgniter
  *
- * An open source application development framework for PHP 5.2.4 or newer
+ * An open source application development framework for PHP
  *
  * This content is released under the MIT License (MIT)
  *
- * Copyright (c) 2014, British Columbia Institute of Technology
+ * Copyright (c) 2014 - 2015, British Columbia Institute of Technology
  *
  * Permission is hereby granted, free of charge, to any person obtaining a copy
  * of this software and associated documentation files (the "Software"), to deal
@@ -29,7 +29,7 @@
  * @package	CodeIgniter
  * @author	EllisLab Dev Team
  * @copyright	Copyright (c) 2008 - 2014, EllisLab, Inc. (http://ellislab.com/)
- * @copyright	Copyright (c) 2014, British Columbia Institute of Technology (http://bcit.ca/)
+ * @copyright	Copyright (c) 2014 - 2015, British Columbia Institute of Technology (http://bcit.ca/)
  * @license	http://opensource.org/licenses/MIT	MIT License
  * @link	http://codeigniter.com
  * @since	Version 1.0.0
diff --git a/system/core/Loader.php b/system/core/Loader.php
index afdedf522..d930dbfa8 100644
--- a/system/core/Loader.php
+++ b/system/core/Loader.php
@@ -2,11 +2,11 @@
 /**
  * CodeIgniter
  *
- * An open source application development framework for PHP 5.2.4 or newer
+ * An open source application development framework for PHP
  *
  * This content is released under the MIT License (MIT)
  *
- * Copyright (c) 2014, British Columbia Institute of Technology
+ * Copyright (c) 2014 - 2015, British Columbia Institute of Technology
  *
  * Permission is hereby granted, free of charge, to any person obtaining a copy
  * of this software and associated documentation files (the "Software"), to deal
@@ -29,7 +29,7 @@
  * @package	CodeIgniter
  * @author	EllisLab Dev Team
  * @copyright	Copyright (c) 2008 - 2014, EllisLab, Inc. (http://ellislab.com/)
- * @copyright	Copyright (c) 2014, British Columbia Institute of Technology (http://bcit.ca/)
+ * @copyright	Copyright (c) 2014 - 2015, British Columbia Institute of Technology (http://bcit.ca/)
  * @license	http://opensource.org/licenses/MIT	MIT License
  * @link	http://codeigniter.com
  * @since	Version 1.0.0
diff --git a/system/core/Log.php b/system/core/Log.php
index b0576c58f..7d318ed57 100644
--- a/system/core/Log.php
+++ b/system/core/Log.php
@@ -2,11 +2,11 @@
 /**
  * CodeIgniter
  *
- * An open source application development framework for PHP 5.2.4 or newer
+ * An open source application development framework for PHP
  *
  * This content is released under the MIT License (MIT)
  *
- * Copyright (c) 2014, British Columbia Institute of Technology
+ * Copyright (c) 2014 - 2015, British Columbia Institute of Technology
  *
  * Permission is hereby granted, free of charge, to any person obtaining a copy
  * of this software and associated documentation files (the "Software"), to deal
@@ -29,7 +29,7 @@
  * @package	CodeIgniter
  * @author	EllisLab Dev Team
  * @copyright	Copyright (c) 2008 - 2014, EllisLab, Inc. (http://ellislab.com/)
- * @copyright	Copyright (c) 2014, British Columbia Institute of Technology (http://bcit.ca/)
+ * @copyright	Copyright (c) 2014 - 2015, British Columbia Institute of Technology (http://bcit.ca/)
  * @license	http://opensource.org/licenses/MIT	MIT License
  * @link	http://codeigniter.com
  * @since	Version 1.0.0
diff --git a/system/core/Model.php b/system/core/Model.php
index c5dff29ec..1cb00f742 100644
--- a/system/core/Model.php
+++ b/system/core/Model.php
@@ -2,11 +2,11 @@
 /**
  * CodeIgniter
  *
- * An open source application development framework for PHP 5.2.4 or newer
+ * An open source application development framework for PHP
  *
  * This content is released under the MIT License (MIT)
  *
- * Copyright (c) 2014, British Columbia Institute of Technology
+ * Copyright (c) 2014 - 2015, British Columbia Institute of Technology
  *
  * Permission is hereby granted, free of charge, to any person obtaining a copy
  * of this software and associated documentation files (the "Software"), to deal
@@ -29,7 +29,7 @@
  * @package	CodeIgniter
  * @author	EllisLab Dev Team
  * @copyright	Copyright (c) 2008 - 2014, EllisLab, Inc. (http://ellislab.com/)
- * @copyright	Copyright (c) 2014, British Columbia Institute of Technology (http://bcit.ca/)
+ * @copyright	Copyright (c) 2014 - 2015, British Columbia Institute of Technology (http://bcit.ca/)
  * @license	http://opensource.org/licenses/MIT	MIT License
  * @link	http://codeigniter.com
  * @since	Version 1.0.0
diff --git a/system/core/Output.php b/system/core/Output.php
index 09d251fe2..beac6b377 100644
--- a/system/core/Output.php
+++ b/system/core/Output.php
@@ -2,11 +2,11 @@
 /**
  * CodeIgniter
  *
- * An open source application development framework for PHP 5.2.4 or newer
+ * An open source application development framework for PHP
  *
  * This content is released under the MIT License (MIT)
  *
- * Copyright (c) 2014, British Columbia Institute of Technology
+ * Copyright (c) 2014 - 2015, British Columbia Institute of Technology
  *
  * Permission is hereby granted, free of charge, to any person obtaining a copy
  * of this software and associated documentation files (the "Software"), to deal
@@ -29,7 +29,7 @@
  * @package	CodeIgniter
  * @author	EllisLab Dev Team
  * @copyright	Copyright (c) 2008 - 2014, EllisLab, Inc. (http://ellislab.com/)
- * @copyright	Copyright (c) 2014, British Columbia Institute of Technology (http://bcit.ca/)
+ * @copyright	Copyright (c) 2014 - 2015, British Columbia Institute of Technology (http://bcit.ca/)
  * @license	http://opensource.org/licenses/MIT	MIT License
  * @link	http://codeigniter.com
  * @since	Version 1.0.0
diff --git a/system/core/Router.php b/system/core/Router.php
index d86735f5f..b21335fc2 100644
--- a/system/core/Router.php
+++ b/system/core/Router.php
@@ -2,11 +2,11 @@
 /**
  * CodeIgniter
  *
- * An open source application development framework for PHP 5.2.4 or newer
+ * An open source application development framework for PHP
  *
  * This content is released under the MIT License (MIT)
  *
- * Copyright (c) 2014, British Columbia Institute of Technology
+ * Copyright (c) 2014 - 2015, British Columbia Institute of Technology
  *
  * Permission is hereby granted, free of charge, to any person obtaining a copy
  * of this software and associated documentation files (the "Software"), to deal
@@ -29,7 +29,7 @@
  * @package	CodeIgniter
  * @author	EllisLab Dev Team
  * @copyright	Copyright (c) 2008 - 2014, EllisLab, Inc. (http://ellislab.com/)
- * @copyright	Copyright (c) 2014, British Columbia Institute of Technology (http://bcit.ca/)
+ * @copyright	Copyright (c) 2014 - 2015, British Columbia Institute of Technology (http://bcit.ca/)
  * @license	http://opensource.org/licenses/MIT	MIT License
  * @link	http://codeigniter.com
  * @since	Version 1.0.0
diff --git a/system/core/Security.php b/system/core/Security.php
old mode 100755
new mode 100644
index 6b1140562..2bf0f6284
--- a/system/core/Security.php
+++ b/system/core/Security.php
@@ -2,11 +2,11 @@
 /**
  * CodeIgniter
  *
- * An open source application development framework for PHP 5.2.4 or newer
+ * An open source application development framework for PHP
  *
  * This content is released under the MIT License (MIT)
  *
- * Copyright (c) 2014, British Columbia Institute of Technology
+ * Copyright (c) 2014 - 2015, British Columbia Institute of Technology
  *
  * Permission is hereby granted, free of charge, to any person obtaining a copy
  * of this software and associated documentation files (the "Software"), to deal
@@ -29,7 +29,7 @@
  * @package	CodeIgniter
  * @author	EllisLab Dev Team
  * @copyright	Copyright (c) 2008 - 2014, EllisLab, Inc. (http://ellislab.com/)
- * @copyright	Copyright (c) 2014, British Columbia Institute of Technology (http://bcit.ca/)
+ * @copyright	Copyright (c) 2014 - 2015, British Columbia Institute of Technology (http://bcit.ca/)
  * @license	http://opensource.org/licenses/MIT	MIT License
  * @link	http://codeigniter.com
  * @since	Version 1.0.0
diff --git a/system/core/URI.php b/system/core/URI.php
index 790910169..39d1a8f30 100644
--- a/system/core/URI.php
+++ b/system/core/URI.php
@@ -2,11 +2,11 @@
 /**
  * CodeIgniter
  *
- * An open source application development framework for PHP 5.2.4 or newer
+ * An open source application development framework for PHP
  *
  * This content is released under the MIT License (MIT)
  *
- * Copyright (c) 2014, British Columbia Institute of Technology
+ * Copyright (c) 2014 - 2015, British Columbia Institute of Technology
  *
  * Permission is hereby granted, free of charge, to any person obtaining a copy
  * of this software and associated documentation files (the "Software"), to deal
@@ -29,7 +29,7 @@
  * @package	CodeIgniter
  * @author	EllisLab Dev Team
  * @copyright	Copyright (c) 2008 - 2014, EllisLab, Inc. (http://ellislab.com/)
- * @copyright	Copyright (c) 2014, British Columbia Institute of Technology (http://bcit.ca/)
+ * @copyright	Copyright (c) 2014 - 2015, British Columbia Institute of Technology (http://bcit.ca/)
  * @license	http://opensource.org/licenses/MIT	MIT License
  * @link	http://codeigniter.com
  * @since	Version 1.0.0
diff --git a/system/core/Utf8.php b/system/core/Utf8.php
index 52f21de75..bca95c206 100644
--- a/system/core/Utf8.php
+++ b/system/core/Utf8.php
@@ -2,11 +2,11 @@
 /**
  * CodeIgniter
  *
- * An open source application development framework for PHP 5.2.4 or newer
+ * An open source application development framework for PHP
  *
  * This content is released under the MIT License (MIT)
  *
- * Copyright (c) 2014, British Columbia Institute of Technology
+ * Copyright (c) 2014 - 2015, British Columbia Institute of Technology
  *
  * Permission is hereby granted, free of charge, to any person obtaining a copy
  * of this software and associated documentation files (the "Software"), to deal
@@ -29,7 +29,7 @@
  * @package	CodeIgniter
  * @author	EllisLab Dev Team
  * @copyright	Copyright (c) 2008 - 2014, EllisLab, Inc. (http://ellislab.com/)
- * @copyright	Copyright (c) 2014, British Columbia Institute of Technology (http://bcit.ca/)
+ * @copyright	Copyright (c) 2014 - 2015, British Columbia Institute of Technology (http://bcit.ca/)
  * @license	http://opensource.org/licenses/MIT	MIT License
  * @link	http://codeigniter.com
  * @since	Version 2.0.0
diff --git a/system/core/compat/hash.php b/system/core/compat/hash.php
index d59815c9d..aeacabdb9 100644
--- a/system/core/compat/hash.php
+++ b/system/core/compat/hash.php
@@ -2,11 +2,11 @@
 /**
  * CodeIgniter
  *
- * An open source application development framework for PHP 5.2.4 or newer
+ * An open source application development framework for PHP
  *
  * This content is released under the MIT License (MIT)
  *
- * Copyright (c) 2014, British Columbia Institute of Technology
+ * Copyright (c) 2014 - 2015, British Columbia Institute of Technology
  *
  * Permission is hereby granted, free of charge, to any person obtaining a copy
  * of this software and associated documentation files (the "Software"), to deal
@@ -29,7 +29,7 @@
  * @package	CodeIgniter
  * @author	EllisLab Dev Team
  * @copyright	Copyright (c) 2008 - 2014, EllisLab, Inc. (http://ellislab.com/)
- * @copyright	Copyright (c) 2014, British Columbia Institute of Technology (http://bcit.ca/)
+ * @copyright	Copyright (c) 2014 - 2015, British Columbia Institute of Technology (http://bcit.ca/)
  * @license	http://opensource.org/licenses/MIT	MIT License
  * @link	http://codeigniter.com
  * @since	Version 3.0.0
diff --git a/system/core/compat/mbstring.php b/system/core/compat/mbstring.php
index bc1238e8e..52ca6d02f 100644
--- a/system/core/compat/mbstring.php
+++ b/system/core/compat/mbstring.php
@@ -2,11 +2,11 @@
 /**
  * CodeIgniter
  *
- * An open source application development framework for PHP 5.2.4 or newer
+ * An open source application development framework for PHP
  *
  * This content is released under the MIT License (MIT)
  *
- * Copyright (c) 2014, British Columbia Institute of Technology
+ * Copyright (c) 2014 - 2015, British Columbia Institute of Technology
  *
  * Permission is hereby granted, free of charge, to any person obtaining a copy
  * of this software and associated documentation files (the "Software"), to deal
@@ -29,7 +29,7 @@
  * @package	CodeIgniter
  * @author	EllisLab Dev Team
  * @copyright	Copyright (c) 2008 - 2014, EllisLab, Inc. (http://ellislab.com/)
- * @copyright	Copyright (c) 2014, British Columbia Institute of Technology (http://bcit.ca/)
+ * @copyright	Copyright (c) 2014 - 2015, British Columbia Institute of Technology (http://bcit.ca/)
  * @license	http://opensource.org/licenses/MIT	MIT License
  * @link	http://codeigniter.com
  * @since	Version 3.0.0
diff --git a/system/core/compat/password.php b/system/core/compat/password.php
index f1c9178a8..00befb022 100644
--- a/system/core/compat/password.php
+++ b/system/core/compat/password.php
@@ -2,11 +2,11 @@
 /**
  * CodeIgniter
  *
- * An open source application development framework for PHP 5.2.4 or newer
+ * An open source application development framework for PHP
  *
  * This content is released under the MIT License (MIT)
  *
- * Copyright (c) 2014, British Columbia Institute of Technology
+ * Copyright (c) 2014 - 2015, British Columbia Institute of Technology
  *
  * Permission is hereby granted, free of charge, to any person obtaining a copy
  * of this software and associated documentation files (the "Software"), to deal
@@ -29,7 +29,7 @@
  * @package	CodeIgniter
  * @author	EllisLab Dev Team
  * @copyright	Copyright (c) 2008 - 2014, EllisLab, Inc. (http://ellislab.com/)
- * @copyright	Copyright (c) 2014, British Columbia Institute of Technology (http://bcit.ca/)
+ * @copyright	Copyright (c) 2014 - 2015, British Columbia Institute of Technology (http://bcit.ca/)
  * @license	http://opensource.org/licenses/MIT	MIT License
  * @link	http://codeigniter.com
  * @since	Version 3.0.0
diff --git a/system/core/compat/standard.php b/system/core/compat/standard.php
index e4f1f679e..f24f7f8ae 100644
--- a/system/core/compat/standard.php
+++ b/system/core/compat/standard.php
@@ -2,11 +2,11 @@
 /**
  * CodeIgniter
  *
- * An open source application development framework for PHP 5.2.4 or newer
+ * An open source application development framework for PHP
  *
  * This content is released under the MIT License (MIT)
  *
- * Copyright (c) 2014, British Columbia Institute of Technology
+ * Copyright (c) 2014 - 2015, British Columbia Institute of Technology
  *
  * Permission is hereby granted, free of charge, to any person obtaining a copy
  * of this software and associated documentation files (the "Software"), to deal
@@ -29,7 +29,7 @@
  * @package	CodeIgniter
  * @author	EllisLab Dev Team
  * @copyright	Copyright (c) 2008 - 2014, EllisLab, Inc. (http://ellislab.com/)
- * @copyright	Copyright (c) 2014, British Columbia Institute of Technology (http://bcit.ca/)
+ * @copyright	Copyright (c) 2014 - 2015, British Columbia Institute of Technology (http://bcit.ca/)
  * @license	http://opensource.org/licenses/MIT	MIT License
  * @link	http://codeigniter.com
  * @since	Version 3.0.0
-- 
cgit v1.2.3-24-g4f1b


From 7a829720e3116f3e132e543d91f4fe32ab2b895c Mon Sep 17 00:00:00 2001
From: Andrey Andreev 
Date: Sun, 11 Jan 2015 04:37:46 +0200
Subject: Fix #3464

---
 system/core/Lang.php | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

(limited to 'system/core')

diff --git a/system/core/Lang.php b/system/core/Lang.php
index c74729035..fe1dc1a9d 100644
--- a/system/core/Lang.php
+++ b/system/core/Lang.php
@@ -106,7 +106,7 @@ class CI_Lang {
 
 		$langfile .= '.php';
 
-		if (empty($idiom) OR ! preg_match('/^[a-z_-]$/i', $idiom))
+		if (empty($idiom) OR ! preg_match('/^[a-z_-]+$/i', $idiom))
 		{
 			$config =& get_config();
 			$idiom = empty($config['language']) ? 'english' : $config['language'];
-- 
cgit v1.2.3-24-g4f1b