ID: 36183 Comment by: judas dot iscariote at gmail dot com Reported By: karel at linux dot be Status: Open Bug Type: URL related Operating System: Linux PHP Version: 4.4.2 New Comment:
not reproducible in latest PHP 5 CVS. Previous Comments: ------------------------------------------------------------------------ [2006-01-28 00:16:07] karel at linux dot be Description: ------------ PHP-version: 4.3.11 (linux), and 4.4.0 (windows) I don't know if this bug is reproducible on any higher version of PHP as I don't have them to work on. If you submit a POST/GET/parse_str() to a webpage, where a variable has an URLencoded string in it, which contains %00. It will end up being mangled totally. Just check the reproduce-code, it'll be more clear then my explanation here. Reproduce code: --------------- $comp_me = gzcompress('Compress me', 9); parse_str( 'var='. urlencode( $comp_me ) ); var_dump( urlencode($var) ); var_dump( urlencode( $comp_me ) ); Expected result: ---------------- I would expect to see 2 urlencoded strings, EXACTLY the same. Actual result: -------------- string(42) "x%DAs%CE%CF-%28J-.V%C8M%05%5C0%19%BD%04%3F" string(41) "x%DAs%CE%CF-%28J-.V%C8M%05%00%19%BD%04%3F" ---------------------------------------^^^ ------------------------------------------------------------------------ -- Edit this bug report at http://bugs.php.net/?id=36183&edit=1