6.0.0-beta1
7/11/25

[#4345] sieve: empty allof generates 'false' instead of 'true'
Summary sieve: empty allof generates 'false' instead of 'true'
Queue Ingo
Queue Version HEAD
Type Bug
State Resolved
Priority 1. Low
Owners ben (at) , jan (at) horde (dot) org
Requester gergely (at) risko (dot) hu
Created 08/28/2006 (6892 days ago)
Due
Updated 10/10/2006 (6849 days ago)
Assigned 09/25/2006 (6864 days ago)
Resolved 10/10/2006 (6849 days ago)
Github Issue Link
Github Pull Request
Milestone
Patch Yes

History
10/10/2006 01:16:12 PM Jan Schneider Comment #6
State ⇒ Resolved
Reply to this comment
Convinced. Since the "if false" check doesn't make any sense at all, I 
changed the anyof test to return true without further rule criteria too.
09/25/2006 04:46:02 PM Jan Schneider State ⇒ Assigned
 
08/29/2006 01:11:03 PM gergely (at) risko (dot) hu Comment #5 Reply to this comment
You wrote:
That is anyof, which evaluates to false.
But with your patch it always evaluates to true if no conditions are
specified.
I told you already, that it is not the case.  Please. Apply my patch 
to a test directory and test it if you do not believe, but I think it 
is clear from the source also.  Since it doesn't patch 
Sieve_Test_Anyof class, but Sieve_Test_Allof only.
But this is an academical discussion anyway, because "if
false" doesn't make any sense. "if true" doesn't make much sense
either, so I'm tending to disallow any rules that don't have
conditions specified.
It will be a big mistake, since I see no other way to create an always 
running custom rule, if there is, please enlighten me. Anyway this was 
the reason, why I bothered patching it.



gergely
08/29/2006 09:54:37 AM Jan Schneider Comment #4 Reply to this comment
You wrote:
That is anyof, which evaluates to false.
But with your patch it always evaluates to true if no conditions are 
specified. But this is an academical discussion anyway, because "if 
false" doesn't make any sense. "if true" doesn't make much sense 
either, so I'm tending to disallow any rules that don't have 
conditions specified.
08/28/2006 11:04:08 PM gergely (at) risko (dot) hu Comment #3 Reply to this comment
But then your patch doesn't makes sense because it breaks the case
"anyof no criteria".
no, it does not.


08/28/2006 09:40:08 PM Jan Schneider Comment #2
State ⇒ Feedback
Reply to this comment
But then your patch doesn't makes sense because it breaks the case 
"anyof no criteria".
08/28/2006 09:16:55 PM Chuck Hagenbuch Assigned to ben
Assigned to Jan Schneider
State ⇒ Assigned
 
08/28/2006 11:18:59 AM gergely (at) risko (dot) hu Comment #1
Priority ⇒ 1. Low
Type ⇒ Bug
Summary ⇒ sieve: empty allof generates 'false' instead of 'true'
Queue ⇒ Ingo
New Attachment: patch Download
State ⇒ Unconfirmed
Reply to this comment
If I create a rule, where I choose to match every criteria I specify,

but I specify not, then the generated code says 'if false' instead of

'is true'.  Please keep in mind, that in mathematics (and because of

that in IT) "allof no conditions" evaluates to true, not to false.

That is anyof, which evaluates to false.

Saved Queries