From 32b42e21eee124660e3a7c9368a9fe854d6b6122 Mon Sep 17 00:00:00 2001 From: Aleksander Machniak Date: Wed, 5 Jun 2019 14:01:55 +0000 Subject: [PATCH] Verify folder_classname() result before use In future versions it may return class name that is not a localization label. --- plugins/kolab_activesync/kolab_activesync_ui.php | 4 +++- plugins/kolab_delegation/kolab_delegation.php | 4 +++- 2 files changed, 6 insertions(+), 2 deletions(-) diff --git a/plugins/kolab_activesync/kolab_activesync_ui.php b/plugins/kolab_activesync/kolab_activesync_ui.php index 705c9ae9..53134240 100644 --- a/plugins/kolab_activesync/kolab_activesync_ui.php +++ b/plugins/kolab_activesync/kolab_activesync_ui.php @@ -203,7 +203,9 @@ class kolab_activesync_ui $classes = array('mailbox'); if ($folder_class = $this->rc->folder_classname($folder)) { - $foldername = html::quote($this->rc->gettext($folder_class)); + if ($this->rc->text_exists($folder_class)) { + $foldername = html::quote($this->rc->gettext($folder_class)); + } $classes[] = $folder_class; } diff --git a/plugins/kolab_delegation/kolab_delegation.php b/plugins/kolab_delegation/kolab_delegation.php index a58f1b92..af37744c 100644 --- a/plugins/kolab_delegation/kolab_delegation.php +++ b/plugins/kolab_delegation/kolab_delegation.php @@ -581,7 +581,9 @@ class kolab_delegation extends rcube_plugin $classes = array('mailbox'); if ($folder_class = $this->rc->folder_classname($folder)) { - $foldername = html::quote($this->rc->gettext($folder_class)); + if ($this->rc->text_exists($folder_class)) { + $foldername = html::quote($this->rc->gettext($folder_class)); + } $classes[] = $folder_class; }