PHP: the language where everything is a footgun
H
hn_commenter +890
PHP is the only language where I've seen a function called mysql_real_escape_string. Because apparently mysql_escape_string wasn't escaping things... for real.
S
security_nerd +1100
And then they deprecated both in favor of prepared statements, which they should have done from the start. Decades of SQL injection vulnerabilities later.
O
old_timer +760
Don't forget addslashes(). Three different ways to incorrectly prevent SQL injection before someone thought 'maybe we should just separate the query from the data.'
7,600 pts Source: manual
View original →