diff options
Diffstat (limited to 'system/core')
-rwxr-xr-x | system/core/Input.php | 8 |
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')); } } |