From 2f8ba269e39c6ed55d8cc304b1ef8a7e17bd9122 Mon Sep 17 00:00:00 2001 From: Hadi Nategh Date: Thu, 30 Aug 2018 14:19:00 +0200 Subject: [PATCH] Revert previous commit, since horde smime verification itself takes care of it with extracting email out of cert --- api/src/Mail.php | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/api/src/Mail.php b/api/src/Mail.php index 817308c074..c95d49bb84 100644 --- a/api/src/Mail.php +++ b/api/src/Mail.php @@ -7504,20 +7504,20 @@ class Mail 'certDetails' => $this->smime->parseCert($cert->cert), 'msg' => $cert->msg, 'certHtml' => $this->smime->certToHTML($cert->cert), - 'email' => $this->smime->getEmailFromKey($cert->cert), + 'email' => $cert->email, 'signed' => true )); // check for email address if both signer email address and // email address of sender are the same. - if (is_array($from) && strcasecmp($from[0], $metadata['email']) != 0) + if (is_array($from) && strcasecmp($from[0], $cert->email) != 0) { $metadata['unknownemail'] = true; $metadata['msg'] .= ' '.lang('Email address of signer is different from the email address of sender!'); } $AB_bo = new \addressbook_bo(); - $certkey = $AB_bo->get_smime_keys($metadata['email']); - if (!is_array($certkey) || strcasecmp($certkey[$metadata['email']], $cert->cert) != 0) $metadata['addtocontact'] = true; + $certkey = $AB_bo->get_smime_keys($cert->email); + if (!is_array($certkey) || strcasecmp($certkey[$cert->email], $cert->cert) != 0) $metadata['addtocontact'] = true; } else // only encrypted message {