From b68a811f1a09b8d6012b6782b36a988daf68a82e Mon Sep 17 00:00:00 2001 From: Tjoosten Date: Sun, 15 Feb 2015 22:44:24 +0100 Subject: add --- application/core/index.html | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'application/core') diff --git a/application/core/index.html b/application/core/index.html index c942a79ce..b702fbc39 100644 --- a/application/core/index.html +++ b/application/core/index.html @@ -1,3 +1,4 @@ + 403 Forbidden @@ -7,4 +8,4 @@

Directory access is forbidden.

- \ No newline at end of file + -- cgit v1.2.3-24-g4f1b From 4388f9080ded6d4e4db9a333e94a005ba072a8cd Mon Sep 17 00:00:00 2001 From: Florian Pritz Date: Mon, 18 Sep 2017 12:45:31 +0200 Subject: Migrate return code checks for CI3 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 47dd6a899..63db6c8a5 100644 --- a/application/core/MY_Controller.php +++ b/application/core/MY_Controller.php @@ -79,7 +79,7 @@ class MY_Controller extends CI_Controller { private function _check_csrf_protection_required() { - if ($this->input->post("apikey") !== false || is_api_client()) { + if ($this->input->post("apikey") !== null || is_api_client()) { /* This relies on the authentication code always verifying the supplied * apikey. If the key is not verified/logged in an attacker could simply * add an empty "apikey" field to the CSRF form to circumvent the -- cgit v1.2.3-24-g4f1b From 3d38163a81ce1e5921be690348b30a2f6db62837 Mon Sep 17 00:00:00 2001 From: Florian Pritz Date: Thu, 21 Sep 2017 11:32:10 +0200 Subject: Fix return checks for CI3 Signed-off-by: Florian Pritz --- application/core/MY_Input.php | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'application/core') diff --git a/application/core/MY_Input.php b/application/core/MY_Input.php index 4d43774c0..5a08ea4bb 100644 --- a/application/core/MY_Input.php +++ b/application/core/MY_Input.php @@ -26,8 +26,8 @@ class MY_Input extends CI_Input { public function post_array($key) { $ret = parent::post($key); - if ($ret === false) { - return false; + if ($ret === null) { + return null; } elseif (!is_array($ret)) { $data = [ "key" => $key, -- cgit v1.2.3-24-g4f1b From d8978f969093cc1d244a4a293d8135f0a4029109 Mon Sep 17 00:00:00 2001 From: Florian Pritz Date: Thu, 21 Sep 2017 18:03:09 +0200 Subject: Remove usage of deprecated is_cli_request() Signed-off-by: Florian Pritz --- application/core/MY_Controller.php | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'application/core') diff --git a/application/core/MY_Controller.php b/application/core/MY_Controller.php index 63db6c8a5..463a4df64 100644 --- a/application/core/MY_Controller.php +++ b/application/core/MY_Controller.php @@ -20,7 +20,7 @@ class MY_Controller extends CI_Controller { $this->load->library('customautoloader'); // check if DB is up to date - if (!($this->input->is_cli_request() && $this->uri->segment(1) === "tools")) { + if (!(is_cli() && $this->uri->segment(1) === "tools")) { $this->_ensure_database_schema_up_to_date(); } @@ -54,7 +54,7 @@ class MY_Controller extends CI_Controller { protected function _require_cli_request() { - if (!$this->input->is_cli_request()) { + if (!is_cli()) { throw new \exceptions\PublicApiException("api/cli-only", "This function can only be accessed via the CLI interface"); } } @@ -106,7 +106,7 @@ class MY_Controller extends CI_Controller { return false; } - if ($this->input->is_cli_request()) { + if (is_cli()) { return false; } -- cgit v1.2.3-24-g4f1b