when i use acunetix on my page i get a: Blind SQL/XPath injection
header: GET /file.php?id=2'+and+31337-31337=0+--+&page=2
response:
no files found
(sometimes it shows results)here is my php code:
$id = (int) htmlentities($_GET['id']);
$fileid = mysql_real_escape_string($id);
the query:
SELECT * FROM `files` WHERE `id` = '".$fileid."'
what am i doing wrong? can someone erase my database just with this? im also getting the same message at some queries almost equal to that one but that also have limit 0,1
i'm using paginator (i fixed some injections that where in that script) but the example i gaved its not using it