384
you are viewing a single comment's thread
view the rest of the comments
[-] tryptaminev@feddit.de 28 points 6 months ago* (last edited 6 months ago)

Are they vulnerable though, if they already exclude it at the user input?

I yet have to learn SQL and is there a way to allow passwords with '); DROP TABLE... without being vulnerable to an injection?

nevermind i googled it, and there various ways to do so

[-] herrvogel@lemmy.world 50 points 6 months ago

This still smells though. Why is the raw, plain text password string getting anywhere near database queries in the first place?

[-] cactusupyourbutt@lemmy.world 17 points 6 months ago

I doubt it is. they probably have a WAF that blocks these strings though and didnt want to bother reconfiguring it

[-] rtxn@lemmy.world 33 points 6 months ago* (last edited 6 months ago)

Prepared statements, mostly. You define the query using variables, turn that query into a language-dependent object, assign values to those variables, then execute the statement. The values will be passed verbatim, without any parsing.

Or, since we're talking about a password, you could encode or encrypt it before inserting it into the query string. The fact that the website could be negatively affected by phrases in the cleartext password is very concerning.

[-] surewhynotlem@lemmy.world 8 points 6 months ago

At best, it means they're storing your password instead of just a salted hash. And that's horrible.

[-] akincisor@sh.itjust.works 22 points 6 months ago

I noticed that upper case select, drop etc are not prohibited.

Poorly implemented user input filters are not a valid solution to being vulnerable to injection.

[-] NoIWontPickaName@kbin.social 11 points 6 months ago

Good old Bobby Tables

[-] emergencyfood@sh.itjust.works 9 points 6 months ago

No one in their right mind is storing plain text passwords, or letting them anywhere near the database.

You convert the password to a hash, and store that. And the hash will look nothing like the password the user typed.

[-] acetanilide@lemmy.world 12 points 6 months ago

You're right. No one in their right mind would do that.

On the other hand, people not in their right mind often run things. Such as my old professional liability insurance. Which wrote the username and password in the yearly statements...

And also sent you the password through email if you forgot it...

Also you couldn't change it...

[-] BURN@lemmy.world 7 points 6 months ago

There was a popular companion app to a game I play that’s stored passwords as MD5 hashes for years and when they got hacked they were able to decrypt everything.

Bonus point, the app was released multiple years after md5 was cracked.

Developers (including myself) cannot be trusted to implement the correct process 100% of the time. It’s happened too many times for it to be a single person issue and has transcended into a problem with software engineers

[-] acetanilide@lemmy.world 2 points 6 months ago

😬😬 that's crazy but good to know

[-] usefulthings@lemmy.world 3 points 6 months ago

Lol. Yes, people do still build systems and store plain text passwords. I regularly get scammers sending me my throwaway passwords from crappy sites. Good thing I never reuse passwords, or email addresses.

[-] agent_flounder@lemmy.world 2 points 6 months ago

Parameterized queries.

[-] trolololol@lemmy.world 1 points 6 months ago

🥲 t Yep it's that easy to do the right thing

this post was submitted on 24 Jan 2024
384 points (98.5% liked)

Cybersecurity - Memes

1668 readers
495 users here now

Only the hottest memes in Cybersecurity

founded 1 year ago
MODERATORS