mirror of
https://github.com/the-djmaze/snappymail.git
synced 2026-08-30 12:39:20 +03:00
Resolve #1450
This commit is contained in:
parent
b3afbe107d
commit
a241149b6b
1 changed files with 8 additions and 2 deletions
|
|
@ -106,10 +106,16 @@ trait SMime
|
|||
$result = $SMIME->decrypt($sBody);
|
||||
if ($result) {
|
||||
$result = ['data' => $result];
|
||||
if (\str_contains($result['data'], 'multipart/signed')) {
|
||||
if (\str_contains($result['data'], 'multipart/signed')
|
||||
|| \preg_match('/smime-type=["\']?signed-data/', $result['data'])
|
||||
) {
|
||||
$signed = $SMIME->verify($result['data'], null, true);
|
||||
$result['signed'] = [
|
||||
'success' => !empty($SMIME->verify($result['data'], null, true)['success'])
|
||||
'success' => !empty($signed['success'])
|
||||
];
|
||||
if (!empty($signed['body'])) {
|
||||
$result['data'] = $signed['body'];
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue