mirror of
https://github.com/the-djmaze/snappymail.git
synced 2026-09-08 17:07:03 +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);
|
$result = $SMIME->decrypt($sBody);
|
||||||
if ($result) {
|
if ($result) {
|
||||||
$result = ['data' => $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'] = [
|
$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