php - Can this query be bypassed by an injection? -
$username = mysql_real_escape_string($_post['username']); $password = mysql_real_escape_string($_post['password']); $checkpassword = mysql_query("select * user_info username='$username' , password='$password';");
can query bypassed injection , if able craft injection can use security testing?
i have tried doing 'x' or 1=1 mysql_real_escape_string manages remove quotes , treats whole field string. thank in advance.
the whole purpose of mysql_real_escape_string
escape value passed safely used in mysql string literal. , use value escaped mysql_real_escape_string
how it’s supposed be, i. e., in string literals, have done correctly.
so there no way bypass long have set connection character set properly there case mysql_real_escape_string
still may bypassed due improper setting of connection character set when using character sets gbk or big5.
Comments
Post a Comment