Web Hosting Talk







View Full Version : How to prevent SQl injection?


traixanha
06-10-2003, 02:26 PM
i'm about to install vbb forum,but i heard that people can hack my forum by using SQL injection ? but SQL injection was fixed by vbb already ,is this rite?and do u guy know any website talk about SQl injection ?

Patrick
06-10-2003, 03:22 PM
The following website talks about SQL injections:

http://databases.about.com/library/weekly/aa010503a.htm

traixanha
06-10-2003, 04:53 PM
thanks

plugged
06-10-2003, 06:46 PM
if i remember correctly, there is a mysql_* function that should be used with every sql command..

i believe it is mysql_escape_string()

SynHost
06-10-2003, 07:44 PM
Yes. any abritrary data going into an SQL query should be passed through mysql_escape_string().

VNPIXEL
06-10-2003, 10:54 PM
php safe mode on

traixanha
06-11-2003, 12:51 AM
thanks alot ;)

platinum
06-11-2003, 01:58 AM
or php's addslashes() - which may be done via magic_quotes automatically as well :) And using the post arrays are also a good idea ;)

traixanha
06-11-2003, 08:32 AM
so,let's say people use those code type on browser to inject mysql?

Rich2k
06-11-2003, 08:58 AM
Of course you could change the public website user permissions to prevent it running ALTER, CREATE or DROP commands so injection of those commands is impossible.

traixanha
06-11-2003, 03:05 PM
ok, ;)