this post was submitted on 21 Mar 2025
640 points (99.5% liked)

Programmer Humor

21809 readers
1775 users here now

Welcome to Programmer Humor!

This is a place where you can post jokes, memes, humor, etc. related to programming!

For sharing awful code theres also Programming Horror.

Rules

founded 2 years ago
MODERATORS
 

Original post: hachyderm.io (Mastodon)

you are viewing a single comment's thread
view the rest of the comments
[–] testfactor@lemmy.world 129 points 2 days ago (4 children)

Probably, but if you're interpreting user inputs as raw code, you've got much much worse problems going on, lol.

[–] LostXOR@fedia.io 32 points 2 days ago (1 children)

[...]&register=import os; os.system("sudo rm -rf /"); return True

[–] MajorHavoc@programming.dev 15 points 1 day ago

Hey, that's my username too. Or it was going to be, while the site was still up.

What a coincidence!

I guess I'll wait for the site to come back, and see if it's still available...

[–] mmddmm@lemm.ee 17 points 2 days ago (1 children)

It's the settiings file... It's probably supposed to only be written by the system admin.

[–] raldone01@lemmy.world 8 points 2 days ago* (last edited 1 day ago) (2 children)

A good place to put persistent malware. That's why when using docker images always mount as ro if at all possible.

[–] ashley@lemmy.ca 8 points 2 days ago

It’s you can modify the settings file you sure as hell can put the malware anywhere you want

[–] mmddmm@lemm.ee 3 points 2 days ago

Every environment has plenty of good places to put persistent malware. Even if you run your docker images as ro.

[–] 0x0@lemmy.dbzer0.com 7 points 1 day ago (1 children)

Given the warning about capitalization, the best possible case is that they're using ast.literal_eval() rather than throwing untrusted input into eval().

Err, I guess they might be comparing strings to 'True' and are choosing to be really strict about capitalization for some reason.

[–] MajorHavoc@programming.dev 11 points 1 day ago

Yeah. Maybe .to_lower() is really expensive in their environment, lol.

It's not User input, it's config file