Comment Management and White List

Feb 24, 2010 at 8:53 PM

A couple days ago I noticed spam getting through with rule: white list.  This was because Akismet had approved it as "not spam" 5 times hence adding the spammer to the white list.  I thought, "this is odd, why would I need to automate adding someone to a white list when the spam approval process itself is automated already?"  I couldn't find an option to disable this but had hoped that setting this to zero might turn this feature off... boy was I wrong.  I came in today to find out everyone gets to be on the white list now!  Good times...

Here is what I feel should change:

1. Being able to disable the white.  Personally, I feel the white listing should be entirely manual, white listing people who have had X auto-moderated comments approved just makes no sense to me.

2. The individual filters should also be able to be disabled (mainly because StopForumSpam is a worthless spam filter and I see no reason to devote precious electrons to running it).  I can see there is a checkbox for this but for some reason it is disabled, maybe I've done something wrong.

Feb 25, 2010 at 3:52 AM

Ok it seems the spam filter is still broken altogether.  I submitted a patch for this way back before the 1.6 release, it is a very small but critical bug.  Looking at the code this appear to not have been looked at.

You are basically making it so the last filter wins.  So for example if Akismet thinks something is spam, but StopForumSpam thinks it isn't, if SFS runs second then it isn't spam.  The rule should be that it falls through only if the first one doesn't think it is spam.  Either that or let me disable one or the other spam filters.


Feb 25, 2010 at 6:20 AM

Some of the issues in that work item were addressed.  Specifically, version was checked in to address the verifiable issues at that time.

You're right about fall through.  A better way to handle it would be like how Ruslan has shown in the sample code in this blog post.  It basically does what you suggest -- if the filter determines the comment is spam, it sets Fall Through to false so it stops there.

The Akismet Filter can be disabled on the Extensions tab in the control panel -- although I realize you probably don't want to disable this one.  StopForumSpam doesn't have the "extension" attribute, so it's not listed on the Extensions tab.  If you delete StopForumSpam.cs from App_Code\Extensions, it will no longer run.  It looks like even if you delete it, StopForumSpam will still appear in the Custom Filters list on the comments configuration page.  But I believe that is just data for "reporting purposes".  Obviously if you delete StopForumSpam.cs, it will no longer be used.

Mar 1, 2010 at 11:08 PM

There is nothing specifically wrong with the fall through, the logic is correct for the StopForumSpam (i.e., fallthrough is set to false if spam is detected, true otherwise).  It is just Akismet's fallthrough that is always true.  So if the order of the filters is wrong it will break.