Make sure whitespaces are removed from certkey before doing comparison

This commit is contained in:
Hadi Nategh 2018-09-20 14:13:32 +02:00
parent 89ba6df80b
commit a371eb7b10

View File

@ -7528,7 +7528,7 @@ class Mail
} }
$AB_bo = new \addressbook_bo(); $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; if (!is_array($certkey) || strcasecmp($certkey[$cert->email], $cert->cert) != 0) $metadata['addtocontact'] = true;
} }
else // only encrypted message else // only encrypted message