Author Topic: wp blacklist deletes all comments..  (Read 7699 times)

Offline john1000

  • No flame
  • *
  • Posts: 8
  • Karma: +0/-0
wp blacklist deletes all comments..
« on: November 29, 2004, 08:39:38 AM »
hello fahim,

i have your wp blacklist installed and works great but unfortunate it trashes everything.
even if i post a comment i get deleted.
ive checked for blank spaces...found a few and took care of that and still the same...
ive set comment moderation to of and it stays the same..
everything should be working but it deletes all and in the email it shows most of the times...
Triggered by : Author URL:  matched //i
So im close to deleting your scripts unless you can come up with a solution to this...
i was happy i found a script that helped me with the spam generated by bots but now its useless..

john
Any help ?

Offline Fahim

  • Administrator
  • Inferno
  • *****
  • Posts: 663
  • Karma: +4/-0
    • http://www.farook.org
wp blacklist deletes all comments..
« Reply #1 on: November 29, 2004, 08:51:21 PM »
First, you posted under the wrong topic - I have moved this over to the WP section since that's where it belongs :p

Secondly, the problem you are facing seems to stem from you having a blank item in your blacklist. You can either try to trace the blank item and delete it or just drop all records from your blacklist table using something like phpMyAdmin and then reimport the blacklist from Jay Allen's centralized one. That should solve your problem :)

Offline john1000

  • No flame
  • *
  • Posts: 8
  • Karma: +0/-0
wp blacklist deletes all comments..
« Reply #2 on: November 29, 2004, 08:58:59 PM »
hello fahim,

well i have found just 1 blank line that was just after the php closing tag in blacklist.php
as for an item in the tables self..i dont know .
i sure can check it....
so theres no other reason that can cause all this trouble ?

john

Offline Cecil

  • No flame
  • *
  • Posts: 5
  • Karma: +0/-0
wp blacklist deletes all comments..
« Reply #3 on: November 30, 2004, 06:32:51 AM »
Here's the section of code from blacklist.php I believe is the culprit. What gets put in the database when $email is null?  The same thing might also happen farther down for the other harvested fields.  It's a very real problem. I fixed my database yesterday and another space or null showed up in the db today.


       // Add author e-mail to blacklist
        $buf = sanctify($email);
        $request = $wpdb->get_row("SELECT id FROM blacklist WHERE regex='$buf'");
        if (!$request) {
            $wpdb->query("INSERT INTO blacklist (regex, regex_type) VALUES ('$buf','url')");
            $info .= "Author e-mail: $email\r\n";
        }
        // Add author IP to blacklist

Offline john1000

  • No flame
  • *
  • Posts: 8
  • Karma: +0/-0
wp blacklist deletes all comments..
« Reply #4 on: November 30, 2004, 06:56:06 AM »
so what do i have to change ?
what you posted....
Im sure fahim is a nice guy but im getting a lot of advice to un-install it because it can not be trusted...
But im willing to try to get it work...
So what changes ?

Offline Cecil

  • No flame
  • *
  • Posts: 5
  • Karma: +0/-0
wp blacklist deletes all comments..
« Reply #5 on: November 30, 2004, 07:25:45 AM »
Warning -- this is a hack but it worked in my testings.  Add yes this is where a space can get in the database. I tested that too.  At wp-content/plugins/blacklist.php at line 65 (or close by)

