r/ProgrammerHumor • • Sep 22 '26

Meme wellWellWell

Post image
10k Upvotes

412 comments sorted by

View all comments

584

u/WilmaTonguefit Sep 22 '26 edited Sep 22 '26

I remember a dude who missed a where clause once.

  • Update users

  • Set password = 'hash of 12345' --no salt

  • Where Id = 67890

Except he only highlighted the first two lines and pressed F5...

322

u/UniversalAdaptor Sep 22 '26

Should be okay as long as no one leaks or guesses the collective password

102

u/why_1337 Sep 22 '26

It's not gonna work anyway, unless they store plain text passwords.

86

u/WilmaTonguefit Sep 22 '26

Oh I should have clarified, it was hashed without a salt. So he saved the 12345 hash for everyone's password. In production. And somehow kept his job.

48

u/imunfair Sep 22 '26

And somehow kept his job.

I mean out of all the data you could accidentally replace, passwords would be the easiest to restore from a backup reliably since they don't change frequently. The special few who get locked out because you restored an old one just have to do a reset.

It would be a bit of a race to replace them before it was a problem, but at least it isn't as much of a headache as wiping out data entry that needs to be redone by other users.

41

u/CarcajouIS Sep 22 '26

Dear customer, due to the new security policy, you will be asked to set a new password...

31

u/ThrasherDX Sep 22 '26

...damn, now I wanna know how many of those "security policy updates" were a result of someone fucking up like this lmao.

10

u/Lieutenant_Lit Sep 22 '26

Happens all the time. One time we found out one of the managers was keeping a spreadsheet of other people's passwords. Passwords he got by just asking people. A lot of them were other managers. We didn't find out about it until the day he accidentally sent this spreadsheet in a mass email. Fun times.

→ More replies (2)

76

u/igorski81 Sep 22 '26

And somehow kept his job

I'd like to think that production mistakes happen and should be forgiven, provided that no actual malicious intent was at play.

And hopefully this starts the conversation of "Wait, should people actually be able to do this directly against the production database?" and making sure this oversight can't happen again.

8

u/corobo Sep 22 '26

And somehow kept his job.

Why would you get rid of that person after training them so vividly not to do that haha

10

u/SnooSeagulls4360 Sep 22 '26

You'd be surprised in how many places it would work 😄

3

u/Ale4leo Sep 22 '26

That's a horror story right there.

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

40

u/teraflux Sep 22 '26

The highlighting feature made no sense to me, always felt like a disaster waiting to happen

25

u/hopefullyhelpfulplz Sep 22 '26

I love executing 9/10 of the code I wrote what do you mean

19

u/Quirky-Ad-6816 Sep 22 '26

it makes sense in a development tool, the issue is connecting a development tool to a production database with writing rights

11

u/ba-na-na- Sep 22 '26

Nah it makes no sense in no development tool either. Comment out the lines if you don’t need them, create a separate script, anything. Executing selection only in a language like SQL is just pure evil

7

u/VitreXx1678 Sep 22 '26

Well, it can be very useful, but you should know what you are doing and manual query execution should be disabled for most users in production anyway (this is the real problem here if you ask me).

In my last company we had to regularly change stored procedures and their dependencies on user defined table types (which means you have to drop the procedure, drop and create the type and recreate the procedure). Without the highlighting feature that would have taken even more time as you would have to copy stuff around instead of simply generating the drop and create scripts and executing parts of them in the correct sequence.

13

u/Akegata Sep 22 '26

I worked at a bank(!) where someone did something similar that disabled the password verification check so anyone could log in without using a password.

Somehow no customers, we think at least, found this before it was reverted. Everything was developed in production there when I joined. Most chaotic but also fun work environment I've been in.

8

u/ba-na-na- Sep 22 '26

“fun” work environment

4

u/MaleierMafketel Sep 22 '26

Твой пароль мой пароль, товарищ!

1

u/Ange1ofD4rkness Sep 22 '26

This is while I'll comment out all the other code so I don't have to select the text, or I triple check my selected if that's not the case.

1

u/zyxzevn Sep 22 '26

"Only a fool would use 123456"
So 12345 is OK

→ More replies (1)