note 89566 deleted from security.magicquotes by danbrown
| From: | danbrown@php.net | Date: | Fri, 13 Mar 2009 20:31:39 +0000 |
| Subject: | note 89566 deleted from security.magicquotes by danbrown | ||
| References: | 1 | Groups: | php.notes |
| Request: | Send a blank email to php-notes+get-151856@lists.php.net to get a copy of this message | ||
Note Submitter: brad at musatcha dot com
----
I put this code in my common include to effectively "disable" magic quotes on runtime.
(ISP will not change this setting on my shared server.)
if (get_magic_quotes_gpc()) {
foreach($_POST as $key=>$value) {
$_POST[$key]=stripslashes($value);
}
foreach($_GET as $key=>$value) {
$_POST[$key]=stripslashes($value);
}
foreach($_COOKIE as $key=>$value) {
$_COOKIE[$key]=stripslashes($value);
}
}
There is also similar code out there.