in reply to Don't even bother. (was Re: dirty word filter module?)
in thread dirty word filter module?

Behold, the dragonchild stirs and breathes fire, burning away the misty clouds of ignorance from mine eyes.

I am humbled at the agility of the human parser which so easily recognizes words such as "asohsle".

Verily, the darkness is great before me, yet there is light in offing and I see the way to win small battles.

There are three regions which I must protect:
1 - Usernames
2 - Message Board postings
3 - User writeups

The first is perhaps the easiest. It will be limited to [\w-_]{6,20}. This reduces the possibilities. Perhaps a three-level process; first substitute out all hyphens and underscores, then m/a+[s5ho0l1]{4,}[e3]+/i, if true try to match a more detailed list of regexes. Also, in this case, I can be as tough as I like without having to explain why---I can simply say, "The password you chose is in use" for anything iffy.

The next two are more complex, however, they are not time sensitive. Once a user makes a posts a message to the board or a writeup, I can mark it viewable only by the user and admins until it can be parsed by a more determined script. If that script determines there is anything troublesome, it can notify an admin to view and approve/disapprove/edit it before making it available or deleting it. Further, I can allow users to flag such items if they are offensive, again to be reviewed by an admin. This process should handle the 'two chicken breasts' for everyone except any fowl who may be on the site (I discriminate against no lifeform). As for the 'pus-dripping son of a motherless flea-bitten camel', I am sure the admins will make the appropriate reprimands once it is brought to their attention. The important thing is to prevent young eyes and their parents from inadvertantly seeing anything that can be avoided with reasonable caution.

Again, I give thanks for your gift of enlightenment. I shall be stronger knowing better the foe I face.

Yea, though I tilt at windmills, I am sworn to the quest. Come Sancho, the contest begins...


"Peace, love, and Perl...well, okay, mostly just Perl!" --me

Apprentice
  • Comment on Re: Don't even bother. (was Re: dirty word filter module?)

Replies are listed 'Best First'.
Re: Re: Don't even bother. (was Re: dirty word filter module?)
by dragonchild (Archbishop) on Apr 01, 2004 at 02:59 UTC
    For usernames ... yes, it's not hard because the list of choices is much reduced, especially if they are case-insensitive. You can actually pre-register all the offensive ones and assert eminent domain over any new ones. For example, "Mohammed", "PapaDocDuvalier", or "Abu_Nidal" are offensive only in certain circles. Unless those circles intersect yours, you should be ok.

    It sounds like your site is moderated to some degree. Remember - if your site is successful, one of two situations happens:

    1. the less it can be moderated due to volume
    2. the more moderators you need to keep up with that volume

    I'm not saying anything as to the decision to be moderated or not. Perlmonks is moderated, and has hundreds of moderators, to boot. But, even PM doesn't have automated moderation. A human has to initiate everything.

    PM deals with offensive postings to the boards by allowing any post, then having automated reaping if the post is not approved and the reputation drops to -5 (or something like that). The posts are viewable, though, for a small amount of time. And, this is with the lack of accountability of the Anonymous Monk.

    User bios are given more latitude here, but the user has to have proven themselves (through the gaining of XP) for some time before gaining all the features. And, still there is community policing.

    Unless you absolutely cannot have a single posting be viewable to whomever it might offend (for whatever legal reasons), community policing is usually enough.

    ------
    We are the carpenters and bricklayers of the Information Age.

    Then there are Damian modules.... *sigh* ... that's not about being less-lazy -- that's about being on some really good drugs -- you know, there is no spoon. - flyingmoose