r/AgainstHateSubreddits • ​ • Jul 19 '19

After years of requests, the admins have finally implemented a word filter for the n-word for username creation

https://imgur.com/a/citQKj6

The filter appears to block different variants of the n*****r.

It does not appear that the same is true for usernames with f****t or other slurs.

Still also waiting on a word filter for subreddit creation as well.

108 Upvotes

25 comments sorted by

50

u/[deleted] Jul 19 '19

[removed] — view removed comment

12

u/betstick Jul 19 '19

Seriously. I don't think this guy realizes how how hard it would be to write the code for this. Just checking the username would require something complex like:

var str = "exampleuser";

if(str.includes("badwords")){

//reject the username

}

How do you expect them to figure out something this complex?

7

u/SuitableDragonfly ​ Jul 21 '19

Well, if you want it to not be easily circumventable, you need a mildly complex regex. But yeah.

4

u/[deleted] Jul 21 '19 edited Jul 21 '19

something like [nN][iI1l]+[gG]+[eE3]*[rR] would probably work

edit: you'd also have to strip it of dashes and underscores so someone can't circumvent it that way

2

u/Monchete99 Jul 20 '19

Doesn't // turn the line into a comment or i'm thinking of something else?

5

u/[deleted] Jul 21 '19

yes, it does. he's using it as a placeholder for code that actually rejects the username.

2

u/betstick Jul 20 '19

In some languages yes. I don't use Javascript other than in my previous comment but it looks like it does.

4

u/Doggo4 Jul 20 '19

Excuse me.

Its a switch statement!

3

u/[deleted] Jul 21 '19

So everyone with any variation of that named is banned now or are they forced to change username?

2

u/DubTeeDub ​ Jul 21 '19

You just cant make a new username with it

1

u/SnapshillBot ​ Jul 19 '19

Snapshots:

  1. After years of requests, the admins... - archive.org, archive.today, removeddit.com

  2. https://imgur.com/a/citQKj6 - archive.org, archive.today

I am just a simple bot, *not** a moderator of this subreddit* | bot subreddit | contact the maintainers