r/badcode • • Oct 06 '21

sql So umm this is from Twitch source code leak . NSFW

Post image
2.9k Upvotes

400 comments sorted by

1.4k

u/how_do_i_read Oct 06 '21

Why use blacklist.txt when you can maintain a giant query instead.

985

u/netinept Oct 06 '21

Because “blacklist” is now considered racially insensitive at Amazon.

I wish I were joking.

620

u/ThePsion5 Oct 06 '21

So, uh, just rename it banlist.txt?

378

u/hoyohoyo9 Oct 06 '21

I see an "anl" in there, you tryin to warp childrens' minds bro?

136

u/Beefster09 Oct 06 '21

Good old scunthorpe problem.

45

u/bunana_boy Oct 07 '21

S****horpe problem

14

u/jason_the_human2101 Oct 07 '21

Must be awkward to line in p****tone

41

u/aplawson7707 Oct 07 '21

Ah yes, because Thor is a copyrighted property, right? Shame, so unfortunate. /s

→ More replies (2)
→ More replies (3)

38

u/Osakawaa Oct 06 '21

No. It is now raceneutrallist.txt

→ More replies (1)
→ More replies (9)

68

u/rexpup Oct 07 '21 edited Oct 08 '21

We use "allowlist" and "denylist" at Epic (not Epic Games)

38

u/B0dona Oct 07 '21

nonolist :-)

14

u/[deleted] Oct 07 '21

And yesyeslist ?

6

u/killersquirel11 Oct 08 '21

Naughtylist and nicelist

126

u/aaaaaaadjsf Oct 06 '21

I mean blocklist can just be used anyway and makes just as much sense

47

u/frien6lyGhost Oct 07 '21

actually, more sense. while blacklist derives meaning from historical usage, blocklist derives more meaning from the actual word. I would bet more people would understand what blocklist is than blacklist if they saw the word alone. holding onto a word because its meaning is derived historically is silly, since by changing it you would eventually have a point in time where the new word has as much historical meaning. and for people to be so concerned over the evolution of language within software development is kinda hilarious

→ More replies (1)

73

u/netinept Oct 06 '21

“blocklist” and “allowlist” are fine, it’s just a petty change for something that didn’t need to change.

The origins for “blacklist” is not racist, and it’s been historically been used in software, just like “master” and “slave”. There’s nothing inherently wrong with the words themselves. Just because someone happened to be offended by them isn’t a fault of the word, it’s a fault of the person being offended.

I can say that as a man, I’m offended by the term “dog house” and it meaning something like”penalty box” or “timeout”, but that doesn’t mean the “dog house” is calling me a “dog”, or that it is a bad phrase that needs to be obliterated from our language.

→ More replies (51)

68

u/signedchar Oct 06 '21

someone better cancel mojang for using whitelist.json then

→ More replies (2)

21

u/[deleted] Oct 06 '21

Serious question, why? As a person who's not from the US (I'm from Venezuela) I think I might be missing context on this

49

u/GOKOP Oct 06 '21

Because to Americans everything is about race

→ More replies (7)

5

u/LazyOrangeBanana Oct 14 '21

Because some idiot got offended and claimed that it's racist.

Not joking. There was a huge ass Drama about it and certain virtue signalling companies decided to implement it.

It's admittedly irrelevant and not much to change, but still. The reason behind it is absolutely ridiculous.

72

u/[deleted] Oct 06 '21

Because it implies that "black[list] == bad" and "white[list] == good", and some woke people wish to erase these contextual meanings of the words "black" and "white", because they think by altering language, they will make people less racist.

I think removing 'sensitive words' from existence will just make racism harder to describe, and therefore harder to fight, but that's just my opinion I guess.

61

u/6138 Oct 06 '21

Yep. The same people that want to ban "Latino" and "Latina", and replace it with "latinx". They are focusing on redefining words that literally noone is offended by instead of dealing with the actual issues of racism and hatred.

It's like painting the front door when your house is on fire.

14

u/[deleted] Oct 07 '21

My honest view is that Latinx is a American white progressive thing. As a Latino, I just don't identify myself with that word and many of us do not as well.

Good gender neutral alternatives: Hispanic or Latin American

16

u/[deleted] Oct 07 '21

Spanish isn't a gender neutral language, which is what makes this whole "Latinx" thing so ridiculous.

