From ec6e82f0a1999ee9f37796ff798d3818c4c57e0e Mon Sep 17 00:00:00 2001 From: Hadi Nategh Date: Tue, 25 Jul 2017 19:55:46 +0200 Subject: [PATCH] W.I.P. SMIME: - Fix switching account fetches a wrong pubkey --- api/src/Mail.php | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/api/src/Mail.php b/api/src/Mail.php index 3f7c3dccf6..279c8531af 100644 --- a/api/src/Mail.php +++ b/api/src/Mail.php @@ -7413,7 +7413,7 @@ class Mail { $AB_bo = new \addressbook_bo(); $credents = Mail\Credentials::read($this->profileID, Mail\Credentials::SMIME, $GLOBALS['egw_info']['user']['account_id']); - $certkey = $AB_bo->get_smime_keys($GLOBALS['egw_info']['user']['account_email']); + $certkey = $AB_bo->get_smime_keys($this->icServer->ident_email); if (!$this->smime->verifyPassphrase($credents['acc_smime_password'], $_passphrase)) { return array ( @@ -7424,7 +7424,7 @@ class Mail $params = array ( 'type' => 'message', - 'pubkey' => $certkey[$GLOBALS['egw_info']['user']['account_email']], + 'pubkey' => $certkey[$this->icServer->ident_email], 'privkey' => $credents['acc_smime_password'], 'passphrase'=> $_passphrase );