ID: 7987 Comment by: tauruskr86 at hotmail dot com Reported By: andbe611 at student dot liu dot se Status: Closed Bug Type: HTTP related Operating System: Linux PHP Version: 4.0.3pl1 New Comment:
ciao Previous Comments: ------------------------------------------------------------------------ [2004-05-22 13:01:57] tauruskr86 at hotmail dot com ciao ------------------------------------------------------------------------ [2000-12-12 05:53:58] [EMAIL PROTECTED] Fixed in CVS. ------------------------------------------------------------------------ [2000-11-28 09:24:39] andbe611 at student dot liu dot se Ok, I found this in: php_variables.c row 202 /* FIXME: XXX: not binary safe, discards returned length */ php_url_decode(var, strlen(var)); php_url_decode(val, strlen(val)); php_register_variable(var, val, array_ptr ELS_CC PLS_CC); So I guess you are already aware of the problem. ------------------------------------------------------------------------ [2000-11-27 11:38:43] andbe611 at student dot liu dot se Here is a short script that shows the problem. (I guess I should have posted thins in my first bugreport, sorry) The script null_string.php gets called with: http://myserver.com/null_string.php?truncated=hello%00world null_string.php: <?php $works= "hello\x00world"; $fp = fopen("file.txt","w"); fwrite($fp,"$works\n"); fwrite($fp,"$truncated\n"); fclose($fp); ?> file.txt opened in an hex editor: hex: 68 65 6C 6C 6F 00 77 6F-72 6C 64 0A 68 65 6C 6C 6F 0A text:hello.world.hello. The $works is saved with the null value, but the $truncated in the get request gets truncated by php. ------------------------------------------------------------------------ [2000-11-27 06:34:58] [EMAIL PROTECTED] maybe duplicate of 7621 ------------------------------------------------------------------------ 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/7987 -- Edit this bug report at http://bugs.php.net/?id=7987&edit=1
