3 ms·
Perhaps this is natural? That is, you're looking for help so you're likely to have other flaws in your tool box. Certainly, given the importance, something can
by chiefalchemist 10y ago
Perhaps this is natural? That is, you're looking for help so you're likely to have other flaws in your tool box.
Certainly, given the importance, something can be done to prevent relying on the human element to get this right every time. We're how many years into programming and SQL injection is still very real? So much for progress?
- daenney 10y ago> Perhaps this is natural? That is, you're looking for help so you're likely to have other flaws in your tool box. Can you explain what you mean by that? The way I'm reading that you seem to imply "looking for help" means that they have issues all over.
- chiefalchemist 10y agoYou're correct. But let me clarify. I'm not judging. We all have flaws, technical or otherwise. My point was to say, the universe of the sample has a bias of sorts. Kinda like, I have a dog. Well of course it barks. That's all. Make sense? Sorry?
- daenney 10y agoI'm afraid that didn't clarify anything for me. > the universe of the sample has a bias of sorts OK, what? > I have a dog. Well of course it barks. I'm with you there. Dogs bark. There's a correlation between the animal being a dog and it barking. How does that relate to your original post? I have plenty of flaws and gaps in my knowledge and I use SO because there are plenty of great answers on there. Just like there's wonderful threads like these: http://security.stackexchange.com/questions/20803/how-does-ssl-tls-work http://security.stackexchange.com/questions/20803/how-does-s... on other parts of that same network of sites. I don't see how using SO, or any source of information on a topic to help you solve a problem implies or even correlates to not being a capable person in that or other areas in general.
- chiefalchemist 10y agoYou're asking questions on a forum because you're stuck. You don't know. You might not even know what you don't know. You're disheveled. You're shirt isn't tucked in. So you're not going to know you're fly is down as well. The basic question is your shirt. The SQLi issue is your fly. Put another way again :) Is it reasonabke to expect someone struggling with a SQL question to get SQLi concerns right? Fuck me. They can't get the query. Do you really think they're thinking about injection? There! Any better? That's all I got. :)
- laurent123456 10y agoAs a regular user of SO, I'm often amazed at the number of SQL injection vulnerabilities in PHP questions, I had the feeling it was almost in all of them (turns out it's closer to 50% but indeed that's still huge in 2016!). And usually these questions aren't even about the blatant security issue but some minor unrelated problem.
- astrodust 10y agoIt's not natural. It's unique to PHP. Python, Perl, Ruby, Java, Node, they all have respect for best practices and libraries that make coding SQL queries safely quite easy and pleasant. PHP is a whole different beast. People are allergic to package managers, to using "third party code", to using frameworks, even to reading documentation. At times it's amazing how aggressively backwards it can be. I'm not trying to characterize the entire PHP community, there are large parts of it with people trying hard to do the right thing, but there's also this vast wasteland of incompetent people publishing tutorials that are so dangerously wrong with even more people willing to defend these tutorials as being educational and useful. Progress means learning from your mistakes, but some would prefer everyone repeat them, painfully if necessary, to promote "education".
- developer2 10y agoPHP has had the PDO extension since version 5.1, released in 2005. Blaming the language for SQL injection hasn't been a valid excuse for over a decade. The only problem with PHP is that it has the easiest barrier to entry - or perhaps more accurately, no barrier to entry whatsoever. The kind of developer you're describing would never have written a line of code if PHP didn't exist. Python, Perl, Ruby, and Java just wouldn't have been an entry point into programming for them. Node is different, as like PHP, it is accessible to frontend developers who want to branch off into backend as an "addon" rather than as a primary endeavor.
- astrodust 10y agoPHP the language and PHP the ecosystem are different but inseparable. Although technically PHP has had PDO since 5.1 the community is extremely, frustratingly slow to adopt new things. I remember considerable resistance on the part of the community to the very idea of object-oriented problem, something that massively limits uptake on things like PDO and is the driving reason behind mysqli having a bizarre mixed mode, OO or procedural based on preference. Likewise, PHP tutorials, references, and guides kept pushing the absolutely garbage mysql_query interface on people. I don't know how many books published post-PDO insisted on using this approach because it was "easier" or whatever, and some books don't even touch on SQL injection bugs, it's like they don't exist, even while the examples lack escaping of any sort and would crash on certain kinds of input. > The kind of developer you're describing would never have written a line of code if PHP didn't exist. Bullshit. These are people that want to learn to program, and as they look around they see PHP is popular, it's easy to get support for, and hosting it is easy. It's got a lot of positive points. I've seen people with zero technical experience pick up Ruby and build a Rails app inside of months, they get productive very quickly. Same could be said for Node with the right mentoring, though the async stuff is a little harder to get lined up. Client-side apps aren't all that bad, though. PHP has a lot of good things going for it, but too much of the community is absolutely in the dark about it. There's almost zero outreach being done.