Bug #54527 [Opn->Fbk]: When %00 on POST deletes key-value pair
| From: | aharvey@php.net | Date: | Tue, 19 Apr 2011 06:39:57 +0000 |
| Subject: | Bug #54527 [Opn->Fbk]: When %00 on POST deletes key-value pair | ||
| References: | 1 | Groups: | php.bugs |
| Request: | Send a blank email to php-bugs+get-160279@lists.php.net to get a copy of this message | ||
Edit report at http://bugs.php.net/bug.php?id=54527&edit=1
ID: 54527
Updated by: aharvey@php.net
Reported by: qiq9 at eloy dot serralaban dot com dot ar
Summary: When %00 on POST deletes key-value pair
-Status: Open
+Status: Feedback
Type: Bug
Package: Unknown/Other Function
Operating System: Linux kernel:2.6.18-194.26.1.el5
PHP Version: Irrelevant
Block user comment: N
Private report: N
New Comment:
Which SAPI, Web server and version of PHP are you using, and what is the
filter.default configuration setting set to in phpinfo()? Additionally,
do you have any extensions loaded that may change the way PHP operates,
such as Suhosin?
I can't reproduce this under Apache (using the apache2handler SAPI), for
the record.
Previous Comments:
------------------------------------------------------------------------
[2011-04-14 04:12:56] qiq9 at eloy dot serralaban dot com dot ar
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 this bug report at http://bugs.php.net/bug.php?id=54527&edit=1