→ More replies (1)
→ More replies (4)

36

u/Magnus_Tesshu Oct 06 '21

Just had someone in /r/ProgrammerHumor tell me that renaming master to main gives marginalized communities a voice.

what

→ More replies (5)
→ More replies (22)

38

u/juppel Oct 06 '21

Just like the master branch on GitHub

41

u/[deleted] Oct 06 '21

That's even stupider. Are we going to act like the word master doesn't exist now?

53

u/Beefster09 Oct 06 '21

I'm working to main my trade.

I bought a piece of art. It was a mainpiece.

Have you seen the remained version of Star Wars?

There, I fixed language.

→ More replies (2)
→ More replies (2)

21

u/crozone Oct 07 '21

Because it implies that "black[list] == bad" and "white[list] == good"

This is an inherent part of human language. See Yin/Yang, concepts of lightness and darkness ("see the light", "they had a dark side", etc). It has probably been an inherent part of human language since humans were first afraid of the dark - the presence of light is positive, the absence of light is negative.

The issue isn't the term whitelist and blacklist, it's that the concepts of light and dark are being intertwined with skin color and race at all. The fact that a word cannot contain the word "black" and "white" without the automatic assumption that it explicitly refers to skin color is sad and absurd.

→ More replies (5)

10

u/Drakethos Oct 07 '21

New speak my friend. Less words makes it hard to commit thought crimes.

→ More replies (6)

11

u/[deleted] Oct 07 '21 edited Oct 08 '21

Because rich, lily-white tech companies need a way to appear conscientious and justify their power without granting real concessions like labor unions or lucrative contracts with a white supremacist prison system, so they focus on free, symbolic things like words rather than say, educating and hiring directly from black communities.

3

u/how_do_i_read Oct 07 '21

Exactly.

Doing zero-impact things with high press coverage is cheaper than actually reviewing and changing internal processes.

It's like the paper straws: "Look, we did something!! Also, stop looking at the real problems, okay?"

→ More replies (5)

11

u/ahlgun Oct 06 '21

Same goes for "Blackbox" lmao

14

u/[deleted] Oct 06 '21 edited Oct 06 '21

Let it be BlockBox going forward, even if the color of that physical box is African American.

8

u/lachlanhunt Oct 07 '21

Some people find whitelist and blacklist offensive because of the good and bad connotations they carry. From that, some people chose to make a connection to racism, and they want to distance everyone from the idea that white is good and black is bad.

But terms like blackbox don't have the same negative connotation.

8

u/crozone Oct 07 '21 edited Oct 07 '21

Some people find whitelist and blacklist offensive because of the good and bad connotations they carry. From that, some people chose to make a connection to racism, and they want to distance everyone from the idea that white is good and black is bad.

This is utterly ridiculous.

Better cancel Yin and Yang too, or basically any and all thousands of year old concepts in our language that refers to the presence of light as good, and the absence of light as bad or scary. It has been an inherent part of language since humans were first afraid of the dark. I guess people who are afraid of the dark are secretly racist? What about people who use terms like "see the light", "look on the bright side", "they had a darkside", "I'm going through a dark time", etc, etc. Not to mention the many, many equivalents in non-English languages, including literal translations for "blacklist".

Or maybe we can stop listening to every random person that has a kneejerk reaction to a word because it heuristically triggers some very surface level and misguided connections. Maybe we should be focused on linguistically disconnecting skin colour and race from the actual concepts of lightness and darkness entirely, otherwise we're not actually going to accomplish anything, we're just going to be playing word whack-a-mole sporadically depending on whatever gets attention on Twitter that week.

→ More replies (8)

2

u/myevillaugh C# Oct 07 '21

Blackbox doesn't make sense. Sure, you can't see into a box if it's black, but you can't see through a box if it's painted white either.

→ More replies (1)

4

u/myevillaugh C# Oct 07 '21

That's true at all sorts of companies. Blacklist isn't a descriptive word. There are better names. I don't know why anyone cares if the term goes away.

2

u/JSTLF Feb 18 '22

Because people want to be outraged at something. It's kind of ironic that they're the same kinds of people who criticise "liberal sjw outrage culture" and then make up and get mad at the most inane things.

1

u/SLCH000 Oct 07 '21

Everyone uses it anyways besides ceos or public figures anyways.

1

