Req #65252 [NEW]: Input string parsing
| From: | matti dot jarvinen at nitroid dot fi | Date: | Fri, 12 Jul 2013 13:33:24 +0000 |
| Subject: | Req #65252 [NEW]: Input string parsing | ||
| Groups: | php.bugs | ||
| Request: | Send a blank email to php-bugs+get-180231@lists.php.net to get a copy of this message | ||
From: matti dot jarvinen at nitroid dot fi
Operating system: *
PHP version: 5.4.17
Package: URL related
Bug Type: Feature/Change Request
Bug description:Input string parsing
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 bug report at https://bugs.php.net/bug.php?id=65252&edit=1
--
Try a snapshot (PHP 5.4): https://bugs.php.net/fix.php?id=65252&r=trysnapshot54
Try a snapshot (PHP 5.3): https://bugs.php.net/fix.php?id=65252&r=trysnapshot53
Try a snapshot (trunk): https://bugs.php.net/fix.php?id=65252&r=trysnapshottrunk
Fixed in SVN: https://bugs.php.net/fix.php?id=65252&r=fixed
Fixed in release: https://bugs.php.net/fix.php?id=65252&r=alreadyfixed
Need backtrace: https://bugs.php.net/fix.php?id=65252&r=needtrace
Need Reproduce Script: https://bugs.php.net/fix.php?id=65252&r=needscript
Try newer version: https://bugs.php.net/fix.php?id=65252&r=oldversion
Not developer issue: https://bugs.php.net/fix.php?id=65252&r=support
Expected behavior: https://bugs.php.net/fix.php?id=65252&r=notwrong
Not enough info: https://bugs.php.net/fix.php?id=65252&r=notenoughinfo
Submitted twice: https://bugs.php.net/fix.php?id=65252&r=submittedtwice
register_globals: https://bugs.php.net/fix.php?id=65252&r=globals
PHP 4 support discontinued: https://bugs.php.net/fix.php?id=65252&r=php4
Daylight Savings: https://bugs.php.net/fix.php?id=65252&r=dst
IIS Stability: https://bugs.php.net/fix.php?id=65252&r=isapi
Install GNU Sed: https://bugs.php.net/fix.php?id=65252&r=gnused
Floating point limitations: https://bugs.php.net/fix.php?id=65252&r=float
No Zend Extensions: https://bugs.php.net/fix.php?id=65252&r=nozend
MySQL Configuration Error: https://bugs.php.net/fix.php?id=65252&r=mysqlcfg