From:             
Operating system: Irrelevant
PHP version:      Irrelevant
Package:          URL related
Bug Type:         Bug
Bug description:add parameter to parse_str to avoid sanitizing of root keys

Description:
------------
hi, this is probably an old behavior to make php backward compatible when
register_global was enabled

parse_str("hey all=1",$r); ---> array('hey_all' => '1');

parse_str is now widely used in xmlhttprequest communication and may cause
a lot of issues and waste of time when debugging because we are not able to
know how exactly what type of character sanitizing is made to root keys

yep, only root keys are sanitized because

parse_str("aaa[hey all]=1",$r); ---> array('aaa' => array('hey all',
'1'));

works like expected

so my request is not to change the default behavior of this function (and
how $_GET $_POST etc are populated)

but add another parameter to this function for who wants root keys parsed
without sanitizing

void parse_str ( string $str [, array &$arr ] [, bool $bwcompatible =
true])

thank you


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

Reply via email to