6.0.0-alpha12
6/12/25

[#14486] Vacation over two mounth causes sieve script to crash
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

History
10/20/2017 08:33:48 PM Git Commit Comment #6 Reply to this comment
Changes have been made in Git (FRAMEWORK_5_2):

commit 31d6aa47c86e87abba7e91b8369d38a2ec66bfc1
Author: Jan Schneider <jan@horde.org>
Date:   Mon, 10 Oct 2016 23:44:39 +0200

Reorganize vacation script.

Bug: 14486

Use 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
10/20/2017 08:33:48 PM Git Commit Comment #5 Reply to this comment
Changes have been made in Git (FRAMEWORK_5_2):

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
10/10/2016 09:45:47 PM Git Commit Comment #4 Reply to this comment
Changes have been made in Git (FRAMEWORK_5_2):

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
10/10/2016 09:45:46 PM Git Commit Comment #3 Reply to this comment
Changes have been made in Git (FRAMEWORK_5_2):

commit 6f42d4dcbf21298631acae3ffe4ff63b3dae6dae
Author: Jan Schneider <jan@horde.org>
Date:   Mon Oct 10 23:41:57 2016 +0200

     Reorganize vacation script.

     Bug: 14486

     Use 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
10/10/2016 09:42:57 PM Jan Schneider Assigned to Jan Schneider
State ⇒ Resolved
 
10/10/2016 09:42:12 PM Git Commit Comment #2 Reply to this comment
Changes have been made in Git (master):

commit 1b5dd418cea0f289d156ba31c6abe069628d123a
Author: Jan Schneider <jan@horde.org>
Date:   Mon Oct 10 23:41:57 2016 +0200

     Reorganize vacation script.

     Bug: 14486

     Use 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
10/06/2016 03:11:39 PM philipp (dot) faeustlin (at) uni-hohenheim (dot) de Comment #1
Priority ⇒ 2. Medium
Type ⇒ Bug
Summary ⇒ Vacation over two mounth causes sieve script to crash
Queue ⇒ Ingo
Milestone ⇒
Patch ⇒ No
State ⇒ Unconfirmed
Reply to this comment
I think I found a bug, where the by ingo generated sieve script 
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.

Saved Queries