Merge branch '2.4' of github.com:MISP/MISP into 2.4

pull/3922/head
chrisr3d 2018-12-04 12:01:51 +01:00
commit 0469b4848d
7 changed files with 32 additions and 8 deletions

2
PyMISP

@ -1 +1 @@
Subproject commit cf622cd807ee7dc17b63870844747da9e6c6814e
Subproject commit 98feed73734f4577449ee584232015137feb0031

View File

@ -2,7 +2,7 @@
App::uses('AppShell', 'Console/Command');
class AdminShell extends AppShell
{
public $uses = array('Event', 'Post', 'Attribute', 'Job', 'User', 'Task', 'Whitelist', 'Server', 'Organisation', 'AdminSetting', 'Galaxy', 'Taxonomy', 'Warninglist', 'Noticelist', 'ObjectTemplate');
public $uses = array('Event', 'Post', 'Attribute', 'Job', 'User', 'Task', 'Whitelist', 'Server', 'Organisation', 'AdminSetting', 'Galaxy', 'Taxonomy', 'Warninglist', 'Noticelist', 'ObjectTemplate', 'Bruteforce');
public function jobGenerateCorrelation() {
$jobId = $this->args[0];
@ -190,4 +190,18 @@ class AdminShell extends AppShell
}
}
public function clearBruteforce()
{
$conditions = array('Bruteforce.username !=' => '');
if (!empty($this->args[0])) {
$conditions = array('Bruteforce.username' => $this->args[0]);
}
$result = $this->Bruteforce->deleteAll($conditions, false, false);
$target = empty($this->args[0]) ? 'all users' : $this->args[0];
if ($result) {
echo 'Brutefoce entries for ' . $target . ' deleted.' . PHP_EOL;
} else {
echo 'Something went wrong, could not delete bruteforce entries for ' . $target . '.' . PHP_EOL;
}
}
}

View File

@ -47,7 +47,7 @@ class AppController extends Controller
public $helpers = array('Utility', 'OrgImg');
private $__queryVersion = '50';
public $pyMispVersion = '2.4.96';
public $pyMispVersion = '2.4.98';
public $phpmin = '5.6.5';
public $phprec = '7.0.16';

View File

@ -233,7 +233,12 @@ class RestResponseComponent extends Component
'admin_quickEmail' => array(
'description' => "POST a body and a subject in a JSON to send an e-mail through MISP to the user ID given in the URL",
'mandatory' => array('subject', 'body')
)
),
'statistics' => array(
'description' => 'Simply GET the url endpoint to view the API output of the statistics API. Additional statistics are available via the following tab-options similar to the UI: data, orgs, users, tags, attributehistogram, sightings, attackMatrix',
'params' => array('tab'),
'http_method' => 'GET'
)
),
'Warninglist' => array(
'checkValue' => array(

View File

@ -107,9 +107,10 @@ class Server extends AppModel
'data' => array(
'getSettings' => 'MISP/app/Console/cake Admin getSetting [setting]',
'setSettings' => 'MISP/app/Console/cake Admin getSetting [setting] [value]',
'getAuthkey' => 'MISP/app/Console/cake Admin [email]',
'getAuthkey' => 'MISP/app/Console/cake Admin getAuthkey [email]',
'setBaseurl' => 'MISP/app/Console/cake Baseurl [baseurl]',
'changePassword' => 'MISP/app/Console/cake Password [email] [new_password]'
'changePassword' => 'MISP/app/Console/cake Password [email] [new_password]',
'clearBruteforce' => 'MISP/app/Console/cake Admin clearBruteforce [user_email]'
),
'description' => __('Certain administrative tasks are exposed to the API, these help with maintaining and configuring MISP in an automated way / via external tools.'),
'header' => __('Administering MISP via the CLI')

View File

@ -170,9 +170,13 @@
});
$('#TemplateSelect').change(function() {
var selected_template = $('#TemplateSelect').val();
var http_method_for_rest = 'POST';
if (selected_template !== '') {
if (allValidApis[selected_template].http_method === 'GET') {
http_method_for_rest = 'GET';
}
$('#template_description').show();
$('#ServerMethod').val('POST');
$('#ServerMethod').val(http_method_for_rest);
$('#ServerUrl').val(allValidApis[selected_template].url);
$('#ServerBody').val(allValidApis[selected_template].body);
setApiInfoBox();

@ -1 +1 @@
Subproject commit 2612eb543759524ec30387a8d948aaeb9b57461b
Subproject commit ac2b5dbe05655b8fe0f53f6a34aaede3d35665d7