Bugfix: verify S/MIME signatures got broken allong the way while implementing this

This commit is contained in:
the-djmaze 2024-02-21 01:23:36 +01:00
parent d5d47ffed1
commit aebed32f76
2 changed files with 4 additions and 3 deletions

View file

@ -657,6 +657,7 @@ export class MailMessageView extends AbstractViewRight {
data.folder = message.folder;
data.uid = message.uid;
data.bodyPart = data.bodyPart?.raw;
data.sigPart = data.sigPart?.raw;
Remote.post('SMimeVerifyMessage', null, data).then(response => {
if (response?.Result) {
if (response.Result.body) {
@ -664,7 +665,7 @@ export class MailMessageView extends AbstractViewRight {
message.html() ? message.viewHtml() : message.viewPlain();
response.Result.body = null;
}
message.smimeVerified(true);
message.smimeVerified(response.Result);
}
});
}

View file

@ -115,11 +115,11 @@ trait SMime
public function DoSMimeVerifyMessage() : array
{
$sBody = $this->GetActionParam('bodyPart', '');
$sPartId = $this->GetActionParam('partId', '');
$bDetached = !empty($this->GetActionParam('detached', 0));
if (!$sBody) {
if (!$sBody && $sPartId) {
$sFolderName = $this->GetActionParam('folder', '');
$iUid = (int) $this->GetActionParam('uid', 0);
$sPartId = $this->GetActionParam('partId', '');
$sMicAlg = $this->GetActionParam('micAlg', '');
$this->initMailClientConnection();