News Feed
Sections




News Archive
Looking for more information on how to do PHP the right way? Check out PHP: The Right Way

Chris Shiflett's Blog:
The addslashes() Versus mysql_real_escape_string() Debate
January 23, 2006 @ 06:46:32

In his latest blog entry, Chris Shiflett looks at a debate that's been going for a while now - addslashes() versus mysql_real_escape_string().

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 was pretty easy. Demonstrating an SQL injection attack that is immune to addslashes() is a bit more involved, but still pretty straightforward.

The reminder of the post explains the difference, how how protects you when the other doesn't (addslashes), and a simple example of how something like that could be accomplished, including code...

0 comments voice your opinion now!
addslashes mysql_real_escape_string debate protect sql injection addslashes mysql_real_escape_string debate protect sql injection


blog comments powered by Disqus

Similar Posts

Gonzalo Ayuso's Blog: Protect files within public folders with mod_rewrite and PHP

Sanisoft Blog: Email component in CakePHP is now Header Injection safe

Benjamin Eberlei's Blog: Using a Dependency Injection Container with Zend_Application

Jemjabella.co.uk: Spotting Insecure Scripts

Sam Hennessy's Blog: A Dependency Injection for PHP Manifesto - Part 0 (Preface)


Community Events

Don't see your event here?
Let us know!


release community framework wordpress php7 library introduction interview version list podcast series voicesoftheelephpant laravel language unittest opinion api laravel5 extension

All content copyright, 2015 PHPDeveloper.org :: info@phpdeveloper.org - Powered by the Solar PHP Framework