Live data from Hacker News

The naughty username checking system used by Twitch

ghostbin.com

131–140 of 348 posts

Re: The naughty username checking system used by Twitch

#131

Earlier quoted context omitted.

Gov.uk did this. The code WNKR still ended up on Reddit yesterday.

That's amusing, but I think it also highlights the effectiveness of the strategy. WNKR is excusable and defensible. WANK would not be. Edit: But I'll concede that when your outputs are only four characters long and end users will actively interact with them (write them down, type them again later, etc.), additional safeguards might be appropriate. Or simply omit all alphas and use only numerics.

> Or simply omit all alphas and use only numerics.

You're still not out of the park with numerics - people with 1313 or 6660 or 4444 or something will complain a lot. The possibility of a 666 in some new biometric government IDs in my country rose a massive stink from church...

Re: The naughty username checking system used by Twitch

#132
post #18

Whats this one about? CREATE OR REPLACE FUNCTION is_blasphemy (VARCHAR) RETURNS BOOLEAN STABLE AS $$ SELECT replace($1,'_','') SIMILAR TO '%p(o|0)rc(o|0)di(o|0)%' OR replace($1,'_','') SIMILAR TO '%p(o|0)rc(o|0)mad(o|0)nna%' $$ LANGUAGE SQL;

is not even remotely complete, in italy we have two regions dedicated to the creation of blasphemies so advanced in ingenuity that two telephone books in regexp would not be enough to stop them

Re: The naughty username checking system used by Twitch

#133
post #61

Why not just convert numbers like 1 to i or l then check with a manually created bad word list? Would regex be really much faster than checking it against a 1000 or more bad word list? Also bad word list can easily get updated by moderators as well, I really can’t understand the logic behind using so much regex.

A bad words list is a regex. ;-) But note: for the most part this isn't using regexs, and to the extent it does, it seems largely intended to make the maintainers' lives easier by avoiding having to represent (and maintain) all the permutations they are trying to match for. What's sad though is that they're doing many, many passes through the pattern matcher, rather than just building a single big DFA from the whole…

RegEx => DFA conversation can lead to exponential growth in number of states... don't know how big it'd be in this case.

Re: The naughty username checking system used by Twitch

#134

Earlier quoted context omitted.

We did a similar thing at Groupon after a customer’s coupon code contained an F bomb.

I removed the letter U from a random password generator for a Customer's app after a password was generated containing the "C-word".

Both of you are allowed to swear on the internet

Re: The naughty username checking system used by Twitch

#136

Earlier quoted context omitted.

When it comes to censoring randomly generated strings, I like simply to omit vowels from the alphabet. Usually I'll omit some of the more obvious lookalikes too, e.g. [1 0 v]. It's a simple solution. Sure, it is still possible for something to slip through that looks similar to something bad. But the potential to strongly offend is greatly reduced.

Yeah there was an article I read a while back about a company looking to prevent the use of 'naughty' words in randomly-generated strings used as event IDs. Apparently someone with some pull had seen a message with an offensive word. Some management committee spent a long time trying to figure out how to solve the problem including proposing keeping a list of bad words, and then worrying about what should be in it an…

> didn't mention the use of v or l33t-speak

What is 'v' in this context?

Edit: thanks for the answers. It makes sense now.

Re: The naughty username checking system used by Twitch

#137
post #57

We had to do this for a link shortening system (to make sure random base64 didn't contain profanity). It was a pretty fun problem. Not just the implementation, but doing the math to make sure it didn't make our shortened links easily enumerable. The implementation wasn't too bad, but we set up logging initially to spit out any random strings it decided to block. I demo'd this in front of the whole company and live ta…

It’s so laughable that we care about whether a generated string contains some temporally relevant profanity. We truly are still barbarians, and will be viewed as such by history.

It's not that stupid. People will send the shortened link to other people, who might not understand that the string was randomly generated.

Re: The naughty username checking system used by Twitch

#139
post #62

Earlier quoted context omitted.

They figured that out on Ellis Island so yeah. Soundex.

Ellis Island is the one with that big green statue. What it has in common with Soundex?

I’m not saying that there aren’t big green statues on Ellis Island, but the really really big green one is on the next island over.

Re: The naughty username checking system used by Twitch

#140
post #71

> LIKE '%aggin%' Looks like "Baggins" is banned. Poor Bilbo...

I feel like you could make an interesting game out of this. Given these rules, find the best "false negative," a realistic and inoffensive, but banned username. My best so far are "brownie_gurl" and "Megasthenes."
Post reply on HN