Subject: Spam filter
Today's anonymous link posting made me quickly scratch down a simple spam filter plug-in for UNB. It mainly calculates the HTML tags and BBCode tags ratio to the entire posting length and counts the number of links per posting character. If any of these values is too high, the post will be rejected as spam. No further check is done right now, there's still the option to use block words and sum a spam score for each of them or use a URI blocklist like SURBL. Especially for the link density, there's much more restrictive limits for guests than for registered users. Let's see how well it works, maybe I should also add some kind of logging to see when it actually stops a posting. (Currently, the error log will simply contain an entry if something was blocked, but not what exactly and why.)
For this to work, I have added a new plug-in hook post.verifyaccept, you can find information about it on the plug-in development documentation page.
You're free to try spamming in the Playground forum and see how well it works. I'll include the plug-in source code in the next development snapshot of UNB, which will be earlier if anybody wants to see it.
PS: I've just seen that I've uploaded the spam filter with debug output. Maybe not a bad thing for the beginning. Of course it'll be turned off later.
For this to work, I have added a new plug-in hook post.verifyaccept, you can find information about it on the plug-in development documentation page.
You're free to try spamming in the Playground forum and see how well it works. I'll include the plug-in source code in the next development snapshot of UNB, which will be earlier if anybody wants to see it.

PS: I've just seen that I've uploaded the spam filter with debug output. Maybe not a bad thing for the beginning. Of course it'll be turned off later.
♪ ...nanananah, all in all we’re just brilliant thieves, nanananah... ♪♬

Yves
Show profile
Link to this post
Including the long-planned HTTP headers check.