The fifth in a series of posts about the finer points of profanity filtering...
One of the more sophisticated attacks that users employ against profanity filters involves inserting separators, such as spaces or periods, between the other characters of a word so that the word can still easily be read.
The following examples illustrate how the simple process of inserting additional non-alphabetic characters between the characters of the word does not interfere with the reader's ability to identify the word correctly:
- s m u r f
- s....m u r....f
- I'm going to smash it (false positive!)
It might be difficult to see the profanity in #4, but if you look at the last 4 characters on their own, you'll see it.
Filters that do not intelligently handle separators will incorrectly identify this sentence as inflammatory and generate a false positive. Therefore, the filter must understand how word separators behave within sentences and how they can be used as an attack.
Separators can also be extremely complex. In some cases, other alphabetic characters can be used as separates without impacting the ability of the reader to identify the word:
- She Might be Under a RainFall
CleanSpeak's Profanity Filter is capable of handling separators that use common punctuation marks such as periods, semi-colons and asterisks. It is also capable of handling spaces without introducing false-positives. It understands that word boundaries are used correctly more often than not, but that spaces can still be used to attack the filter.