Live data from Hacker News

The naughty username checking system used by Twitch

ghostbin.com

301–310 of 348 posts

Re: The naughty username checking system used by Twitch

#301
post #93

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…

> to make sure random base64 didn't contain profanity I would have said "why bother" until this happened to us. A customer rang us up in a fury because some demo/ random data that we generated happened to have the word "penis" in it. They were convinced we must have put it there because we thought he was a cock. It was very difficult to defuse the situation.

> I would have said "why bother" until this happened to us.

Aah, the good ole "one customer is unhappy, let's waste a week of time on this" approach to IT management. Takes guts to tell such customers "here's your refund, now piss off", but it is the right thing to do.

Re: The naughty username checking system used by Twitch

#302
post #93

Earlier quoted context omitted.

> to make sure random base64 didn't contain profanity I would have said "why bother" until this happened to us. A customer rang us up in a fury because some demo/ random data that we generated happened to have the word "penis" in it. They were convinced we must have put it there because we thought he was a cock. It was very difficult to defuse the situation.

> I would have said "why bother" until this happened to us. Aah, the good ole "one customer is unhappy, let's waste a week of time on this" approach to IT management. Takes guts to tell such customers "here's your refund, now piss off", but it is the right thing to do.

Not just that, also “let’s all stop having fun”. (Not about this case, but

Re: The naughty username checking system used by Twitch

#303
post #83
post #74

So what is a good practice for this kind of thing? I’ve got an app where users create a display name. Is there a legit service I can use or some actual well tested library that can help me? I’m using node and Go so either languages.

Give me a few weeks

?

Are you making such a service?

Re: The naughty username checking system used by Twitch

#304
post #264

Earlier quoted context omitted.

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…

Hashids does this (avoid bad words) if anyone is curious to see an implementation > algorithm tries to avoid generating most common English curse words by never placing the following letters (and their uppercase equivalents) next to each other: > c, s, f, h, u, i, t https://hashids.org/#how-does-it-work E: ah it was already mentioned later on, hadn't got that deep into the comments yet!

Oh yes, there's plenty of ways to avoid curse words, but each one has a cost, and if the system needs to generate ids very quickly, any scheme that works too hard could be a bottleneck. The naive way of just randomly throwing together letters of the alphabet will eventually generate a forbidden word. Any steps taken to reduce the probability should understand the time/space tradeoffs.

Re: The naughty username checking system used by Twitch

#305
post #163

Earlier quoted context omitted.

It's visually equivalent to a u, so without vowels it's still possible to get "fvck", for example.

The Romans wovld approve of svch a scheme.

How would the Romans have pronounced 'approve', though?

Re: The naughty username checking system used by Twitch

#306
Potential solution for this;

- Have people choose any username they want

- Have an “after the fact” human review system on usernames

- If the username is inappropriate, change it to “smallsausage[0-9]+” without the option of reverting it back or requesting a new user on the same e-mail address.

Re: The naughty username checking system used by Twitch

#307

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…

>the first one that popped up during the demo was a big ole F bomb And this, ladies and gentlemen, is what it would show BEFORE the filter... but after (runs the code again, and prays it works) ... NO PROFANITY!

To be clear, this was the list of "things we blocked".

"Had we not done this work, that link would have been sent out to one of our users." was very well received.

Re: The naughty username checking system used by Twitch

#308
post #113

Earlier quoted context omitted.

You are so hungry to start something here, you've posted this exact same comment 3 times. Wouldn't you have more fun on 4chan?

Three different threads, all relevant. 4chan is where this was leaked/found out.

The flagged comment:

Actually in Twitch's codebase:

  OR replace($1,'_','') SIMILAR TO '%(hate|kill|keel|hang|burn|gasthe)%(black|bl4ck|black|jew|trans|gay|african|afrikan|minorit|asian|nig|n1g)%'
Twitch: "Hatred against Blacks, Jews, Asians, trans? BANNED! Hatred against Whites? I'LL ALLOW IT!"

Re: The naughty username checking system used by Twitch

#309
post #252
post #204

Earlier quoted context omitted.

>I suspect that this balance is what we call "good manners" or "politeness". Or "empathy". And I think on an interpersonal level this is easy. You can't force anyone else to be responsible for how you feel about their words, that is true. But if you say to a colleague or a friend that "when you call me X, that makes me feel bad, could you call me Y instead?". Depending on the friend they might want to understand why…

> "when you call me X, that makes me feel bad, could you call me Y instead?" There are absolutely people who will use this as a reason to put X on a billboard.

People, yes. Friends, no.
Post reply on HN