Re: stripslashes() improvements

From: Date: Thu, 10 Jun 2004 06:35:28 +0000
Subject: Re: stripslashes() improvements
References: 1 2 3 4  Groups: php.internals 
Request: Send a blank email to internals+get-10364@lists.php.net to get a copy of this message
On Thu, 10 Jun 2004 00:50:46 +1200, Jevon Wright <jevon@jevon.org> wrote:
<?php 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/

« previous php.internals (#10364) next »