From:             
Operating system: gentoo-r4 #3
PHP version:      5.3.5
Package:          Apache related
Bug Type:         Bug
Bug description:$_GET variable not created if query string contains %00

Description:
------------
(I'm using PHP Version 5.3.4, but that one wasn't in the list...)



Consider the following query string:

/test.php?A=1&B=hello%00&C=3



This will generate the $_GET (and $_REQUEST) array:

(

  'A'=>1,

  'C'=>3

)



As you can see, B isn't included above. That's because the string contains
'%00'. This looks like a bug to me.



Sure, NULL characters are not common, but they should be valid, shouldn't
they? In this case I produced the string ending with '%00' by running
urlencode() on an mcrypt():ed string. "%95do%AFZF%ED%F6%C3%22%25%FC%00", if
you're interested.



Test script:
---------------
n/a

Expected result:
----------------
$_GET and $_REQUEST should look like this (replace 'NULL' with actual NULL
character):

array(

  'A'=>1,

  'B'=>'HelloNULL',

  'C'=>3

)



Actual result:
--------------
$_GET and $_REQUEST look like this:

array(

  'A'=>1,

  'C'=>3

)



-- 
Edit bug report at http://bugs.php.net/bug.php?id=53767&edit=1
-- 
Try a snapshot (PHP 5.2):            
http://bugs.php.net/fix.php?id=53767&r=trysnapshot52
Try a snapshot (PHP 5.3):            
http://bugs.php.net/fix.php?id=53767&r=trysnapshot53
Try a snapshot (trunk):              
http://bugs.php.net/fix.php?id=53767&r=trysnapshottrunk
Fixed in SVN:                        
http://bugs.php.net/fix.php?id=53767&r=fixed
Fixed in SVN and need be documented: 
http://bugs.php.net/fix.php?id=53767&r=needdocs
Fixed in release:                    
http://bugs.php.net/fix.php?id=53767&r=alreadyfixed
Need backtrace:                      
http://bugs.php.net/fix.php?id=53767&r=needtrace
Need Reproduce Script:               
http://bugs.php.net/fix.php?id=53767&r=needscript
Try newer version:                   
http://bugs.php.net/fix.php?id=53767&r=oldversion
Not developer issue:                 
http://bugs.php.net/fix.php?id=53767&r=support
Expected behavior:                   
http://bugs.php.net/fix.php?id=53767&r=notwrong
Not enough info:                     
http://bugs.php.net/fix.php?id=53767&r=notenoughinfo
Submitted twice:                     
http://bugs.php.net/fix.php?id=53767&r=submittedtwice
register_globals:                    
http://bugs.php.net/fix.php?id=53767&r=globals
PHP 4 support discontinued:          http://bugs.php.net/fix.php?id=53767&r=php4
Daylight Savings:                    http://bugs.php.net/fix.php?id=53767&r=dst
IIS Stability:                       
http://bugs.php.net/fix.php?id=53767&r=isapi
Install GNU Sed:                     
http://bugs.php.net/fix.php?id=53767&r=gnused
Floating point limitations:          
http://bugs.php.net/fix.php?id=53767&r=float
No Zend Extensions:                  
http://bugs.php.net/fix.php?id=53767&r=nozend
MySQL Configuration Error:           
http://bugs.php.net/fix.php?id=53767&r=mysqlcfg

Reply via email to