Summary | Vacation over two mounth causes sieve script to crash |
Queue | Ingo |
Queue Version | Git master |
Type | Bug |
State | Resolved |
Priority | 2. Medium |
Owners | jan (at) horde (dot) org |
Requester | philipp.faeustlin (at) uni-hohenheim (dot) de |
Created | 10/06/2016 (3171 days ago) |
Due | |
Updated | 10/20/2017 (2792 days ago) |
Assigned | |
Resolved | 10/10/2016 (3167 days ago) |
Github Issue Link | |
Github Pull Request | |
Milestone | |
Patch | No |
commit 31d6aa47c86e87abba7e91b8369d38a2ec66bfc1
Author: Jan Schneider <jan@horde.org>
Date: Mon, 10 Oct 2016 23:44:39 +0200
Reorganize vacation script.
Bug: 14486Use elsifs and allof/anyof tests to better structure the test and to
avoid double execution of vacation action.
M lib/Script/Sieve/Action/Vacation.php
https://github.com/horde/ingo/commit/31d6aa47c86e87abba7e91b8369d38a2ec66bfc1
commit 6de87f162298a2e408d1b3008dc551cc16434798
Author: Jan Schneider <jan@horde.org>
Date: Mon, 10 Oct 2016 23:45:36 +0200
[jan] Fix some edge cases with Sieve vacation rules with date limits
(
Bug #14486).M docs/CHANGES
M package.xml
https://github.com/horde/ingo/commit/6de87f162298a2e408d1b3008dc551cc16434798
commit faeaad2098c3a168cb49e34adf89efc6a66d6ada
Author: Jan Schneider <jan@horde.org>
Date: Mon Oct 10 23:45:36 2016 +0200
[jan] Fix some edge cases with Sieve vacation rules with date
limits (
Bug #14486).ingo/docs/CHANGES | 2 ++
ingo/package.xml | 4 ++--
2 files changed, 4 insertions(+), 2 deletions(-)
http://github.com/horde/horde/commit/faeaad2098c3a168cb49e34adf89efc6a66d6ada
commit 6f42d4dcbf21298631acae3ffe4ff63b3dae6dae
Author: Jan Schneider <jan@horde.org>
Date: Mon Oct 10 23:41:57 2016 +0200
Reorganize vacation script.
Bug: 14486Use elsifs and allof/anyof tests to better structure the test and
to avoid double execution of vacation action.
ingo/lib/Script/Sieve/Action/Vacation.php | 127
++++++++++++++++--------------
1 file changed, 70 insertions(+), 57 deletions(-)
http://github.com/horde/horde/commit/6f42d4dcbf21298631acae3ffe4ff63b3dae6dae
State ⇒ Resolved
commit 1b5dd418cea0f289d156ba31c6abe069628d123a
Author: Jan Schneider <jan@horde.org>
Date: Mon Oct 10 23:41:57 2016 +0200
Reorganize vacation script.
Bug: 14486Use elsifs and allof/anyof tests to better structure the test and
to avoid double execution of vacation action.
ingo/lib/Script/Sieve/Action/Vacation.php | 127
++++++++++++++++--------------
1 file changed, 70 insertions(+), 57 deletions(-)
http://github.com/horde/horde/commit/1b5dd418cea0f289d156ba31c6abe069628d123a
Priority ⇒ 2. Medium
Type ⇒ Bug
Summary ⇒ Vacation over two mounth causes sieve script to crash
Queue ⇒ Ingo
Milestone ⇒
Patch ⇒ No
State ⇒ Unconfirmed
crashes with "error: duplicate vacation action not allowed"
I my case the user had the message for Sep 30 and Oct 1 activated,
which generates following script part:
..................................................................
if header :regex "Received" "^.*(Sep) (\\(.*\\) )?.... (\\(.*\\)
)?..:..:.. (\\(.*\\) )?((\\+|\\-)[[:digit:]]{4}|.{1,5})(\\(.*\\))?$" {
if header :regex "Received" "^.*(30) (\\(.*\\) )?... (\\(.*\\)
)?.... (\\(.*\\) )?..:..:.. (\\(.*\\)
)?((\\+|\\-)[[:digit:]]{4}|.{1,5})( \\(.*\\))?$" {
vacation :addresses ["..."] :subject "..." "...";
}
}
if header :regex "Received" "^.*(Oct) (\\(.*\\) )?.... (\\(.*\\)
)?..:..:.. (\\(.*\\) )?((\\+|\\-)[[:digit:]]{4}|.{1,5})( \\(.*\\))?$" {
if header :regex "Received" "^.*([0 ]1) (\\(.*\\) )?... (\\(.*\\)
)?.... (\\(.*\\) )?..:..:.. (\\(.*\\)
)?((\\+|\\-)[[:digit:]]{4}|.{1,5})( \\(.*\\))?$" {
vacation :addresses ["..."] :subject "..." "...";
}
..................................................................
He received a message which contained following Received lines...
Received: ... Sat, 01 Oct 2016 03:26:19 +0200
Received: ... Fri, 30 Sep 2016 21:17:58 -0400
With such message all if clauses are true and the sieve script crashes
at the second "vacation" action and the rest of the script isn't
executed.
Solution:?
From my point of view the solution for the problem is to use elseif
(elif) for checking the the second, third, ... month of the vacation
message.