mirror of https://github.com/MISP/MISP
Merge branch 'hotfix-2.2.14' into develop
commit
4b04616467
|
@ -141,6 +141,8 @@ Configure::write('MISP.default_attribute_distribution', 'event');
|
|||
|
||||
// Enable the tagging feature, it shou
|
||||
Configure::write('MISP.tagging', true);
|
||||
// enabling this flag will allow the event description to be transmitted in the alert e-mail's subject. Be aware that this is not encrypted by PGP, so only enable it if you accept that part of the event description will be sent out in clear-text
|
||||
Configure::write('MISP.extended_alert_subject', false);
|
||||
|
||||
/**
|
||||
* The settings below can be used to set additional paths to models, views and controllers.
|
||||
|
|
|
@ -1119,9 +1119,16 @@ class Event extends AppModel {
|
|||
if (!empty($bodyTempOther)) {
|
||||
$body .= "\n";
|
||||
}
|
||||
$subject = preg_replace( "/\r|\n/", "", $event['Event']['info']);
|
||||
if (strlen($subject) > 55) {
|
||||
$subject = substr($subject, 0, 55) . '...';
|
||||
|
||||
if (Configure::read('MISP.extended_alert_subject')) {
|
||||
$subject = preg_replace( "/\r|\n/", "", $event['Event']['info']);
|
||||
if (strlen($subject) > 55) {
|
||||
$subject = substr($subject, 0, 55) . '... - ';
|
||||
} else {
|
||||
$subject .= " - ";
|
||||
}
|
||||
} else {
|
||||
$subject = '';
|
||||
}
|
||||
$body .= $bodyTempOther; // append the 'other' attribute types to the bottom.
|
||||
$body .= '==============================================' . "\n";
|
||||
|
@ -1157,7 +1164,7 @@ class Event extends AppModel {
|
|||
$Email = new CakeEmail();
|
||||
$Email->from(Configure::read('MISP.email'));
|
||||
$Email->to($user['User']['email']);
|
||||
$Email->subject("[" . Configure::read('MISP.org') . " " . Configure::read('MISP.name') . "] Event " . $id . " - " . $subject . " - " . $event['ThreatLevel']['name'] . " - TLP Amber");
|
||||
$Email->subject("[" . Configure::read('MISP.org') . " " . Configure::read('MISP.name') . "] Event " . $id . " - " . $subject . $event['ThreatLevel']['name'] . " - TLP Amber");
|
||||
$Email->emailFormat('text'); // both text or html
|
||||
// send it
|
||||
$Email->send($bodySigned);
|
||||
|
|
Loading…
Reference in New Issue