From 8f8436080ed60dbd680f2792d475bbed944df78c Mon Sep 17 00:00:00 2001 From: Andrey Andreev Date: Mon, 8 Oct 2012 10:47:22 +0300 Subject: Fix issue #1715 --- system/core/Input.php | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) (limited to 'system/core') 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')); } } -- cgit v1.2.3-24-g4f1b