Merge branch '2.4' into develop

pull/7065/head
iglocska 2021-02-22 15:43:33 +01:00
commit 1830d5dc7b
No known key found for this signature in database
GPG Key ID: BEA224F1FEF113AC
6 changed files with 20 additions and 6 deletions

2
PyMISP

@ -1 +1 @@
Subproject commit 9316420dc028a1ffc541986fc08793e669f2165e
Subproject commit 2ceb38c741f9432432114998d0c0f8fa36686083

View File

@ -937,8 +937,8 @@ class UsersController extends AppController
}
}
if (
isset($this->request->data['User']['enable_password']) && $this->request->data['User']['enable_password'] != '0' &&
isset($this->request->data['User']['password']) && "" != $this->request->data['User']['password']
(!empty($this->request->data['User']['enable_password']) || $this->_isRest()) &&
!empty($this->request->data['User']['password'])
) {
$fields[] = 'password';
if ($this->_isRest() && !isset($this->request->data['User']['confirm_password'])) {

View File

@ -273,6 +273,7 @@ class PubSubTool
'redis_password' => '',
'redis_database' => '1',
'redis_namespace' => 'mispq',
'host' => '127.0.0.1',
'port' => '50000',
'username' => null,
'password' => null,

View File

@ -1536,7 +1536,7 @@ class Server extends AppModel
return true;
}
if (is_executable($value)) {
if (finfo_file($finfo, $value) == "application/x-executable" || finfo_file($finfo, $value) == "application/x-sharedlib") {
if (finfo_file($finfo, $value) == "application/x-executable" || finfo_file($finfo, $value) == "application/x-pie-executable" || finfo_file($finfo, $value) == "application/x-sharedlib") {
finfo_close($finfo);
return true;
} else {
@ -6217,6 +6217,15 @@ class Server extends AppModel
'type' => 'boolean',
'afterHook' => 'zmqAfterHook',
),
'ZeroMQ_host' => array(
'level' => 2,
'description' => __('The host that the pub/sub feature will use.'),
'value' => '127.0.0.1',
'errorMessage' => '',
'test' => 'testForEmpty',
'type' => 'string',
'afterHook' => 'zmqAfterHook',
),
'ZeroMQ_port' => array(
'level' => 2,
'description' => __('The port that the pub/sub feature will use.'),

View File

@ -335,6 +335,10 @@
'text' => __('List Users'),
'url' => $baseurl . '/admin/users/index'
),
array(
'text' => __('List Auth Keys'),
'url' => $baseurl . '/auth_keys/index'
),
array(
'text' => __('List User Settings'),
'url' => $baseurl . '/user_settings/index/user_id:all'

View File

@ -102,8 +102,8 @@ class MispZmq:
self.socket = context.socket(zmq.PUB)
if self.settings["username"]:
self.socket.plain_server = True # must come before bind
self.socket.bind("tcp://*:{}".format(self.settings["port"]))
self._logger.debug("ZMQ listening on tcp://*:{}".format(self.settings["port"]))
self.socket.bind("tcp://{}:{}".format(self.settings["host"], self.settings["port"]))
self._logger.debug("ZMQ listening on tcp://{}:{}".format(self.settings["host"], self.settings["port"]))
if self._logger.isEnabledFor(logging.DEBUG):
monitor = self.socket.get_monitor_socket()