I've already submitted a feature request for the Spam module to have the option of filtering for content submitted in UTF-8 (http://drupal.org/node/126408), but I'm being over-run by a large amount of Chinese language spam being submitted by some Taiwan based spambot, so I need suggestions for a temporary fix.
I have no knowledge of how I can create a custom filter to catch this type of thing, but basically I (and probably several of you who have sites where anonymous comments are desired and allowed) need some way to flag any content submitted in UTF-8 as suspect. No human would do this, but I can see every spammer out there who's using a script that can register itself modifying it to submit their spammy crud in UTF-8. (m4vr1k1n ring a bell?)
So, does anyone know how to construct a custom filter for the module that will catch submissions made in UTF-8? Or, perhaps how to construct an input filter that can have all roles denied? Or any other workaround that might work?
Comments
Everything in Drupal is UTF-8
Err, you're not making much sense. UTF-8 is the encoding that Drupal uses internally. All text on this page is UTF-8 for example (including the english).
These are all characters that can be expressed by UTF-8 without needing escaping: English Français 日本語 Ελληνικά Български Српски Українська Bosanski Brezhoneg Català Česky አማርኛ اردو ئۇيغۇرچه हिन्दी ಕನ್ನಡ मराठी संस्कृतम् தமிழ் മലയാളം ייִדיש 粵語 Հայերեն ...
If you want to catch chinese spam, make a filter that looks for unicode characters in the CJK ranges. Search.module has a ready made regexp available.
--
If you have a problem, please search before posting a question.
Sorry - still new at this
Okay - maybe I wasn't able to be clear in my concerns. I'm still learning about what's what and I thought UTF-8 was the "ampersand pound numbers semicolon" that I've seen used for showing non-ascii characters. Mistake on my part.
Comment spam is being posted in it's unicode equivalents. I did see that the Spam module has a function for creating custom filters. Unfortunately, the requirement that they be "perl compatible regular expressions" means that I (and probably the vast majority of users) have no idea what that means or how to construct one.
So, I guess what I need to know is how I would construct such a filter to look for anything submitted in the format
& # 12362;(had to add the whitespace to prevent it from displaying as it's Chinese equivalent).I don't really suspect that the average human being is going to submit their comments in that format, so anything submitted that way has a better than average possibility of being spam. I need to filter that type of stuff out.
--
"If you've ever owned a dachshund, no explanation is necessary...
If you've never owned a dachshund, no explanation is possible"
(with apologies to St. Thomas Aquinas)