note 63806 added to function.addslashes

From: Date: Fri, 31 Mar 2006 14:27:37 +0000
Subject: note 63806 added to function.addslashes
Groups: php.notes 
Request: Send a blank email to php-notes+get-107073@lists.php.net to get a copy of this message
in response to: ==================================== This code can be inserted somewhere in your application (near the start): if (get_magic_quotes_gpc()) { // Yes? Strip the added slashes $_REQUEST = array_map('stripslashes', $_REQUEST); $_GET = array_map('stripslashes', $_GET); $_POST = array_map('stripslashes', $_POST); $_COOKIE = array_map('stripslashes', $_COOKIE); } ==================================== That code will fail if someone sets a control to an array for example: <input type='checkbox' name='id_numbers[]' /> Just thought i'd let ya know... ---- Server IP: 85.116.0.130 Probable Submitter: 194.247.248.140 ---- X-Spam-Status: No, hits=3.3 required=5.0 tests=DATE_MISSING,FROM_NO_LOWER, HTML_MESSAGE autolearn=no version=2.64 ---- Manual Page -- http://www.php.net/manual/en/function.addslashes.php Edit -- http://master.php.net/note/edit/63806 Del: integrated -- http://master.php.net/note/delete/63806/integrated Del: useless -- http://master.php.net/note/delete/63806/useless Del: bad code -- http://master.php.net/note/delete/63806/bad+code Del: spam -- http://master.php.net/note/delete/63806/spam Del: non-english -- http://master.php.net/note/delete/63806/non-english Del: in docs -- http://master.php.net/note/delete/63806/in+docs Del: other reasons-- http://master.php.net/note/delete/63806 Reject -- http://master.php.net/note/reject/63806 Search -- http://master.php.net/manage/user-notes.php

« previous php.notes (#107073) next »