Hi,
Take a look at the following article:
XSRF: What is it, How does it work, and how can you thwart it
Also you can do simple things like remoive invalid characters from any data you load to the database. By sending wvery data item through a function similar to this:
[php]
function secure($data, $plIsEmail)
{
// prevent the majority of attaccks by removing certain elements from the data. Not to be used if the target field is to store HTML in it.
if ($plIsEmail)
{
$replace = array('<' => '' , '>' => '' , '&' => '' , ',' => '' , '*' => '' , '/' => '' );
}
else
{
$replace = array('<' => '' , '>' => '' , '&' => '' , '.' => '' , ',' => '' , '*' => '' , '/' => '' , '@' => '');
}
$data = strtr($data , $replace);
return $data;
}
[/php]
I must admit that I got the basis for this function from someone here on TSDN so I do not take credit for it. Unfortunatley I can't remember who or where, but thaks to whoever it was that wrote this, it works well.
This is one step in the process, reading the
article will help even more.
Cheers
nathj