mirror of https://github.com/MISP/MISP
commit
1a8f97ebeb
|
@ -31,15 +31,13 @@ require_once dirname(__DIR__) . '/../Model/Attribute.php'; // FIXME workaround
|
|||
*/
|
||||
abstract class AppShell extends Shell
|
||||
{
|
||||
public $tasks = array('ConfigLoad');
|
||||
|
||||
/** @var BackgroundJobsTool */
|
||||
private $BackgroundJobsTool;
|
||||
|
||||
public function initialize()
|
||||
{
|
||||
$this->ConfigLoad = $this->Tasks->load('ConfigLoad');
|
||||
$this->ConfigLoad->execute();
|
||||
$configLoad = $this->Tasks->load('ConfigLoad');
|
||||
$configLoad->execute();
|
||||
|
||||
parent::initialize();
|
||||
}
|
||||
|
|
|
@ -3,8 +3,6 @@ class ConfigLoadTask extends Shell
|
|||
{
|
||||
public function execute()
|
||||
{
|
||||
Configure::load('config');
|
||||
|
||||
if (Configure::read('MISP.system_setting_db')) {
|
||||
App::uses('SystemSetting', 'Model');
|
||||
SystemSetting::setGlobalSetting();
|
||||
|
|
|
@ -1309,7 +1309,7 @@ class AppController extends Controller
|
|||
$exception = false;
|
||||
$filters = $this->_harvestParameters($filterData, $exception, $this->_legacyParams);
|
||||
if (empty($filters) && $this->request->is('get')) {
|
||||
throw new InvalidArgumentException(__('Restsearch queries using GET and no parameters are not allowed. If you have passed parameters via a JSON body, make sure you use POST requests.'));
|
||||
throw new BadRequestException(__('Restsearch queries using GET and no parameters are not allowed. If you have passed parameters via a JSON body, make sure you use POST requests.'));
|
||||
}
|
||||
if (empty($filters['returnFormat'])) {
|
||||
$filters['returnFormat'] = 'json';
|
||||
|
|
|
@ -998,6 +998,8 @@ class TestComprehensive(unittest.TestCase):
|
|||
self.assertIn("event_uuid", sighting)
|
||||
self.assertEqual(sighting["event_uuid"], event.uuid, search_result)
|
||||
|
||||
self.admin_misp_connector.delete_event(event)
|
||||
|
||||
def _search_event(self, query: dict):
|
||||
response = self.admin_misp_connector._prepare_request('POST', 'events/restSearch', data=query)
|
||||
response = self.admin_misp_connector._check_response(response)
|
||||
|
|
Loading…
Reference in New Issue