summaryrefslogtreecommitdiffstats
path: root/system/core/Input.php
diff options
context:
space:
mode:
authorAndrey Andreev <narf@bofh.bg>2012-10-09 12:36:31 +0200
committerAndrey Andreev <narf@bofh.bg>2012-10-09 12:36:31 +0200
commitea7a866f6107d4b50b4a7059f1373035aa12dd23 (patch)
treebf3c2d9f16d098358108f4ad609cf2b068c45ba6 /system/core/Input.php
parent9ac557f2473844f3c2207189f371f827dbaddb71 (diff)
parent580fe8ec482f5df7ca5b91e11b13b72a8f3ed0b8 (diff)
Merge changes from develop
Diffstat (limited to 'system/core/Input.php')
-rw-r--r--system/core/Input.php16
1 files changed, 3 insertions, 13 deletions
diff --git a/system/core/Input.php b/system/core/Input.php
index 4a0caa5b5..b65509fd7 100644
--- a/system/core/Input.php
+++ b/system/core/Input.php
@@ -329,11 +329,7 @@ class CI_Input {
}
$proxy_ips = config_item('proxy_ips');
- if (empty($proxy_ips))
- {
- $proxy_ips = FALSE;
- }
- elseif ( ! is_array($proxy_ips))
+ if ( ! empty($proxy_ips) && ! is_array($proxy_ips))
{
$proxy_ips = explode(',', str_replace(' ', '', $proxy_ips));
}
@@ -366,7 +362,7 @@ class CI_Input {
}
}
- if ($spoof !== NULL)
+ if ($spoof)
{
for ($i = 0, $c = count($proxy_ips), $separator = (strlen($ip) === 32 ? '.' : ':'); $i < $c; $i++)
{
@@ -441,12 +437,6 @@ class CI_Input {
}
}
- if (strpos($this->ip_address, ',') !== FALSE)
- {
- $x = explode(',', $this->ip_address);
- $this->ip_address = trim($x[0]);
- }
-
if ( ! $this->valid_ip($this->ip_address))
{
return $this->ip_address = '0.0.0.0';
@@ -602,7 +592,7 @@ class CI_Input {
$_SERVER['PHP_SELF'] = strip_tags($_SERVER['PHP_SELF']);
// CSRF Protection check
- if ($this->_enable_csrf === TRUE)
+ if ($this->_enable_csrf === TRUE && ! $this->is_cli_request())
{
$this->security->csrf_verify();
}