diff options
author | Florian Pritz <bluewind@xinu.at> | 2013-09-01 00:04:23 +0200 |
---|---|---|
committer | Florian Pritz <bluewind@xinu.at> | 2013-09-02 22:02:27 +0200 |
commit | eafc10e06fc0e08df684722e6ca2a221aebdf4d0 (patch) | |
tree | f8bbf09bd43c6fd2a415325aa14414db3f8b9fab | |
parent | 752c59413b4899b295a9359eaef98dc9efb01533 (diff) |
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 <bluewind@xinu.at>
-rw-r--r-- | application/core/MY_Controller.php | 2 |
1 files changed, 1 insertions, 1 deletions
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); |