addslashes currently backslash escapes \0 regardless of the value of
magic_quotes_sybase.  if magic_quotes_sybase is on, it should not do so. a
patch to change this is very small and simple.  see attached.

this is a particularly bad thing to leave unpatched, as stripslashes will
not remove backslash escaping of nulls if magic_quotes_sybase is on.

I do not have sufficient karma to commit this anywhere, but I'd like to
see it considered for the RC branch, as it's a small obvious fix.


--jlp
--- string.c    27 Sep 2001 06:55:23 -0000      1.249
+++ string.c    3 Oct 2001 01:12:40 -0000
@@ -2433,8 +2433,13 @@
                c = *source;
                switch(c) {
                        case '\0':
-                               *target++ = '\\';
-                               *target++ = '0';
+                               if (!PG(magic_quotes_sybase)) {
+                                       *target++ = '\\';
+                                       *target++ = '0';
+                               }
+                               else {
+                                       *target++ = c;
+                               }
                                break;
                        case '\'':
                                if (PG(magic_quotes_sybase)) {
-- 
PHP Development Mailing List <http://www.php.net/>
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]

Reply via email to