socialism is not spam
|Reported by:||mcargo||Owned by:|
Lots of WordPress sites I visit earn FYWP whenever a comment is
tagged a spam because it contains the word 'socialism', which has
the 'cialis' in it as a substring.
The relevant code is line 72 in
$pattern = "#$word#i";
In the code that follows, $pattern will match any of the search
strings when it is a case-insensitive substring of one of them.
Since preg_match is being used, this problem could be solved by
requiring that the match be at word boundaries, as
$pattern = "#\<$word\>#i";
(Of course, this means that things like 'IamSureYoudReallyLikeCialis' would
make it through.)
I'm sure there are other, more efficient, ways to fix this.
Change History (10)
- Keywords dev-feedback removed
- Milestone Awaiting Review deleted
- Resolution set to wontfix
- Status changed from new to closed