View Single Post
Old 11-14-2012, 09:26 AM  
senortriangulo
Registered User
 
Industry Role:
Join Date: Oct 2012
Posts: 53
Quote:
Originally Posted by Ketchup View Post
Code:
if(isset($_POST['search']))
{
    $searchs = array();
    if(!empty($_POST['contactname']))
    {
        $searchs[]="contactname LIKE '%".$_POST['contactname']."%'";
    }

It looks like your search is probably vulnerable to SQL injections. Are you sanitizing the $_POST at all before this code even runs? If you aren't you could be in for a world of hurt, and you've just let the world know your page is vulnerable to injections.

Check out this StackOverflow post for more on SQL injection attacks:

stackoverflow dot com/questions/60174/best-way-to-prevent-sql-injection

-st
senortriangulo is offline   Share thread on Digg Share thread on Twitter Share thread on Reddit Share thread on Facebook