mirror of https://github.com/MISP/MISP
fix: [encryption] broken S/MIME encryption
- as reported and pinpointed by @3c7 - blind fix, awaits confirmationpull/3570/head
parent
fd6f26d7b5
commit
4482373259
|
@ -779,7 +779,7 @@ class User extends AppModel
|
|||
}
|
||||
// SMIME if not GPG key
|
||||
if (!$failed && !$canEncryptGPG && $canEncryptSMIME) {
|
||||
$encryptionResult = $this->__encryptUsingSmime($Email, $body, $subject);
|
||||
$encryptionResult = $this->__encryptUsingSmime($Email, $body, $subject, $user);
|
||||
if (isset($encryptionResult['failed'])) {
|
||||
$failed = true;
|
||||
}
|
||||
|
@ -893,7 +893,7 @@ class User extends AppModel
|
|||
return true;
|
||||
}
|
||||
|
||||
private function __encryptUsingSmime(&$Email, &$body, $subject)
|
||||
private function __encryptUsingSmime(&$Email, &$body, $subject, $user)
|
||||
{
|
||||
try {
|
||||
$prependedBody = 'Content-Transfer-Encoding: 7bit' . PHP_EOL . 'Content-Type: text/plain;' . PHP_EOL . ' charset=us-ascii' . PHP_EOL . PHP_EOL . $body;
|
||||
|
|
Loading…
Reference in New Issue