#22904 [Opn]: sybase_magic_quotes does stuff with '\0' string

2003-03-27 Thread iliaa
 ID:   22904
 Updated by:   [EMAIL PROTECTED]
 Reported By:  [EMAIL PROTECTED]
 Status:   Open
 Bug Type: Sybase-ct (ctlib) related
 Operating System: linux RH7.2
 PHP Version:  4.3.2RC1
 New Comment:

Is this even a bug? It seems to me the code follows the 'proper'
behaviour for sybase_magic_quotes, no?


Previous Comments:


[2003-03-27 03:48:52] [EMAIL PROTECTED]

Nothing to do with fwrite



[2003-03-27 03:06:28] [EMAIL PROTECTED]

ok, problem here is that php_stripslashes for sybase_magic_quetes
replace '\0' with ascii(0) due reverse action on php_addslashes.

IMHO in contrary to '\'' type replacements where we "maintains" the
data "queues fixed" all over the script, on ascii(0) data, we have no
problem do it onto the query level.
there'll be minore bc problem but the current beavior is totally bogus!



[2003-03-26 10:31:27] [EMAIL PROTECTED]

well, using set_magic_quotes_runtime(0); fix the problem.

due to my quick debug, the problem is somewhere into php_stripslashes
called on file.c:1543 i'll try to look into it on friday if this bug
still 'll be exists.



[2003-03-26 10:18:30] [EMAIL PROTECTED]

problem still exists on last cvs.

my editor show ascii(0) as ? but '\0' have to be showen as '\0'
mean, if the orginal text (c code this case) file included the \0
*string* i does't want fwrite() replace it with ascii(0)! but to save
it as the orginal string.



[2003-03-26 09:33:33] [EMAIL PROTECTED]

Please try using this CVS snapshot:

  http://snaps.php.net/php4-STABLE-latest.tar.gz
 
For Windows:
 
  http://snaps.php.net/win32/php4-win32-STABLE-latest.zip

Cannot verify this bug with latest CVS. I think your editor just shows
\0 as ?



The remainder of the comments for this report are too long. To view
the rest of the comments, please view the bug report online at
http://bugs.php.net/22904

-- 
Edit this bug report at http://bugs.php.net/?id=22904&edit=1



#22904 [Opn]: sybase_magic_quotes does stuff with '\0' string

2003-03-27 Thread wez
 ID:   22904
 Updated by:   [EMAIL PROTECTED]
-Summary:  fwrite is not binary safe for '\0' string
 Reported By:  [EMAIL PROTECTED]
 Status:   Open
-Bug Type: Filesystem function related
+Bug Type: Sybase-ct (ctlib) related
 Operating System: linux RH7.2
 PHP Version:  4.3.2RC1
 New Comment:

Nothing to do with fwrite


Previous Comments:


[2003-03-27 03:06:28] [EMAIL PROTECTED]

ok, problem here is that php_stripslashes for sybase_magic_quetes
replace '\0' with ascii(0) due reverse action on php_addslashes.

IMHO in contrary to '\'' type replacements where we "maintains" the
data "queues fixed" all over the script, on ascii(0) data, we have no
problem do it onto the query level.
there'll be minore bc problem but the current beavior is totally bogus!



[2003-03-26 10:31:27] [EMAIL PROTECTED]

well, using set_magic_quotes_runtime(0); fix the problem.

due to my quick debug, the problem is somewhere into php_stripslashes
called on file.c:1543 i'll try to look into it on friday if this bug
still 'll be exists.



[2003-03-26 10:18:30] [EMAIL PROTECTED]

problem still exists on last cvs.

my editor show ascii(0) as ? but '\0' have to be showen as '\0'
mean, if the orginal text (c code this case) file included the \0
*string* i does't want fwrite() replace it with ascii(0)! but to save
it as the orginal string.



[2003-03-26 09:33:33] [EMAIL PROTECTED]

Please try using this CVS snapshot:

  http://snaps.php.net/php4-STABLE-latest.tar.gz
 
For Windows:
 
  http://snaps.php.net/win32/php4-win32-STABLE-latest.zip

Cannot verify this bug with latest CVS. I think your editor just shows
\0 as ?



[2003-03-26 09:25:48] [EMAIL PROTECTED]

here is simple code:


---

where test.txt content is:
--test \0 test
--

the result test2 file is:
---
test ? test
---




-- 
Edit this bug report at http://bugs.php.net/?id=22904&edit=1