u/[deleted] Oct 07 '21

So is "whitelist" lol.

1

u/spclzd Oct 07 '21

I love and hate this comment.

→ More replies (1)

8

u/recycle4science Oct 07 '21

Premature optimization maybe?

6

u/[deleted] Oct 07 '21 edited Oct 07 '21

Or a database table with some UI functionality to add usernames. That way admins can easily add usernames themselves without having to go into the software.

Then the query can just be

if exists (select * from banned_usernames bu where @username like '%' + bu.username + '%')

Or is the txt document better? I'm seriously asking.

2

u/how_do_i_read Oct 07 '21

As always... that's entirely use-case depended.

If admins should have an easy way of changing the list and someone put that into your admin-UI, the banned_usernames table is great.

If you don't have that in your UI and someone would have to connect to the SQL-server and add entries by hand... not so much. Here, I'd say, a text file of banned words somewhere in a config-folder would be a better way.

3

u/WarrenBuffetsAnalyst Oct 07 '21

As a data science major can confirm this was my first semester assignment solution

365

u/kixass456 Oct 06 '21

That’s one way of blocking a user.

148

u/Alex_Sherby Oct 06 '21

OR blocking a u.s.e.r

70

u/[deleted] Oct 06 '21

But not a u.53r, because they didn’t think of that one

346

u/[deleted] Oct 06 '21

Can you imagine being a programmer for twitch, creating a pull request for this code and it actually getting approved?

276

u/RichCorinthian Oct 06 '21

Except it wasn’t a single pull request, I bet. It was 200. It started as a simple emergency stopgap solution with three terrible names, and a dev saying “we’ll come up with a better solution soon.” The broken window principle in action.

72

u/tiny_the_destroyer Oct 07 '21

Nothing's more permanent than a temporary solution.

7

u/Lost4468 Oct 07 '21

Oh that's terrible. I thought maybe this was auto generated, in which case it's not that bad. But they actually went and typed these names in? That's insane...

1

u/isinned Mar 23 '22

Probably zero more likely. I bet this file is from the early startup days. Would have been a hectic environment. No code reviews, everything is super urgent, you have to deal with everything, and you're sleep deprived. Super common for early stage startups experiencing quick growth. Stuff like this isn't bad given the circumstances, debt that made them go fast plus it's easy to clean up later if it ever becomes an issue.

1

u/TheTwelveYearOld Jan 06 '23

I know this is necroposting, but when I googled Broken Window Principle, it shows results for Broken Window Theory. Is that what you meant?

103

u/1SweetChuck Oct 06 '21

I can imagine someone in management, forcing some management level senior dev to fix the racist username problem as quickly as possible and the dev just doing something quick and pushing it through the PR themselves and merging it into main and deploying it. I’ve seen this happen at my company.

48

u/bobdarobber Oct 06 '21

It would legit be faster to do it the right way

→ More replies (3)

6

u/IAmTheSysGen Oct 06 '21

A for loop and regex would be much faster to implement.

The proper way is to use an O(log(n)) multiple search algo but like just a blocklist is enough

8

u/[deleted] Oct 07 '21

I imagine this started with like 10 lines and they just kept adding to it. Now it got to a point where redoing it is just not worth it.

6

u/IAmTheSysGen Oct 07 '21 edited Oct 07 '21

Man, it's pretty easy to read from a file each line in a for loop.

You can also easily refactor this code. Copy the lines to a banlist.txt file.

Do a search and replace "OR ue.login LIKE " with ""

Do a simple

file = open("banlist.txt")
for (line in file):
    if( re.match( ue.login, line )):
        rejectUsername()

Or if you want to be as efficient as the OP

file = open("banlist.txt")
if (re.match("|".join(file.readlines()), ue.login)):
    rejectUsername()

It should take at most 15 minutes to refactor the code above into the proper way (tm).

→ More replies (2)
→ More replies (1)

2

u/[deleted] Oct 07 '21

You could just put the banned names in a hashset and look them up in O(1)

→ More replies (2)
→ More replies (2)

9

u/lgylym Oct 07 '21

Then you will have a good performance review for committing enough lines of code. And I also wish I’m joking.

298

u/[deleted] Oct 06 '21

Eyes wallow com Ahahahahahah

98

u/[deleted] Oct 06 '21

you received a $5000 donation from ice_wallow_come

