[pkg-horde] Bug#504798: Ingo: error in sieve 'equal' condition

Miotto Paolo paolo.miotto at uniud.it
Fri Nov 7 10:23:45 UTC 2008


Package: ingo1
Severity: important

I have found a bug in the translation of an "equal to" clause by the  
sieve backend: the clause is correctly stored in the database, but the  
Sieve script generated is always:

if true {

The cause is an incorrect string match for the "equal" condition: the  
string stored in the preferences is "equal" (and is correctly reported  
in the  $_tests  array, but is matched against a "equal to" string in  
the switch ($condition['match']) .

I tested this patch and it worked for me:

--- ./lib/Script/sieve.php.ORI	2006-10-31 08:24:34.000000000 +0000
+++ ./lib/Script/sieve.php	2008-11-07 09:11:29.000000000 +0000
@@ -488,7 +488,7 @@
              foreach ($filter['conditions'] as $condition) {
                  $tmp = '';
                  switch ($condition['match']) {
-                case 'equal to':
+                case 'equal':
                      $tmp = &new  
Sieve_Test_Relational(array('comparison' => 'eq', 'headers' =>  
$condition['field'], 'value' => $condition['value']));
                      $test->addTest($tmp);
                      break;

The bug is already present in the latest svn version of ingo.

Regards.

              Paolo Miotto


-------------------------------------------
Paolo Miotto
Centro Servizi Informatici e Telematici
Università di Udine
Via delle scienze, 208
33100 - UDINE

Tel.: +39-0432-558909
Fax.: +39-0432-558911

e-mail: paolo.miotto at uniud.it
-------------------------------------------





----------------------------------------------------------------------
SEMEL (SErvizio di Messaging ELettronico) - CSIT -Universita' di Udine







More information about the pkg-horde-hackers mailing list