$username = mysql_real_escape_string($_POST['username']);
$password = mysql_real_escape_string($_POST['password']);
$checkPassword = mysql_query("SELECT * FROM user_info WHERE Username='$username' AND Password='$password';");
該查詢是否可以被注射繞過,如果是的話,是否有人能夠製造出可用於安全性測試的注射劑?該查詢是否可以被注入繞過?
我試過做'x'或1 = 1,但mysql_real_escape_string設法刪除引號並將整個字段視爲字符串。 謝謝大家提前。
請參閱http://stackoverflow.com/questions/5741187/sql-injection-that-gets-around-mysql-real-escape-string – xdazz
[MySQL \ _real \ _escape \ _string?的缺點]的可能重複( http://stackoverflow.com/questions/12703420/shortcomings-of-mysql-real-escape-string) – deceze