Enigma: Fix error message when trying to encrypt with a revoked private key (#6607)

pull/6748/head
Aleksander Machniak 6 years ago
parent 6efa88f049
commit 1ee7253ff2

@ -24,6 +24,7 @@ CHANGELOG Roundcube Webmail
- Managesieve: Use RFC-compliant line endings, CRLF instead of LF (#6686)
- Managesieve: Fix so "Create filter" option does not show up when Filters menu is disabled (#6723)
- Enigma: Fix bug where revoked users/keys were not greyed out in key info
- Enigma: Fix error message when trying to encrypt with a revoked key (#6607)
- Fix so advanced search dialog is not automatically displayed on searchonly addressbooks (#6679)
- Fix so an error is logged when more than one attachment plugin has been enabled, initialize the first one (#6735)
- Fix bug where flag change could have been passed to a preview frame when not expected

@ -265,10 +265,6 @@ class enigma_engine
$recipients = array_merge($recipients, $mime->getRecipients());
}
if (empty($recipients)) {
return new enigma_error(enigma_error::KEYNOTFOUND);
}
$recipients = array_unique($recipients);
// find recipient public keys

@ -1158,10 +1158,14 @@ class enigma_ui
if ($mode && ($status instanceof enigma_error)) {
$code = $status->getCode();
if ($code == enigma_error::KEYNOTFOUND) {
$vars = array('email' => $status->getData('missing'));
$msg = 'enigma.' . $mode . 'nokey';
if ($email = $status->getData('missing')) {
$vars = array('email' => $email);
$msg = 'enigma.' . $mode . 'nokey';
}
else {
$msg = 'enigma.' . ($encrypt_enable ? 'encryptnoprivkey' : 'signnokey');
}
}
else if ($code == enigma_error::BADPASS) {
$this->password_prompt($status);

@ -116,6 +116,7 @@ $messages['signbadpass'] = 'Signing failed. Invalid password.';
$messages['signnopass'] = 'Signing failed. Key password required.';
$messages['encrypterror'] = 'Encryption failed.';
$messages['encryptnokey'] = 'Encryption failed. Public key not found for $email.';
$messages['encryptnoprivkey'] = 'Encryption failed. Private key not found.';
$messages['nokeysfound'] = 'No keys found';
$messages['keynotfound'] = 'Key not found!';
$messages['keyopenerror'] = 'Unable to get key information! Internal error.';

Loading…
Cancel
Save