summaryrefslogtreecommitdiffstats
path: root/system
diff options
context:
space:
mode:
Diffstat (limited to 'system')
-rw-r--r--system/core/Common.php6
-rw-r--r--system/libraries/Session/drivers/Session_redis_driver.php5
-rw-r--r--system/libraries/Upload.php2
3 files changed, 7 insertions, 6 deletions
diff --git a/system/core/Common.php b/system/core/Common.php
index b87ce4d62..d66649f59 100644
--- a/system/core/Common.php
+++ b/system/core/Common.php
@@ -355,7 +355,7 @@ if ( ! function_exists('is_https'))
{
return TRUE;
}
- elseif (isset($_SERVER['HTTP_X_FORWARDED_PROTO']) && $_SERVER['HTTP_X_FORWARDED_PROTO'] === 'https')
+ elseif (isset($_SERVER['HTTP_X_FORWARDED_PROTO']) && strtolower($_SERVER['HTTP_X_FORWARDED_PROTO']) === 'https')
{
return TRUE;
}
@@ -716,8 +716,8 @@ if ( ! function_exists('remove_invisible_characters'))
// carriage return (dec 13) and horizontal tab (dec 09)
if ($url_encoded)
{
- $non_displayables[] = '/%0[0-8bcef]/'; // url encoded 00-08, 11, 12, 14, 15
- $non_displayables[] = '/%1[0-9a-f]/'; // url encoded 16-31
+ $non_displayables[] = '/%0[0-8bcef]/i'; // url encoded 00-08, 11, 12, 14, 15
+ $non_displayables[] = '/%1[0-9a-f]/i'; // url encoded 16-31
}
$non_displayables[] = '/[\x00-\x08\x0B\x0C\x0E-\x1F\x7F]+/S'; // 00-08, 11, 12, 14-31, 127
diff --git a/system/libraries/Session/drivers/Session_redis_driver.php b/system/libraries/Session/drivers/Session_redis_driver.php
index ad14cbfdc..d3a265958 100644
--- a/system/libraries/Session/drivers/Session_redis_driver.php
+++ b/system/libraries/Session/drivers/Session_redis_driver.php
@@ -99,8 +99,9 @@ class CI_Session_redis_driver extends CI_Session_driver implements SessionHandle
elseif (preg_match('#(?:tcp://)?([^:?]+)(?:\:(\d+))?(?<options>\?.+)?#', $this->_config['save_path'], $matches))
{
$save_path = array(
- 'host' => $matches[1],
- 'port' => empty($matches[2]) ? NULL : $matches[2]
+ 'host' => $matches[1],
+ 'port' => empty($matches[2]) ? NULL : $matches[2],
+ 'timeout' => NULL // We always pass this to Redis::connect(), so it needs to exist
);
}
else
diff --git a/system/libraries/Upload.php b/system/libraries/Upload.php
index 7b94a230c..056f6de1e 100644
--- a/system/libraries/Upload.php
+++ b/system/libraries/Upload.php
@@ -601,7 +601,7 @@ class CI_Upload {
'file_type' => $this->file_type,
'file_path' => $this->upload_path,
'full_path' => $this->upload_path.$this->file_name,
- 'raw_name' => substr($this->file_name, 0, strlen($this->file_name) - strlen($this->file_ext)),
+ 'raw_name' => substr($this->file_name, 0, -strlen($this->file_ext)),
'orig_name' => $this->orig_name,
'client_name' => $this->client_name,
'file_ext' => $this->file_ext,