note 37945 deleted from function.get-magic-quotes-gpc by aidan
| From: | aidan@php.net | Date: | Tue, 06 Jul 2004 06:19:43 +0000 |
| Subject: | note 37945 deleted from function.get-magic-quotes-gpc by aidan | ||
| References: | 1 | Groups: | php.notes |
| Request: | Send a blank email to php-notes+get-72691@lists.php.net to get a copy of this message | ||
Note Submitter: Balu
----
To whoever invented the magic_quotes algorithm - I hate you ;)
This feature is a pain in the ass for all PHP developers. About every application has to check
wether this is set or not and strip_slashes or not variables regarding its setting.
If this feature would not have been added a long time ago, everyone could've been told that
you'd have to use addslashes to write secure SQL queries and stuff. But now you can not simply
use addslashes, because magic_quotes might be in effect, so you have to stripslashes all variables
at the beginning of your php file (if enabled) or even worse check and stripslashes each variable on
usage.
This is a complex issue that truly doesn't make life easier for new and experienced coders and
should have been removed with the suberglobals.
PS: Just being stuck again in forms that display \' \" sometimes and sometimes not - grah.