13

u/SquattingWalrus Oct 06 '21

That’s a good one

174

u/bugqualia Oct 06 '21

Where did you get this from?

422

u/DeepInTheAbyss- Oct 06 '21

Twitch saw Facebook and said "hold my hot tub". Apparently their whole source code and data got leaked

58

u/bugqualia Oct 06 '21

Oof

58

u/emax-gomax Oct 06 '21

Search for it on 4chan if you're interested. There's a magnet link going round for all of it. There's 125 GB so be prepared for a long download.

36

u/teabolaisacool Oct 07 '21

And apparently the leaker said that’s only part ONE

→ More replies (2)

72

u/thanatica Oct 06 '21

It's not such a bad idea to opensource Twitch. Who knows maybe their code might get slightly more efficient if people with a hint of sanity in their skulls, can work on it.

Unfortunately, torrents is not the best place to host an opensource streaming platform.

34

u/Syscrush Oct 06 '21

I'm just here for "hold my hot tub".

5

u/curvedbymykind Oct 06 '21

Did FB source code get leaked too? Anyone got the link to either?

0

u/[deleted] Oct 07 '21

[deleted]

9

u/Incorrect_Oymoron Oct 07 '21

Didn't they screw up their BGP configs?

8

u/[deleted] Oct 07 '21 edited Oct 11 '24

[removed] — view removed comment

7

u/pronuntiator Oct 07 '21

Any code can be leaked by a criminal employee. I don't think Facebook has NSA style working conditions where you can't use removable media or the Internet on your machine.

0

u/[deleted] Oct 07 '21

[deleted]

1

u/sorenkair Oct 26 '21

Could someone actually create a Twitch competitor using their source code? Or any possible interesting 3rd party apps?

1

u/Maks244 Oct 07 '21

4chan twitch leak

44

u/koebelin Oct 06 '21

This started with just a few and became a habit.

98

u/XxClubPenguinGamerxX Oct 06 '21

is this seriously the best way to ban usernames? just a balcklist filled with names that are banned?

29

u/wampastompah Oct 06 '21

not names, but patterns. yeah. it's what basically any system uses. there can also be an automated layer that if a name gets enough reports, it'll be banned, and then sent to see what patterns in it should be added to the blacklist.

6

u/XxClubPenguinGamerxX Oct 06 '21

ok yeah that does sound much better

6

u/Isvara Oct 06 '21

just a balcklist

More like a baulklist.

4

u/inre_dan Oct 07 '21

I'd keep a short file of the base words and have a function that extends it with alternate spellings at runtime. And I'd iterate through the words in some sort of data structure, not have identical switch cases for each one.

1

u/_kolpa_ Oct 07 '21

To extend that approach, I think you could also run an edit-distance algorithm on the base words to flag their closest alternatives.

3

u/Superpickle18 Oct 07 '21

a better way would be to ban phonetically.

2

u/Nick433333 Oct 07 '21

Blacklists are racist now.

11

u/Franks2000inchTV Oct 07 '21

The use of the term black to mean bad isnt racist in itself, but is part of a pattern that reinforces structural biases that have been shown time and again to lead to disparate financial, social and even medical outcomes for people of colour.

Techbros are all about believing science, unless it challenges their beliefs about racial justice.

→ More replies (1)

112

u/[deleted] Oct 06 '21

[removed] — view removed comment

62

u/XxClubPenguinGamerxX Oct 06 '21

It was posted here because it was done in sql and the query itself is bad but im guessing but even if you use a text file or change the query, having a database filled with blacklisted names cant be the best solution.

33

u/GeorgeDir Oct 06 '21

The First problem about this is that if you need to edit the list you need to change the query

If you want to keep a black list of words that's not a bad thing

This approach is also weak if you consider internationalization (you may want to ban words from other languages too)

13

u/Bohne1994 Oct 06 '21

Hurensohn is a german word. So they ban words from other languages already

5

u/TigreDeLosLlanos Oct 07 '21

you may want to ban words from other languages too

If it's somewhat like reddit, they don't care about other languages, not even slurs or hate speech.

31

u/Knuffya Oct 06 '21

what the fuck is this bullshit code

24

u/IntelHDGraphics Oct 06 '21

Twitch leaked source code

17

u/Serylt Oct 07 '21

Now you know why they kept it hidden.

