diff options
author | Aleksander Machniak <alec@alec.pl> | 2022-09-24 10:03:08 +0300 |
---|---|---|
committer | Aleksander Machniak <alec@alec.pl> | 2022-09-24 10:03:08 +0300 |
commit | 92262aa2a1481cfd8fc9e4f14d9d9887528a8455 (patch) | |
tree | 2891050b5d3e8c7ba989740d9cce4eba42181ba0 | |
parent | 2859a69338481119b4d66c4fb9877ec7d86a324a (diff) |
Fix fatal error on identity page if Enigma plugin is misconfigured (#8719)
-rw-r--r-- | CHANGELOG.md | 1 | ||||
-rw-r--r-- | plugins/enigma/enigma.php | 7 |
2 files changed, 7 insertions, 1 deletions
diff --git a/CHANGELOG.md b/CHANGELOG.md index d7d7dfd48..1614db92e 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -23,6 +23,7 @@ - Fix bug where the attachment menu wouldn't disappear after an action is selected (#8691) - Fix bug where some dialogs in an eml attachment preview would not close on mobile (#8627) - Fix bug where multiline data:image URI's in emails were stripped from the message on display (#8613) +- Fix fatal error on identity page if Enigma plugin is misconfigured (#8719) ## Release 1.6.0 diff --git a/plugins/enigma/enigma.php b/plugins/enigma/enigma.php index 19f60bedd..3ecf50523 100644 --- a/plugins/enigma/enigma.php +++ b/plugins/enigma/enigma.php @@ -440,7 +440,12 @@ class enigma extends rcube_plugin if (!empty($p['record']['email'])) { $listing = []; $engine = $this->load_engine(); - $keys = (array) $engine->list_keys($p['record']['email']); + $keys = $engine->list_keys($p['record']['email']); + + // On error do nothing, plugin/gnupg misconfigured? + if ($keys instanceof enigma_error) { + return $p; + } foreach ($keys as $key) { if ($key->get_type() === enigma_key::TYPE_KEYPAIR) { |