6.0.0-alpha10
5/17/25

[#6182] convert_prefs_to_sql.php results in duplicate blacklist / whitelist rules
Summary convert_prefs_to_sql.php results in duplicate blacklist / whitelist rules
Queue Ingo
Queue Version 1.2-RC2
Type Bug
State Resolved
Priority 1. Low
Owners jan (at) horde (dot) org
Requester liamr (at) deathstar (dot) org
Created 01/31/2008 (6316 days ago)
Due
Updated 02/28/2008 (6288 days ago)
Assigned 01/31/2008 (6316 days ago)
Resolved 02/28/2008 (6288 days ago)
Milestone
Patch No

History
02/28/2008 06:35:23 PM Jan Schneider Comment #3
Assigned to Jan Schneider
Taken from Horde DevelopersHorde Developers
State ⇒ Resolved
Reply to this comment
Fixed.
01/31/2008 06:11:57 PM Jan Schneider Assigned to Horde DevelopersHorde Developers
State ⇒ Assigned
 
01/31/2008 05:35:40 PM liamr (at) deathstar (dot) org Comment #2 Reply to this comment
The entry from horde_prefs that generated that set of rules is..



ingo          auto_update          1

ingo         rules



Array

(

     [0] => Array

         (

             [name] => Whitelist

             [action] => 9

             [disable] =>

         )



     [1] => Array

         (

             [name] => Blacklist

             [action] => 7

             [disable] => 1

         )



     [2] => Array

         (

             [name] => machinemail

             [combine] => 2

             [conditions] => Array

                 (

                     [0] => Array

                         (

                             [field] => From

                             [type] => 1

                             [match] => contains

                             [value] => root from scratch

                         )



                     [1] => Array

                         (

                             [field] => From

                             [type] => 1

                             [match] => contains

                             [value] => root@example.edu

                         )



                     [2] => Array

                         (

                             [field] => From

                             [type] => 1

                             [match] => contains

                             [value] => the root of all evil

                         )



                     [3] => Array

                         (

                             [field] => From

                             [type] => 1

                             [match] => contains

                             [value] => nefu-monitor

                         )



                     [4] => Array

                         (

                             [field] => From

                             [type] => 1

                             [match] => contains

                             [value] => flume

                         )



                 )



             [action-value] => vacationfilter

             [action] => 2

             [stop] => 1

             [flags] => 0

             [disable] => 1

         )



     [3] => Array

         (

             [name] => ITCS SpamBox

             [combine] => 1

             [conditions] => Array

                 (

                     [0] => Array

                         (

                             [field] => X-DSPAM-Result

                             [type] => 1

                             [match] => is

                             [value] => Spam

                         )



                 )



             [action-value] => SpamBox

             [action] => 2

             [stop] => 1

             [flags] => 0

         )



)



ingo         whitelist



Array

(

     [0] => address@example.com

     [1] => address@example.net

     [2] => address@example.org

)


01/31/2008 05:25:38 PM liamr (at) deathstar (dot) org Comment #1
Priority ⇒ 1. Low
Type ⇒ Bug
Summary ⇒ convert_prefs_to_sql.php results in duplicate blacklist / whitelist rules
Queue ⇒ Ingo
State ⇒ Unconfirmed
Reply to this comment
After running convert_prefs_to_sql.php, I ended up with two sets of 
"Whitelist / Blacklist" rules in positions 1-4.  It seems to happen 
randomly.. it worked for my account right now, but other users in this 
batch have the issue:



+---------+------------+-----------+-------------+------------+------------+-----------------+--------------+-----------+-------------+------------+

| rule_id | rule_owner | rule_name | rule_action | rule_value | 
rule_flags | rule_conditions | rule_combine | rule_stop | rule_active 
| rule_order |

+---------+------------+-----------+-------------+------------+------------+-----------------+--------------+-----------+-------------+------------+

|       1 | amw        | Whitelist |           9 | NULL       |       
NULL | NULL            |         NULL |      NULL |           1 |       
     1 |

|       3 | amw        | Blacklist |           7 |            |       
NULL | NULL            |         NULL |      NULL |           1 |       
     3 |

|       6 | amw        | Whitelist |           9 |            |         
   0 | a:0:{}          |            1 |         1 |           1 |       
     6 |

|       7 | amw        | Blacklist |           7 |            |         
   0 | a:0:{}          |            1 |         1 |           0 |       
     7 |

+---------+------------+-----------+-------------+------------+------------+-----------------+--------------+-----------+-------------+------------+

4 rows in set (0.00 sec)



This was a freshly created set of ingo_ tables, and the original 
horde_prefs ingo rules pref don't have  multiple blacklist and 
whitelist entries.

Saved Queries