Blacklist and Whitelist being over written when new address is added

Issue #45 resolved
eXtremeSHOK created an issue

Latest version of iredadmin-pro 2.2.0 (LDAP)

To reproduce: add a list of addresses to the whitelist and the blacklist ( add-> Add whitelist and blacklist) View the white and blacklist ( system -> antispam -> whitelist & blacklists) *notice both text boxes contain addresses.

Add a 1x blacklist address ( add-> Add whitelist and blacklist) View the white and blacklist ( system -> antispam -> whitelist & blacklists) *notice the existing white and blacklists are removed and only the 1x blacklist address is present.

It appears the add whitelists and blacklist is not appending (adding) the addresses, but overwriting (replacing) the values.

Comments (10)

  1. Zhang Huangbin repo owner

    Dear extremeshok,

    Sorry about this trouble. Could you capture some screenshots (with comment) to help me understand this issue?

  2. eXtremeSHOK reporter

    2015-01-06 12_23_18-Whitelists & Blacklists - Opera.png View the white and blacklist ( system -> antispam -> whitelist & blacklists) *notice both text boxes contain addresses.

  3. eXtremeSHOK reporter

    2015-01-06 12_24_14-Add whitelist and blacklist - Opera.png Add a 1x blacklist address ( add-> Add whitelist and blacklist) View the white and blacklist ( system -> antispam -> whitelist & blacklists) *notice the existing white and blacklists are removed and only the 1x blacklist address is present.

  4. eXtremeSHOK reporter

    2015-01-06 12_24_36-Whitelists & Blacklists - Opera.png ( system -> antispam -> whitelist & blacklists) *notice the existing white and blacklists are removed and only the 1x blacklist address is present.

  5. Zhang Huangbin repo owner

    it looks like a bug in iRedAdmin-Pro, i will try to reproduce this issue and fix it.

  6. Zhang Huangbin repo owner

    Please try below patch and restart Apache or uwsgi (if you're running Nginx) service:

    diff -r 29c6cf2d75bb -r 3926f71d1a14 controllers/amavisd/wblist.py
    --- a/controllers/amavisd/wblist.py Wed Jan 07 09:41:21 2015 +0800
    +++ b/controllers/amavisd/wblist.py Wed Jan 07 10:31:59 2015 +0800
    @@ -31,7 +31,7 @@
         qr = wblist_lib.add_wblist(account='@.',
                                    wl_senders=wl_senders,
                                    bl_senders=bl_senders,
    -                               flush_before_import=True)
    +                               flush_before_import=False)
    
         if qr[0]:
             raise web.seeother(post_url + '?msg=' + success_msg)
    
  7. Log in to comment