Aplicativos em PHP/Apêndices/Segurança: diferenças entre revisões
[edição não verificada] | [edição não verificada] |
Conteúdo apagado Conteúdo adicionado
Sem resumo de edição |
Sem resumo de edição |
||
Linha 618:
}
else
// If $string is a string ($isNumber==false) we return "'$string'"
// correctly escaped (in this version I also strip HTML tags and modify some things in the string, change it if you wish). return "'".mysql_real_escape_string(htmlentities(strtoupper(trim(strip_tags($string)))), $link)."'";
}
Linha 633 ⟶ 634:
$result=mysql_db_query("DATABASE", "SELECT * FROM secret WHERE foo LIKE $foo AND bar=$bar", $link);
//If $_POST["foo"] or $_POST["bar"] are a string of this kind: "'' OR 1=1" and we don't use ToDBString we will show all the info of the table!!!!
<h2>[[/Escrevendo Código Robusto em PHP/]]</h2>
|