Bug #54527 [NEW]: When %00 on POST deletes key-value pair
From:
Operating system: Linux kernel:2.6.18-194.26.1.el5
PHP version: Irrelevant
Package: Unknown/Other Function
Bug Type: Bug
Bug description:When %00 on POST deletes key-value pair
Description:
------------
When posting %00, it does not add it to $_POST or $_REQUEST arrays.
Example:
POST http://kemio.com.ar/bug.php HTTP/1.1
Host: kemio.com.ar
Accept: text/html,application/xhtml+xml,application/xml;q=0.9,*/*;q=0.8
Content-Type: application/x-www-form-urlencoded
User-Agent: Mozilla/5.0 (Windows NT 6.1; rv:2.0b11) Gecko/20100101
Firefox/4.0b11
Content-Length: 15
Connection: Keep-Alive
uno=1%002&dos=2
Test script:
---------------
...
<tr><th colspan="2">$_POST</th></tr>
<?php
foreach($_POST as $k=>$v)
print("<tr><th>$k</th><td>$v</td></tr>\n");
?><tr><th colspan="2">$_SERVER</th></tr>
...
Expected result:
----------------
...
<tr><th colspan="2">$_POST</th></tr>
<tr><th>uno</th><td>1</td></tr>
<tr><th>dos</th><td>2</td></tr>
<tr><th colspan="2">$_SERVER</th></tr>
...
Actual result:
--------------
...
<tr><th colspan="2">$_POST</th></tr>
<tr><th>dos</th><td>2</td></tr>
<tr><th colspan="2">$_SERVER</th></tr>
...
--
Edit bug report at http://bugs.php.net/bug.php?id=54527&edit=1
--
Try a snapshot (PHP 5.2): http://bugs.php.net/fix.php?id=54527&r=trysnapshot52
Try a snapshot (PHP 5.3): http://bugs.php.net/fix.php?id=54527&r=trysnapshot53
Try a snapshot (trunk): http://bugs.php.net/fix.php?id=54527&r=trysnapshottrunk
Fixed in SVN: http://bugs.php.net/fix.php?id=54527&r=fixed
Fixed in SVN and need be documented: http://bugs.php.net/fix.php?id=54527&r=needdocs
Fixed in release: http://bugs.php.net/fix.php?id=54527&r=alreadyfixed
Need backtrace: http://bugs.php.net/fix.php?id=54527&r=needtrace
Need Reproduce Script: http://bugs.php.net/fix.php?id=54527&r=needscript
Try newer version: http://bugs.php.net/fix.php?id=54527&r=oldversion
Not developer issue: http://bugs.php.net/fix.php?id=54527&r=support
Expected behavior: http://bugs.php.net/fix.php?id=54527&r=notwrong
Not enough info: http://bugs.php.net/fix.php?id=54527&r=notenoughinfo
Submitted twice: http://bugs.php.net/fix.php?id=54527&r=submittedtwice
register_globals: http://bugs.php.net/fix.php?id=54527&r=globals
PHP 4 support discontinued: http://bugs.php.net/fix.php?id=54527&r=php4
Daylight Savings: http://bugs.php.net/fix.php?id=54527&r=dst
IIS Stability: http://bugs.php.net/fix.php?id=54527&r=isapi
Install GNU Sed: http://bugs.php.net/fix.php?id=54527&r=gnused
Floating point limitations: http://bugs.php.net/fix.php?id=54527&r=float
No Zend Extensions: http://bugs.php.net/fix.php?id=54527&r=nozend
MySQL Configuration Error: http://bugs.php.net/fix.php?id=54527&r=mysqlcfg
Thread (4 messages)
- qiq9 at eloy dot serralaban dot com dot ar