note 89566 added to security.magicquotes

From: Date: Fri, 13 Mar 2009 20:27:11 +0000
Subject: note 89566 added to security.magicquotes
Groups: php.notes 
Request: Send a blank email to php-notes+get-151848@lists.php.net to get a copy of this message
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. ---- Server IP: 209.41.74.194 Probable Submitter: 75.21.96.153 ---- Manual Page -- http://www.php.net/manual/en/security.magicquotes.php Edit -- https://master.php.net/note/edit/89566 Del: integrated -- https://master.php.net/note/delete/89566/integrated Del: useless -- https://master.php.net/note/delete/89566/useless Del: bad code -- https://master.php.net/note/delete/89566/bad+code Del: spam -- https://master.php.net/note/delete/89566/spam Del: non-english -- https://master.php.net/note/delete/89566/non-english Del: in docs -- https://master.php.net/note/delete/89566/in+docs Del: other reasons-- https://master.php.net/note/delete/89566 Reject -- https://master.php.net/note/reject/89566 Search -- https://master.php.net/manage/user-notes.php

« previous php.notes (#151848) next »