
11-13-2011, 01:21 PM
|
|
Junior Member
|
|
Join Date: Sep 2010
Posts: 5
Thanks: 0
Thanked 1 Time in 1 Post
|
|
Preventing php injection article
While making a test script I learned that using addslahes () is not the best way to prevent php injection.
Try mysql_real_escape_string() instead.
Last month, I discussed Google's XSS Vulnerability and provided an example that demonstrates it. I was hoping to highlight why character encoding consistency is important, but apparently the addslashes() versus mysql_real_escape_string() debate continues. Demonstrating Google's XSS vulnerability is pretty easy. Demonstrating an SQL injection attack that is immune to addslashes() is a bit more involved, but still pretty straightforward.
Read the rest here.
|