I run several sites off Mediawiki, and the spam problem has been getting progressively worse recently.
Making the wiki ‘registered users only can edit’ helps a bit, but most of the spambots can get around that now. In fact most seem to get around the ‘easy rollback’ of recently registered users changes by creating their spamming accounts quite some time before actually using them to spam.
Most of the spam I get is of a particularly useless kind. It’s wrapped in a div set with a style of “overflow:auto;height:1px;”, which makes it invisible on the page. However, as most recent releases of MediaWiki also default to adding a “nofollow” to external links, this means that the spam links get no googlejuice either.
Although useless to the spammer, it’s highly irritating to wiki admins. However, there is a particularly simple fix.
In your LocalSettings.php, just add one line:
$wgSpamRegex="/overflow\s*:\s*auto/i";
Now any attempt to include text that matches in an edit causes the edit to fail.
I’m sure this is documented somewhere, but I only came across it on one of the mailing lists. So I’m offering it out here in the hope that some other plagued mediawiki admin can cut back their admin burden too.
Thanks for this tip. I will add to my wikis and see if it helps.
Are you getting good result from this method?
Hi, I just wanted to drop you a note that this was incredibly useful to me just now – the mediawiki I was just tasked with admin’ing was having a flux of spam of exactly the sort you describe, and I think this edit will take care of it. Thanks!
Thank you!!
Before last week, they would attack, disappear, I would clean it, and we’d repeat a month later.
This week they were very persistent, hitting the same pages over and over.
Thanks for the salvation!
Ed
Thanks you, this really saved my day. Those suckers really ruined my newly created wiki.
Pingback: ChocoFlop - Live! Image and Photo Editing for Mac OS X » Blog Archive » Bloody spammers
The fix is working perfectly, there hasn’t been a single piece of spam since. I’ve also passed it along to a few other wiki admins. Thank you.
Thank you so much. It was a great help to end this nuisance.
Pingback: Rage on Omnipotent » Blog Archive » Wiki anti-spam
Please see http://wiki.evernex.com/index.php?title=Blocking_Spam_in_Mediawiki for a HOWTO on blocking spam in MediaWiki.
I keep it updated fairly often and run a fairly active small wiki on which I’ve successfully been able to go back to an open edit (no account required) policy. Successful spam attacks in the last 6 months: 0.