mirror of https://github.com/MISP/MISP
fix: [eventReport:downloadMarkdownFromURL] Added support of trigger for that function
parent
75d75cc6e6
commit
c79324528b
|
@ -916,7 +916,7 @@ class EventReport extends AppModel
|
|||
'url' => $url
|
||||
];
|
||||
if (!empty($module)) {
|
||||
$result = $this->Module->queryModuleServer($modulePayload, false);
|
||||
$result = $this->Module->queryModuleServer($modulePayload, false, 'Enrichment', false, []);
|
||||
if (empty($result['results'][0]['values'][0])) {
|
||||
return '';
|
||||
}
|
||||
|
|
|
@ -234,6 +234,11 @@ class Module extends AppModel
|
|||
$attributes = $this->Attribute->fetchAttributes($user, $options);
|
||||
$triggerData = !empty($attributes) ? $attributes[0] : [];
|
||||
$logging['message'] = __('The workflow `%s` prevented attribute `%s` (from event `%s`) to query the module `%s`', $trigger_id, $postData['attribute_uuid'], $triggerData['Attribute']['event_id'], $postData['module']);
|
||||
} else if (empty($triggerData) && !empty($postData['event_id'])) {
|
||||
$this->Event = ClassRegistry::init('Event');
|
||||
$event = $this->Event->quickFetchEvent($postData['event_id']);
|
||||
$triggerData =$event;
|
||||
$logging['message'] = __('The workflow `%s` prevented event `%s` to query the module `%s`', $trigger_id, $postData['event_id'], $postData['module']);
|
||||
} else {
|
||||
if (isset($triggerData['Attribute'])) {
|
||||
$logging['message'] = __('The workflow `%s` prevented attribute `%s` (from event `%s`) to query the module `%s`',
|
||||
|
|
Loading…
Reference in New Issue