summaryrefslogtreecommitdiff
path: root/plugins
diff options
context:
space:
mode:
authorAleksander Machniak <alec@alec.pl>2013-09-20 08:34:55 +0200
committerAleksander Machniak <alec@alec.pl>2013-09-20 08:34:55 +0200
commit962eff7dfe2456c32d08587d0c413155842578eb (patch)
tree5228ec061358aa33cc602edaa3358a520284addf /plugins
parentb334a01791689a16c8d6b10955df850b891ff40e (diff)
Fix bug where at least one additional address of vacation message was required (#1489345)
Diffstat (limited to 'plugins')
-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;
}