Req #65252 [Opn]: Input string parsing - allow ' ' and '.' chars as hash key
| From: | yohgaki@php.net | Date: | Fri, 19 Jul 2013 22:59:32 +0000 |
| Subject: | Req #65252 [Opn]: Input string parsing - allow ' ' and '.' chars as hash key | ||
| References: | 1 | Groups: | php.bugs |
| Request: | Send a blank email to php-bugs+get-180360@lists.php.net to get a copy of this message | ||
Edit report at https://bugs.php.net/bug.php?id=65252&edit=1
ID: 65252
Updated by: yohgaki@php.net
Reported by: matti dot jarvinen at nitroid dot fi
-Summary: Input string parsing
+Summary: Input string parsing - allow ' ' and '.' chars as
hash key
Status: Open
Type: Feature/Change Request
Package: URL related
Operating System: *
-PHP Version: 5.4.17
+PHP Version: master
Block user comment: N
Private report: N
New Comment:
This may break apps, but request is debatable.
Previous Comments:
------------------------------------------------------------------------
[2013-07-12 13:33:24] matti dot jarvinen at nitroid dot fi
Description:
------------
Since register_globals has been removed in PHP 5.4.0 there should be no reason other than legacy why
input variables ($_POST, $_GET, $_FILES, $_COOKIE, $_REQUEST) can not have keys containing following
characters
chr(32) ( ) (space)
chr(46) (.) (dot)
Documentation states that only . is changed to _ but same goes for above characters.
http://www.php.net/manual/en/language.variables.external.php
Test script:
---------------
<form method="POST">
<input type="text" name="foo bar" value="spaced" />
<input type="text" name="foo.bar" value="dotted" />
<input type="submit" value="send" />
</form>
<?php
if(isset($_POST))
{
print_r($_POST);
}
?>
Expected:
array(
"foo bar"=>'spaced',
"foo.bar"=>'dotted'
);
Actual result:
array(
"foo_bar"=>'dotted'
);
------------------------------------------------------------------------
--
Edit this bug report at https://bugs.php.net/bug.php?id=65252&edit=1