2 ms·
You're making the perfect into the enemy of the good. Should every tutorial be an entire 200-page course on all web security practices? Of course not. But sho
by crazygringo 5y ago
You're making the perfect into the enemy of the good.
Should every tutorial be an entire 200-page course on all web security practices? Of course not.
But should every tutorial that inserts a user-provided value into a SQL statement ensure it's escaped? Of course. There's essentially literally never a situation where you shouldn't do that. It's not just to be "production-ready" -- it's so basic as just to make sure the query will still even parse if the user includes a quote character in their input.
So why on earth are you defending this mistake?
- rlayton2 5y agoI'd go further and say it's easier to teach prepared queries than string building (or at least equally difficult). That might not be true for other security issues but I think tutorial writers should be fine saying "here is a bit of magic that fixes a problem called csrf. We won't cover that in this course but leave this in here"