Welcome Guest, Not a member yet? Register   Sign In
Question regarding SQL injection
#2

[eluser]Pascal Kriete[/eluser]
The function checks the type and surrounds strings with quotes. So it becomes:
system/database/DB_driver.php - line 679
Code:
UPDATE customers SET name='xyz', passwd='0;####' WHERE kid='abc';

Double and single quotes are escaped with backslashes by the native mysql_real_escape_string function (or the appropriate equivalent for your db type).

The bigger issue with your code is that you're storing passwords in plain text. So instead of the brute forcing of each user's account that you're anticipating, the hacker will do it exactly once - to get the database credentials. You should hash your passwords.


Messages In This Thread
Question regarding SQL injection - by El Forum - 11-07-2008, 08:41 AM
Question regarding SQL injection - by El Forum - 11-07-2008, 09:05 AM
Question regarding SQL injection - by El Forum - 11-07-2008, 09:14 AM
Question regarding SQL injection - by El Forum - 11-07-2008, 09:15 AM
Question regarding SQL injection - by El Forum - 11-07-2008, 09:40 AM
Question regarding SQL injection - by El Forum - 11-07-2008, 09:43 AM
Question regarding SQL injection - by El Forum - 11-07-2008, 09:49 AM
Question regarding SQL injection - by El Forum - 11-07-2008, 10:05 AM
Question regarding SQL injection - by El Forum - 11-07-2008, 11:29 AM



Theme © iAndrew 2016 - Forum software by © MyBB