Hacker News new | ask | show | jobs
by alltakendamned 2025 days ago
just use prepared statements instead of string concantenation to build your SQL statements.
2 comments

Yes, there's lots of ways to fix SQL injection. I'm more surprised that after knowing about this vulnerability for 20+ years, its STILL lost on many developers. You and I pick up on it immediately, but there's (apparently) a lot of developers who think the code is "good enough, works for me" and ship it to production.

So it needs to be asked for in interviews, and if you find it and discuss it you're apparently one of the "better" programmers. The bar for being a passable programmer is literally on the floor.

Absolutely, but most database libraries still allow concatenation.