Skip to content

Commit 3077ed2

Browse files
authored
Merge pull request MISP#10028 from brlogan/patch-1
Slight improvements to user profile notification emails
2 parents da64d36 + 29be8ab commit 3077ed2

File tree

2 files changed

+7
-7
lines changed

2 files changed

+7
-7
lines changed

Diff for: app/Model/UserLoginProfile.php

+4-4
Original file line numberDiff line numberDiff line change
@@ -282,7 +282,7 @@ public function emailNewLogin(array $user)
282282
$body->set('misp_org', Configure::read('MISP.org'));
283283
$body->set('date_time', $datetime);
284284
// Fetch user that contains also PGP or S/MIME keys for e-mail encryption
285-
$this->User->sendEmail($user, $body, false, "[" . Configure::read('MISP.org') . " MISP] New sign in.");
285+
$this->User->sendEmail($user, $body, false, "[" . Configure::read('MISP.org') . " MISP] New sign-in");
286286
}
287287
}
288288

@@ -301,7 +301,7 @@ public function emailReportMalicious(array $user, array $userLoginProfile)
301301
$admins = array_keys($this->User->getSiteAdmins());
302302
$allAdmins = array_unique(array_merge($orgAdmins, $admins));
303303

304-
$subject = __("[%s MISP] Suspicious login reported.", Configure::read('MISP.org'));
304+
$subject = __("[%s MISP] Suspicious login reported", Configure::read('MISP.org'));
305305
foreach ($allAdmins as $adminUserId) {
306306
$admin = $this->User->find('first', array(
307307
'recursive' => -1,
@@ -324,7 +324,7 @@ public function email_suspicious(array $user, $suspiciousness_reason)
324324
$body->set('date_time', $date_time);
325325
$body->set('suspiciousness_reason', $suspiciousness_reason);
326326
// inform the user
327-
$this->User->sendEmail($user, $body, false, "[" . Configure::read('MISP.org') . " MISP] Suspicious login with your account.");
327+
$this->User->sendEmail($user, $body, false, "[" . Configure::read('MISP.org') . " MISP] Suspicious login with your account");
328328

329329
// inform the org admin
330330
$body = new SendEmailTemplate('userloginprofile_suspicious_orgadmin');
@@ -341,7 +341,7 @@ public function email_suspicious(array $user, $suspiciousness_reason)
341341
'recursive' => -1,
342342
'conditions' => ['User.id' => $orgAdminID]
343343
));
344-
$this->User->sendEmail($org_admin, $body, false, "[" . Configure::read('MISP.org') . " MISP] Suspicious login detected.");
344+
$this->User->sendEmail($org_admin, $body, false, "[" . Configure::read('MISP.org') . " MISP] Suspicious login detected");
345345
}
346346
}
347347
}

Diff for: app/View/Emails/text/userloginprofile_newlogin.ctp

+3-3
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
Hello,
22

3-
Your account on MISP <?= $misp_org; ?> was just signed into from a new device or location.
3+
Your account on <?= $misp_org; ?> MISP was just accessed from a new device or location.
44

55
- When: <?= $date_time; ?>
66

@@ -13,7 +13,7 @@ Your account on MISP <?= $misp_org; ?> was just signed into from a new device or
1313
- IP: <?= $userLoginProfile['ip']; ?>
1414

1515

16-
Follow this link to confirm if was you: <?php echo $baseurl . '/users/view_login_history/'; ?>
16+
Follow this link to confirm it was you or report as malicious: <?php echo $baseurl . '/users/view_login_history/'; ?>
1717

18-
I you don't recognize this activity, please markt the login as suspicious and IMMEDIATELY to reset your password.
18+
If you don't recognize this activity, please mark the login as malicious and IMMEDIATELY reset your password.
1919

0 commit comments

Comments
 (0)