From a371eb7b10318f37ae3cd2db362a32f6436fad83 Mon Sep 17 00:00:00 2001 From: Hadi Nategh Date: Thu, 20 Sep 2018 14:13:32 +0200 Subject: [PATCH] Make sure whitespaces are removed from certkey before doing comparison --- api/src/Mail.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/api/src/Mail.php b/api/src/Mail.php index ef79b38018..bef9e9d4f7 100644 --- a/api/src/Mail.php +++ b/api/src/Mail.php @@ -7528,7 +7528,7 @@ class Mail } $AB_bo = new \addressbook_bo(); - $certkey = $AB_bo->get_smime_keys($cert->email); + $certkey = trim($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