mirror of https://github.com/MISP/MISP
chg: [sharinggroup] Allow pushing SG if remote internal server is not in the list of SG servers
parent
c9acae11f0
commit
0a68e339e8
|
@ -1012,7 +1012,20 @@ class Event extends AppModel
|
|||
}
|
||||
}
|
||||
if (!$found) {
|
||||
return 403;
|
||||
if (!$server['Server']['internal']) {
|
||||
return 403;
|
||||
} else { // Consider the internal server to be part of the SharingGroupServer list if one of the remote org belong to the SharingGroupOrg list
|
||||
if (isset($event['SharingGroup']['SharingGroupOrg'])) {
|
||||
foreach ($event['SharingGroup']['SharingGroupOrg'] as $org) {
|
||||
if (isset($org['Organisation']) && $org['Organisation']['uuid'] === $server['RemoteOrg']['uuid']) {
|
||||
$found = true;
|
||||
}
|
||||
}
|
||||
}
|
||||
if (!$found) {
|
||||
return 403;
|
||||
}
|
||||
}
|
||||
}
|
||||
} else if (empty($event['SharingGroup']['roaming'])) {
|
||||
return 403;
|
||||
|
|
|
@ -533,7 +533,7 @@ class SharingGroup extends AppModel
|
|||
}
|
||||
}
|
||||
}
|
||||
if ($conditional === false) {
|
||||
if ($conditional === false && !$server['Server']['internal']) {
|
||||
return false;
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue