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

---
 program/lib/Roundcube/rcube_addressbook.php |    8 ++++----
 1 files changed, 4 insertions(+), 4 deletions(-)

diff --git a/program/lib/Roundcube/rcube_addressbook.php b/program/lib/Roundcube/rcube_addressbook.php
index b4ce03b..5f13da0 100644
--- a/program/lib/Roundcube/rcube_addressbook.php
+++ b/program/lib/Roundcube/rcube_addressbook.php
@@ -550,12 +550,12 @@
         // fallbacks...
         if ($fn === '') {
             // ... display name
-            if (!empty(trim($contact['name']))) {
-                $fn = $contact['name'];
+            if ($name = trim($contact['name'])) {
+                $fn = $name;
             }
             // ... organization
-            else if (!empty($contact['organization'])) {
-                $fn = $contact['organization'];
+            else if ($org = trim($contact['organization'])) {
+                $fn = $org;
             }
             // ... email address
             else if (($email = self::get_col_values('email', $contact, true)) && !empty($email)) {

--
Gitblit v1.9.1