diff --git a/htdocs/application/controllers/Api.php b/htdocs/application/controllers/Api.php index 69475d8..43bd306 100644 --- a/htdocs/application/controllers/Api.php +++ b/htdocs/application/controllers/Api.php @@ -39,11 +39,8 @@ class Api extends Main function create() { - - // if config soft_api is set, allow interaction: - // without api_key: use blockwords - // with api_key: pass blockwords - if (config_item('apikey') != $this->input->get('apikey')) + + if (config_item('apikey') != $this->input->get('apikey') && config_item('soft_api') == false) { die("Invalid API key\n"); } @@ -77,9 +74,19 @@ class Api extends Main die("You are not allowed to paste\n"); } - if (!$this->_blockwords_check()) + if (config_item('soft_api') == true && (config_item('apikey') == $this->input->get('apikey'))) { - die("Your paste contains blocked words\n"); + + //pass + + } + else + { + + if (!$this->_blockwords_check()) + { + die("Your paste contains blocked words\n"); + } } //create paste