From eafc10e06fc0e08df684722e6ca2a221aebdf4d0 Mon Sep 17 00:00:00 2001 From: Florian Pritz Date: Sun, 1 Sep 2013 00:04:23 +0200 Subject: Disable CSRF checks for CLI requests Otherwise we get an error in the Security class trying to access $_SERVER["REQUEST_METHOD"]. Signed-off-by: Florian Pritz --- application/core/MY_Controller.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'application/core') diff --git a/application/core/MY_Controller.php b/application/core/MY_Controller.php index 4c0fa278c..312b0f763 100644 --- a/application/core/MY_Controller.php +++ b/application/core/MY_Controller.php @@ -85,7 +85,7 @@ class MY_Controller extends CI_Controller { $csrf_protection = false; } - if ($csrf_protection) { + if ($csrf_protection && !$this->input->is_cli_request()) { // 2 functions for accessing config options, really? $this->config->set_item('csrf_protection', true); config_item("csrf_protection", true); -- cgit v1.2.3-24-g4f1b