From bd0551b22076b82a6d49e9f7a2b2e0c90a1b2326 Mon Sep 17 00:00:00 2001
From: Aleksander Machniak <alec@alec.pl>
Date: Fri, 05 Feb 2016 07:25:27 -0500
Subject: [PATCH] Secure also downloads of addressbook exports, managesieve script exports and Enigma keys exports

---
 plugins/identity_select/identity_select.php |    4 ++--
 1 files changed, 2 insertions(+), 2 deletions(-)

diff --git a/plugins/identity_select/identity_select.php b/plugins/identity_select/identity_select.php
index 2037767..7973b5d 100644
--- a/plugins/identity_select/identity_select.php
+++ b/plugins/identity_select/identity_select.php
@@ -10,7 +10,7 @@
  * identity selection more accurate.
  *
  * Enable the plugin in config.inc.php and add your desired headers:
- *   $rcmail_config['identity_select_headers'] = array('Delivered-To');
+ *   $config['identity_select_headers'] = array('Delivered-To');
  *
  * @version @package_version@
  * @author Aleksander Machniak <alec@alec.pl>
@@ -46,7 +46,7 @@
      */
     function select($p)
     {
-        if ($p['selected'] !== null) {
+        if ($p['selected'] !== null || !is_object($p['message']->headers)) {
             return $p;
         }
 

--
Gitblit v1.9.1