mirror of https://github.com/MISP/MISP
chg: [disable_seen_ips] enable by default, switch to opt-out
parent
4f36105d56
commit
5b86f6a8d1
|
@ -189,7 +189,7 @@ class AuthKey extends AppModel
|
|||
foreach ($possibleAuthkeys as $possibleAuthkey) {
|
||||
if ($passwordHasher->check($authkey, $possibleAuthkey['AuthKey']['authkey'])) { // valid authkey
|
||||
// store IP in db if not there yet
|
||||
if(Configure::read("MISP.remember_seen_ips_authkeys")) {
|
||||
if (!Configure::read("MISP.disable_seen_ips_authkeys")) {
|
||||
$remote_ip = $this->_remoteIp();
|
||||
$update_db_ip = true;
|
||||
if (in_array($remote_ip, $possibleAuthkey['AuthKey']['unique_ips'])) {
|
||||
|
|
|
@ -5701,10 +5701,10 @@ class Server extends AppModel
|
|||
'type' => 'boolean',
|
||||
'null' => true
|
||||
],
|
||||
'remember_seen_ips_authkeys' => [
|
||||
'disable_seen_ips_authkeys' => [
|
||||
'level' => self::SETTING_RECOMMENDED,
|
||||
'description' => __('Store IP addresses used to make API calls with an AuthKey against this AuthKey in the database.'),
|
||||
'value' => true,
|
||||
'description' => __('Disable the storing of IP addresses used to make API calls with an AuthKey against this AuthKey in the database.'),
|
||||
'value' => false,
|
||||
'test' => 'testBool',
|
||||
'type' => 'boolean',
|
||||
'null' => true
|
||||
|
|
|
@ -47,7 +47,7 @@
|
|||
'data_path' => 'AuthKey.allowed_ips',
|
||||
],
|
||||
];
|
||||
if(Configure::read("MISP.remember_seen_ips_authkeys")){
|
||||
if(!Configure::read("MISP.disable_seen_ips_authkeys")){
|
||||
$fields[] =[
|
||||
'name' => __('Seen IPs'),
|
||||
'data_path' => 'AuthKey.unique_ips',
|
||||
|
|
|
@ -80,7 +80,7 @@ $fields = [
|
|||
'requirement' => isset($keyUsage),
|
||||
],
|
||||
];
|
||||
if (Configure::read("MISP.remember_seen_ips_authkeys")) {
|
||||
if (!Configure::read("MISP.disable_seen_ips_authkeys")) {
|
||||
$fields[] =[
|
||||
'key' => __('Seen IPs'),
|
||||
'path' => 'AuthKey.unique_ips',
|
||||
|
|
Loading…
Reference in New Issue