178

u/recycle4science Oct 06 '21

Oh MySQL.

27

u/Isvara Oct 06 '21

How do you know?

46

u/notPlancha Oct 06 '21

It's SQL for sure, idk if it's mysql

34

u/DrecDroid Oct 07 '21 edited Oct 07 '21

OurSQL

6

u/_justpassingby_ Oct 07 '21

You SQL, I SQL, we all SQL for Ice Swallow Come.

4

u/recycle4science Oct 07 '21

Tbh, I'm just assuming other DBMSs would have a better way to do this.

7

u/laundmo Oct 07 '21

even mysql has a better way of doing this.

6

u/SpiderFnJerusalem Oct 07 '21

Any relational DB can do better than this.

7

u/cybercuzco Oct 07 '21 edited Oct 07 '21

Well it is but they don’t know how to use it very well.

https://www.mysqltutorial.org/mysql-basics/mysql-in/

Select username from users where username in (select username from blacklist)

18

u/genikus Oct 07 '21

They have wildcards in there though. IN is not the same as LIKE. Similar problem: https://stackoverflow.com/questions/1127088/mysql-like-in

20

u/[deleted] Oct 06 '21

They devs just didn't wanted to deal with all the confusing JOIN statements. It works after all..

1

u/Classic_Audience6027 Oct 07 '21

If it works don’t touch it 😝

30

u/[deleted] Oct 06 '21

does anyone know where i could get my hands on the twitch source code?

29

u/GandelXIV Oct 06 '21

4chan

26

u/[deleted] Oct 06 '21

of course

47

u/KlaireOverwood Oct 06 '21

How else would you do it in SQL?

206

u/AeroSysMZ Oct 06 '21

Not do it in SQL but in the Business Layer above

51

u/[deleted] Oct 06 '21

For real, how does this check even reach the database

61

u/AlexAegis Oct 06 '21

George runs it on every Tuesday if he's in office.

22

u/ebrius Oct 06 '21

Nah, it's setup to run as a cron job on his desktop, he just forgets to leave it on most nights

14

u/douglasg14b Oct 07 '21

in the Business Layer above

See, that's where you're wrong. No need for a business layer above if the database IS the business layer. Just throw it all in procs and you now have something only a very small handful of people are able to work on or debug.

internal screaming intensifies

7

u/TigreDeLosLlanos Oct 07 '21

No need for a business layer above if the database IS the business layer.

That's what it was originally intended when making SQL, but it's so shitty that everyone ended using it as a data storage manager exclusively.

→ More replies (1)
→ More replies (1)

8

u/michaelh115 Oct 06 '21

I assume this allows them to add new rules and retroactivly ban/clean up existing accounts

2

u/lestofante Oct 07 '21

but then you need to check only the new insertions rather than the whole list everytime. As someone pointed out, you can also use a table that contain all those pattern to check (but may need non-standard sql)

5

u/samsop Oct 07 '21

I have a colleague who does everything in SQL and hardly processes any of the data in any other layer. Everything is just shoved straight into a huge string variable that takes shape based on user input. It makes taking over any of his work extremely cumbersome

92

u/nagesagi Oct 06 '21 edited Oct 06 '21

Table of banned phrases and do a single query against the table. Adding an entry is easier than code change.

If the list is <10,000 entries, would instead cache the entries in memory and do comparisons in code. Table would be checked like once an hour for updates.

32

u/HK-Sparkee Oct 06 '21

And a lot of these would be easy to understand expressed in regex

19

u/Informal_Swordfish89 Oct 06 '21

Even then still... I'd probably choose to use regex.

It's incredibly flexible and allows easy upscaling.

14

u/FistThePooper6969 Oct 06 '21

It would depend on the scale imo as regex is MUCH slower than an efficient string operation.

20

u/frugalerthingsinlife Oct 06 '21

Forget runtime cost. Maintainability of regex would be tough as people come up with clever new names. And not everyone is a regex wizard, but anyone can add a bad word to a bad word list.

A bayesian filter, like they use in spam, would be more all-encompassing.

19

u/Maalus Oct 06 '21

"The plural of regex is regrets" is my motto, nothing good comes from having tons of regexes to check against.

→ More replies (4)
→ More replies (2)
→ More replies (1)

14

u/FistThePooper6969 Oct 06 '21