replace the
        if (!$request) {

with
        if (!$request && (strpos($buf,'@')) > 1) {

The strpos does two things, it checks for non empty string and that it has '@' sign in the string. Other wise normal words like 'help' could be entered in the blacklist.  Again its a hack. Use at your own risk.

Offline Fahim

  • Administrator
  • Inferno
  • *****
  • Posts: 663
  • Karma: +4/-0
    • http://www.farook.org
wp blacklist deletes all comments..
« Reply #6 on: November 30, 2004, 10:54:27 AM »
Quote from: john1000

Im sure fahim is a nice guy but im getting a lot of advice to un-install it because it can not be trusted...
But im willing to try to get it work...
So what changes ?


I guess you can either listen to advice from "people" or you can try something out and see if it works for you or not :p I use WPBlacklist on my own site and wrote it because I needed the functionality. I distribute it because I hope somebodyelse might find it useful. Just because some faceless/nameless person says it cannot be "trusted" with nothing to back it up, what am I supposed to do? :p If I'm told what the problem is, I can try to fix it ... but I can't do anything about WPBlacklist's trustworthiness in the eyes of these nameless people....

Offline Cecil

  • No flame
  • *
  • Posts: 5
  • Karma: +0/-0
wp blacklist deletes all comments..
« Reply #7 on: November 30, 2004, 11:45:34 AM »
Let's cut this off at the pass. There's bug in WPBlacklist 2.62 about entering null/space in the database when harvesting. I've sent Fahim a more elegant patch in private email and he's going to incorporate some of it in the next release . Until then the hack I posted seems to work.

I'm not blaming Fahim for coding errors We also know that John1000 could be under some management or pointy headed boss pressure or he doesn't read PHP or  or or. Doesn't really matter, why John is anxious. He is. He may have the skills to apply my hack, he may not. It might work for him, it may not. But we do what we can and neither Fahim or I get any monetary compensation for this. It's a labor of love,  John1000, so please respect that free software comes with a price tag of respect for those who provide it.

Are we all less miffed? Can we report bugs and fix them? I think we can.

Offline john1000

  • No flame
  • *
  • Posts: 8
  • Karma: +0/-0
wp blacklist deletes all comments..
« Reply #8 on: November 30, 2004, 06:47:34 PM »
well im listening but i decide what i do.....so for now im using it and will make change by hand.....
hope this is solved in the update.........whenever that is...

Offline Fahim

  • Administrator
  • Inferno
  • *****
  • Posts: 663
  • Karma: +4/-0
    • http://www.farook.org
wp blacklist deletes all comments..
« Reply #9 on: December 02, 2004, 07:48:57 AM »
Quote from: john1000
well im listening but i decide what i do.....so for now im using it and will make change by hand.....
hope this is solved in the update.........whenever that is...


At the risk of being told that I'm miffed again, I have to say this :p Of course, it is impossible to judge tone from a text posting but the whole "whenever that is..." sounds very much like a rolling of the eyes and I must say that WPBlacklist is not commercial software - nobody pays to use it nor do I get paid to develop it. So the next release will be out when I have some time to work on it - I fix urgent, crippling bugs and send out a release immediately but I don't see this as an urgent or crippling bug since there are several known workarounds. So ... when I have time :p

Offline john1000

  • No flame
  • *
  • Posts: 8
  • Karma: +0/-0
wp blacklist deletes all comments..
« Reply #10 on: December 02, 2004, 08:01:58 AM »
well your wrong.....
it wasnt ment to sound as you think...
cecil talked about update release so thats why i said ...whenever that is cause i dont know a date.
So dont jump to any conclusions...
Im still using the blacklist plugin and ive made the little change cecil posted and everything seems to be worrking and have no problems yet...

Offline Fahim

  • Administrator
  • Inferno
  • *****
  • Posts: 663
  • Karma: +4/-0
    • http://www.farook.org
wp blacklist deletes all comments..
« Reply #11 on: December 02, 2004, 07:40:32 PM »
As long as it works for you, I'm happy :) Hopefully, I'll have some time this weekend to work on the next update but you know how these things go ....

Offline [m i a o w]

  • No flame
  • *
  • Posts: 1
  • Karma: +0/-0
Tried almost everything :o(
« Reply #12 on: December 15, 2004, 08:45:36 AM »
I have done the little hack that is mentioned above because I was unable to post any comment to my site. Then I got the old error I used to get:
"Warning: Cannot modify header information - headers already sent by..."
So I did what was suggested here and 'dropped the blacklist db from my wordpress DB and rebuilt it with the installer' - but no joy  :(  I still get the same error. I can't locate the offending lines and they seem to be in the default blacklist.txt file.
At the moment it seems I just have to either turn off wpblacklist and get decimated by comment spam, or turn it on and totally confuse people with freaky errors when they post a comment.

Can anyone help me? - I am at the end of my tether.... :roll:

Offline Fahim

  • Administrator
  • Inferno
  • *****
  • Posts: 663
  • Karma: +4/-0
    • http://www.farook.org
wp blacklist deletes all comments..
« Reply #13 on: December 16, 2004, 06:44:10 PM »
If you are using the latest WPBlacklist (2.8), then you don't need the hack. However, if you have a blank item in your blacklist, you would have to find it and delete it first. And you sholdn't have to update the blacklist from blacklist.txt - simply update it directly from Jay Allen's central list. So where can you download 2.8? From the WPBlacklist page of course :)