Enigma: Fix PHP fatal error when decrypting a message with invalid signature (#5555)

pull/5566/head
Aleksander Machniak 8 years ago
parent f351b48771
commit 29d0b80449

@ -74,6 +74,7 @@ CHANGELOG Roundcube Webmail
- Fix redundant keep-alive/refresh after session error on compose page (#5500)
- Managesieve: Fix handling of scripts with nested rules (#5540)
- Fix variable substitution in ldap host for some use-cases, e.g. new_user_identity (#5544)
- Enigma: Fix PHP fatal error when decrypting a message with invalid signature (#5555)
RELEASE 1.2.3
-------------

@ -437,17 +437,20 @@ class enigma_driver_gnupg extends enigma_driver
*/
protected function parse_signature($sig)
{
$user = $sig->getUserId();
$data = new enigma_signature();
$data->id = $sig->getId();
$data->valid = $sig->isValid();
$data->fingerprint = $sig->getKeyFingerprint();
$data->created = $sig->getCreationDate();
$data->expires = $sig->getExpirationDate();
$data->name = $user->getName();
$data->comment = $user->getComment();
$data->email = $user->getEmail();
// In case of ERRSIG user may not be set
if ($user = $sig->getUserId()) {
$data->name = $user->getName();
$data->comment = $user->getComment();
$data->email = $user->getEmail();
}
return $data;
}

Loading…
Cancel
Save