Additionally, needing to update/add an entry would require a deployment which is unnecessary

4

u/nagesagi Oct 06 '21

Yep, that's the main reason to have it in a table.

2

u/Syscrush Oct 06 '21

And while we're at it, let's strip all symbols from the name and map numbers to the letters they can stand in for, THEN do the check with text against text.

→ More replies (1)

33

u/alexppetrov Oct 06 '21

I am beginning to learn SQL now but wouldn't it be better to store the forbidden names in a DB and compare them that way rather than writing an individual row for every username?

15

u/_PM_ME_PANGOLINS_ Oct 06 '21

Yes.

5

u/[deleted] Oct 07 '21

They're hired.

0

u/[deleted] Oct 06 '21

[deleted]

5

u/KlaireOverwood Oct 06 '21

Can't you do an outer join with a LIKE clause?

8

u/RedditAcc-92975 Oct 06 '21

Create table "banned_username_patterns" ...

now in PostgreSQL there are a few ways. For example

select any (select ue.login ~ t.pattern from banned_username_patterns as t)

https://stackoverflow.com/a/13565021


Also, as others have mentioned this shouldn't be done on the DB. No need for using the database here. Unless someone was post-hock banning users.

→ More replies (1)

1

u/MrMelon54 Oct 07 '21

you would do it before the data ever reaches the database

just check the value against a file listing all these combinations before saving it

1

u/Slick_J Oct 07 '21

Use a fucking config file omfg

1

u/Flyberius Oct 07 '21

Not in (....)

surely?

1

u/[deleted] Jan 18 '22

Make a table with all the words you don't like and loop through it, I think?

1

u/[deleted] Jan 18 '22

REGEXP (SELECT GROUP_CONCAT(bad_names_column SEPARATOR '|') FROM bad_names_table)

REGEXP lets you match multiple words and is formatted like "item1|item2|item3", and the subquery will concat all the cells in the names column with "|" between them.

20

u/Spynder shameless stealing content to r/YandereTechnique Oct 06 '21

What the hell is this r/YandereTechnique

6

u/[deleted] Oct 06 '21

what did Mike Hawk do?

1

u/nazianimefan Oct 07 '21

My cock did nothing wrong

19

u/trogan Oct 07 '21

My two cents. I know this looks bad… but it’s probably auto generated code from a list somewhere, rather than handcoded.

In addition doing this sort of “like” matching between tables or other more elegant means might have a performance hit over the hard coded script here.

5

u/christian-mann Oct 07 '21

I've normally seen this as a list of hashes, so that if source code or databases do get leaked, it's not necessarily feasible to reconstruct the banned words and discover gaps.

12

u/michaeld98_elf Oct 06 '21

how did they miss "it's okay to be white"?

3

u/gipp Oct 06 '21

This sort of looks like a one off analysis script --sometimes easier to just take a list of names and do a bunch of regex replacements in vim than do anything proper if you're just going to do it once. But then why would that be committed to a repo? Any context for what this is used for?

3

u/Aayzie Oct 07 '21

wtf those are my alts

2

u/Cube00 Oct 07 '21

Fits nicely with the hard coded list of golden kappa users.

2

u/[deleted] Oct 07 '21

I wonder if this is the result of codegen commited to a repo (not as uncommon as you’d think) or part of a one off task that needed to be run

2

u/[deleted] Oct 07 '21

I dont know much about programming, can someone eli5 explain what a better way of blacklisting would be and how this is bad? I assume maintaining a large txt file to look through for blacklisted words can be 1 way

1

u/TheAwesome98_Real evil Oct 07 '21

username_denylist.txt

2

u/Kazaan Oct 07 '21 edited Oct 07 '21

Actually I'm curious how it would be possible to make better than this considering it's a requirement making it from a SQL query.

AFAIK, it's not possible making something like

SELECT * FROM ueWHERE ue.login NOT LIKE IN ('%foo%', '%bar%')

Or even better

SELECT * FROM ueWHERE ue.login NOT LIKE IN (SELECT pattern FROM forbidden_words_patterns)

What is the best practice to check that a given value does not contain a value defined in a set of pattern ?

2

u/Prom3th3an Apr 16 '22

You'd think those fõøls would at least strip out accents first.

2

u/PixelPerfect41 Nov 06 '22

Why not regular expression or aggressive word sequence detector?

