summaryrefslogtreecommitdiffstats
path: root/system
diff options
context:
space:
mode:
authorAndrey Andreev <narf@bofh.bg>2012-10-08 09:47:22 +0200
committerAndrey Andreev <narf@bofh.bg>2012-10-08 09:47:22 +0200
commit8f8436080ed60dbd680f2792d475bbed944df78c (patch)
treeadfe867287a0085238f819dc3a4c809b718078b0 /system
parent05b3877a792caa23cb4503a976b8c85dec47335f (diff)
Fix issue #1715
Diffstat (limited to 'system')
-rwxr-xr-xsystem/core/Input.php8
1 files changed, 4 insertions, 4 deletions
diff --git a/system/core/Input.php b/system/core/Input.php
index fa26777a1..218eed3d7 100755
--- a/system/core/Input.php
+++ b/system/core/Input.php
@@ -641,8 +641,8 @@ class CI_Input {
$_SERVER['PHP_SELF'] = strip_tags($_SERVER['PHP_SELF']);
- // CSRF Protection check
- if ($this->_enable_csrf == TRUE)
+ // CSRF Protection check on HTTP requests
+ if ($this->_enable_csrf == TRUE && $this->is_cli_request())
{
$this->security->csrf_verify();
}
@@ -836,11 +836,11 @@ class CI_Input {
*
* Test to see if a request was made from the command line
*
- * @return boolean
+ * @return bool
*/
public function is_cli_request()
{
- return (php_sapi_name() == 'cli') or defined('STDIN');
+ return (php_sapi_name() === 'cli' OR defined('STDIN'));
}
}