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

pull/5754/head
Aleksander Machniak 8 years ago
parent 79613c1e4f
commit 69189ed21a

@ -3,6 +3,7 @@ CHANGELOG Roundcube Webmail
- 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
-------------

@ -409,17 +409,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