3

u/clxxiii Oct 06 '21

My guess as to the reasoning of this is that it's a list of usernames that were banned because of an inappropriate username. That means the username made it through a previous filter (if there is one) and then blocks the username from being used again once an account is banned

That's just my guess though

1

u/[deleted] Oct 06 '21

wtf xd

1

u/Nineties Oct 06 '21

cmonBruh

1

u/INTO_NIGHT Oct 06 '21

Well thats one way of checking for language guess they werent expecting a leak

1

u/kevlu8 if (true) {} Oct 07 '21

What language is this??

1

u/deftware Oct 07 '21

badcode pun ???

1

u/[deleted] Oct 07 '21

Is this really part of twitch source?

1

u/[deleted] Oct 07 '21

Someone remove my name from that list

1

u/ekolis Oct 07 '21

So much for BasementDweller...

1

u/[deleted] Oct 07 '21

Whatever it takes to silence racists

1

u/[deleted] Oct 07 '21

Ooh wow so elegant!

1

u/yard2010 Oct 07 '21

I'm surprised negus is not there

1

u/Cobyh7 Oct 07 '21

So they do their username check in the sql statement?

1

u/[deleted] Oct 07 '21

Why use hash table or database

1

u/Flokinho Oct 07 '21

Does somebody have a link to the leaked source code?

1

u/[deleted] Oct 07 '21

Can someone share the path of this file?

1

u/TheAwesome98_Real evil Oct 07 '21

~/.i_did_yer_mum

1

u/duncte123 Oct 07 '21

What's the path?

1

u/jebhebmeb Oct 07 '21

I’m confused, couldn’t you just put this in a list 😂

1

u/fatso83 Oct 08 '21

I think the problem is that you cannot do this

SELECT * FROM ueWHERE ue.login NOT LIKE IN ('%foo%', '%bar%')

1

u/felipebizarre Oct 07 '21

this could have been an exists and a subquery lol

1

u/[deleted] Oct 07 '21

Are Twitch devs getting paid by LoC or are they really that fucking ugly at programming lmao

1

u/MangoAtrocity Oct 07 '21

Can we get a pastebin of the ban list? This is hilarious

1

u/GooberMcNutly Oct 07 '21

Obviously, this is Satan's own SQL WHERE LIKE clause, but what I can't understand why the are blacklisting it in the query? If there is a blacklist it should be in code when the account is being created. If this is their really bad way of blacklisting user logins, then that's an even more king sized oof. And I really have faith that humanity can come up with enough offensive user names that any reasonable SQL parser will give up. It's only 4k max query length for MySQL, there are probably at least that many offensive logins in this subreddit.

They should put the code in git and come out and say they will pay $100-1000 per PR accepted to fix any bugs.

1

u/GrandolfTheBrown Oct 07 '21

Why can't you have C U Next Time Acronym?

1

u/mybotanyaccount Oct 07 '21

trying to get access to the source code for educational purposes can one help me out? Thanks

1

u/tombricks Oct 07 '21

idk how the system works, but would it not make sense to have a system that automatically accounts for 0s, spaces, 1s, etc, so you dont have to include multiple ones. you could just have one 'porn' instead of also having 'p0rn' and you could have... well im not going to say the slurs but you get my point

1

u/GachiRoss Oct 07 '21

so you get shadowbanned if you talk about Vietnamese currency?

1

u/SemyonDanilov Oct 08 '21

What? Why the “Semen” is banned?! My name is Semen :/

1

u/ferrango Well it's broken now, and nobody is here to fix it Oct 29 '21

banned

1

u/MikeSawy3r Oct 09 '21

Does anyone know in which zip of the package is the android client?

1

u/drink_with_me_to_day Oct 10 '21

Not even ILIKE there...

1

u/SoniSins Oct 13 '21

now people will yell at me if I mention its made by CP coders

1

u/sgargel__ Oct 28 '21

Why not using a single regex with or operators for each capturing group instead?

1

u/ferrango Well it's broken now, and nobody is here to fix it Oct 29 '21

So many great nick ideas

1

u/GlowstoneLove Jan 28 '22

What's ice wall and ice wallow?

Also what's hurensohn?

1

u/arewhyaeenn May 15 '22

Ahahahaa some of these are so creative

1

u/Raillou-gold May 14 '23

can you send link ?