News for hackers. Stuff that matters.
Re:SQL injections vulnerabilities in Stack Overflow PHP ques... by askmike on Sunday December 04, 2016 @07:58AM (#13099826)
I haven't seen any examples (just code snippets), but I wouldn't call all unsanitized queries SQL injection vulnerabilities:

    $sql = "SELECT * FROM inventory_item WHERE product_category_id='$pcid'";
The pcid var might have been checked/cleaned up before this line (might even be part of the same SO answer).

-----

Obviously that doesn't mean this is very bad practise, especially at stackoverflow where you know people will just copy and paste your code.

Re:SQL injections vulnerabilities in Stack Overflow PHP ques... by vomitcuddle on Sunday December 04, 2016 @08:06AM (#13099849)
yeah, unless the snippet also includes a definition for variable $pcid, there is no proof that the code is actually vulnerable - using such simplistic logic, the stats are likely hugely inflated

but i don't agree that it should be the poster's responsibility to show their sanitation logic to prevent people from blindly copying-and-pasting their code, if it's not relevant to their question