From 4674ac59b89494c1d5d8269f92ab7736cba90ed7 Mon Sep 17 00:00:00 2001 From: Aleksander Machniak Date: Tue, 9 Apr 2019 08:58:07 +0200 Subject: [PATCH] Fix bug where global includes were requested for vacation (#6716) --- CHANGELOG | 1 + plugins/managesieve/Changelog | 2 ++ plugins/managesieve/lib/Roundcube/rcube_sieve_vacation.php | 7 ++++--- 3 files changed, 7 insertions(+), 3 deletions(-) diff --git a/CHANGELOG b/CHANGELOG index 72ef3208e..4b7602f90 100644 --- a/CHANGELOG +++ b/CHANGELOG @@ -10,6 +10,7 @@ CHANGELOG Roundcube Webmail - Elastic: Fix bug where toolbar disappears on attachment menu use in Chrome (#6677) - Elastic: Fix folders list scrolling on touch devices (#6706) - Elastic: Fix non-working pretty selects in Chrome browser (#6705) +- Managesieve: Fix bug where global includes were requested for vacation (#6716) - Fix bug where HTML messages with a xml:namespace tag were not rendered (#6697) - Fix TinyMCE download location (#6694) - Fix so "Open in new window" consistently displays "external window" interface (#6659) diff --git a/plugins/managesieve/Changelog b/plugins/managesieve/Changelog index 132764912..97a5ad117 100644 --- a/plugins/managesieve/Changelog +++ b/plugins/managesieve/Changelog @@ -1,3 +1,5 @@ +- Fix bug where global includes were requested for vacation (#6716) + * version 9.2 [2018-11-08] ----------------------------------------------------------- - Added support for 'editheader' extension - RFC5293 (#5954) diff --git a/plugins/managesieve/lib/Roundcube/rcube_sieve_vacation.php b/plugins/managesieve/lib/Roundcube/rcube_sieve_vacation.php index 5fcbfb3f0..70eaaded3 100644 --- a/plugins/managesieve/lib/Roundcube/rcube_sieve_vacation.php +++ b/plugins/managesieve/lib/Roundcube/rcube_sieve_vacation.php @@ -72,12 +72,13 @@ class rcube_sieve_vacation extends rcube_sieve_engine if ($this->sieve->load($script)) { foreach ($this->sieve->script->as_array() as $rule) { if (!empty($rule['actions'])) { - if ($rule['actions'][0]['type'] == 'vacation') { + $action = $rule['actions'][0]; + if ($action['type'] == 'vacation') { $this->script_name = $script; return 0; } - else if (empty($master) && $rule['actions'][0]['type'] == 'include') { - $included[] = $rule['actions'][0]['target']; + else if (empty($master) && empty($action['global']) && $action['type'] == 'include') { + $included[] = $action['target']; } } }