Hi
I have been asked a question but I cannot even start to answer is so could some one give me an idea of were to start on how to possibly answer it ,
I am not looking for the answer just some teaching on how to answer it
here goes:
Assuming "regsister_globals" and "magic_quotes_gpc" are turned on, Whats wrong with this piece of code ? Document the possible holes , then fix them to produce a secure version ( There are 4 Errors)
$p = $_GET["p"];
if ($sp == "index.php") {
if ($_get["id"] == 345)
$filter - addslashes($_get["id"]);
$sql = "SELECT * FROM users WHERE id = {$filter}";
$row - mydql_fetch_assoc(mysql_query($sql));
echo <<< HTML
<html>
...... user details .....
</html>
HTML.
} else
include ($p);