Btw, someone joked about http://php.net having this as the correct solution, and, well. But "knowing better than http://php.net " is definitely a prerequisite to be in the security business writing PHP. Or just don't write PHP.https://twitter.com/marcan42/status/1089238169839489025 …
-
Show this thread
-
Replying to @marcan42
Not sure that it's PHP that's at fault. You could write this same problem in pretty much any language
1 reply 0 retweets 0 likes -
Replying to @ofcAnthony
But most other programming languages don't teach people to make this mistake in their *official documentation*.
1 reply 0 retweets 4 likes -
Replying to @marcan42
Don't disagree. I was referring to your latter point of "don't write PHP"
1 reply 0 retweets 0 likes -
Replying to @ofcAnthony @marcan42
so continue to write in a language that is unsafe by default and the official docs don't help you either....why? do you also eat soup with a fork?
1 reply 0 retweets 0 likes -
Replying to @moljac024 @marcan42
Show me a language that doesn't allow you to concatenate strings and use the result as a query. The docs are a problem, sure, but it's the developers and the education. It's not the language, and the language shaming was boring 10 years ago, it still is today
1 reply 0 retweets 0 likes -
Replying to @ofcAnthony @moljac024
Culture matters. The problem is that a newbie trying to learn PHP and googling for answers is going to come across much lower quality code than a newbie learning something like Python. Even with the recent core PHP fixes, this is a problem the PHP community may never solve.
1 reply 0 retweets 2 likes -
(And the docs are evidence of the problem being systemic and severe; if the docs are this bad, imagine how much worse all the random blogs are!)
1 reply 0 retweets 1 like -
Replying to @marcan42 @moljac024
You'll not get an argument from me here. I saw people writing tutorials that were susceptible to SQLi and using a deprecated interface literally days before said interface was removed when PHP 7 was released. I've seen too many of those blogs
1 reply 0 retweets 0 likes -
PHP is often a victim of its own success. It flatters you. It's so easy that you make awful mistakes, not knowing what you were doing. I know; I did them. But I'd have been dangerous in any language, to be fair. I learned, and now I teach it
1 reply 0 retweets 0 likes
The problem is the original PHP design *was* comically bad and encouraged comically bad practices. A lot of that baggage still haunts it, but the worse part is that without the *designers* of the language having good practices, you build a community that doesn't either.
-
-
-
Replying to @ofcAnthony @moljac024
In different ways, yes. It's not hard to argue that PHP is worse, though.
1 reply 0 retweets 0 likes - Show replies
New conversation -
Loading seems to be taking a while.
Twitter may be over capacity or experiencing a momentary hiccup. Try again or visit Twitter Status for more information.