Newsgroups: php.internals Path: news.php.net Xref: news.php.net php.internals:10364 Return-Path: Mailing-List: contact internals-help@lists.php.net; run by ezmlm Delivered-To: mailing list internals@lists.php.net Received: (qmail 24139 invoked by uid 1010); 10 Jun 2004 06:35:55 -0000 Delivered-To: ezmlm-scan-internals@lists.php.net Delivered-To: ezmlm-internals@lists.php.net Received: (qmail 23484 invoked by uid 1007); 10 Jun 2004 06:35:51 -0000 To: internals@lists.php.net References: <00f901c44e20$62cf0170$0a00a8c0@home.jevon.org> Message-ID: Date: Thu, 10 Jun 2004 09:35:28 +0300 Organization: none Content-Type: text/plain; format=flowed; delsp=yes; charset=koi8-r MIME-Version: 1.0 Content-Transfer-Encoding: 8bit User-Agent: Opera M2/7.50 (Win32, build 3778) X-Posted-By: 217.23.116.150 Subject: Re: [PHP-DEV] stripslashes() improvements From: valyala@tut.by ("Alexander Valyalkin") On Thu, 10 Jun 2004 00:50:46 +1200, Jevon Wright wrote: >> > echo "Stripslashes test: "; >> ini_set('magic_quotes_sybase', 0); >> $s = 'c:\\windows\\system32'; >> $s1 = '\\'; >> if ($s == stripslashes($s) && $s1 == stripslashes($s1)) echo "OK\n"; >> else echo "FAILED\n"; >> ?> > > 'c:\\windows\\system32' becomes 'c:\windows\system32' in memory (the > slashes are stripped). I know it :) > stripslashes() will make it 'c:windowssystem32'. Thus the above tests > will fail. Yes. The current version of stripslashes will fail on the testcase. And my version of stripslashes successfully passes it. Read bugreports #9437, #19947, #27848 and see sources of my stripslashes code to understand it behavior. > This isn't a bug? (Doesn't magic_quotes_sybase only override > magic_quotes_gpc which affects GPC data?) > > Jevon -- Using Opera's revolutionary e-mail client: http://www.opera.com/m2/