chmpdog Posted June 20, 2009 Share Posted June 20, 2009 hello. Recently I decided to try out the firefox plugin sql in inject me, and when I tested my form it gave me some results. When I try an injection the browser asks if I wish to save my password (as if I had logged in successfully) but I am still at the error login page logged in unsuccessfully. How can I protect against this? here is the query: 1 AND ASCII(LOWER(SUBSTRING((SELECT TOP 1 name FROM sysobjects WHERE xtype='U'), 1, 1))) > 116 Link to comment https://forums.phpfreaks.com/topic/162974-my-login-form-vulnerabilities/ Share on other sites More sharing options...
SetToLoki Posted June 20, 2009 Share Posted June 20, 2009 to protect against SQL injection you can use mysql_real_escape_string - http://uk.php.net/mysql_real_escape_string or mysql_escape_string - http://uk.php.net/mysql_escape_string depending on your php version Link to comment https://forums.phpfreaks.com/topic/162974-my-login-form-vulnerabilities/#findComment-859946 Share on other sites More sharing options...
chmpdog Posted June 20, 2009 Author Share Posted June 20, 2009 thanks Link to comment https://forums.phpfreaks.com/topic/162974-my-login-form-vulnerabilities/#findComment-860197 Share on other sites More sharing options...
chmpdog Posted June 20, 2009 Author Share Posted June 20, 2009 Well I just tested it again, but I still get this error(and 25+ more like it) even after I use mysql_real_escape_string: Server Status Code: 302 Found Tested value: 1' OR '1'='1 note: now it doesn't ask me to remember it, it just goes to the error page Link to comment https://forums.phpfreaks.com/topic/162974-my-login-form-vulnerabilities/#findComment-860238 Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.