mirror of https://github.com/MISP/MISP
chg: [internal] Ingest key just for protected events
parent
197544e5c6
commit
b4571b0502
|
@ -1665,7 +1665,7 @@ class EventsController extends AppController
|
|||
$this->set('mayModify', $this->__canModifyEvent($event));
|
||||
$this->set('mayPublish', $this->__canPublishEvent($event));
|
||||
try {
|
||||
$instanceKey = $this->Event->CryptographicKey->ingestInstanceKey();
|
||||
$instanceKey = $event['Event']['protected'] ? $this->Event->CryptographicKey->ingestInstanceKey() : null;
|
||||
} catch (Exception $e) {
|
||||
$instanceKey = null;
|
||||
}
|
||||
|
|
|
@ -1,5 +1,4 @@
|
|||
<?php
|
||||
$keys = Hash::extract($data, $field['path']);
|
||||
$event = Hash::extract($data, $field['event_path']);
|
||||
if ($event['protected']) {
|
||||
echo sprintf(
|
||||
|
@ -26,6 +25,7 @@
|
|||
)
|
||||
);
|
||||
$foundInstanceKey = false;
|
||||
$keys = Hash::extract($data, $field['path']);
|
||||
foreach ($keys as $key) {
|
||||
$isInstanceKey = $key['fingerprint'] === $field['instanceFingerprint'];
|
||||
if ($isInstanceKey) {
|
||||
|
|
Loading…
Reference in New Issue