summaryrefslogtreecommitdiff
path: root/plugins/managesieve
diff options
context:
space:
mode:
Diffstat (limited to 'plugins/managesieve')
-rw-r--r--plugins/managesieve/Changelog2
-rw-r--r--plugins/managesieve/lib/Roundcube/rcube_sieve_engine.php7
2 files changed, 8 insertions, 1 deletions
diff --git a/plugins/managesieve/Changelog b/plugins/managesieve/Changelog
index e660ee1ee..491a48472 100644
--- a/plugins/managesieve/Changelog
+++ b/plugins/managesieve/Changelog
@@ -1,3 +1,5 @@
+- Fix bug where at least one additional address of vacation message was required (#1489345)
+
* version 7.0 [2013-09-09]
-----------------------------------------------------------
- Add vacation-seconds extension support (RFC 6131)
diff --git a/plugins/managesieve/lib/Roundcube/rcube_sieve_engine.php b/plugins/managesieve/lib/Roundcube/rcube_sieve_engine.php
index e4efef5b3..685a66aec 100644
--- a/plugins/managesieve/lib/Roundcube/rcube_sieve_engine.php
+++ b/plugins/managesieve/lib/Roundcube/rcube_sieve_engine.php
@@ -871,7 +871,12 @@ class rcube_sieve_engine
// @TODO: vacation :mime, :from, :handle
foreach ((array)$this->form['actions'][$i]['addresses'] as $aidx => $address) {
- if (!rcube_utils::check_email($address)) {
+ $this->form['actions'][$i]['addresses'][$aidx] = $address = trim($address);
+
+ if (empty($address)) {
+ unset($this->form['actions'][$i]['addresses'][$aidx]);
+ }
+ else if (!rcube_utils::check_email($address)) {
$this->errors['actions'][$i]['addresses'] = $this->plugin->gettext('noemailwarning');
break;
}