php.net |  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Bug #49975 malformation of request data
Submitted: 2009-10-23 17:27 UTC Modified: 2009-10-23 20:46 UTC
From: e dot ehritt at web dot de Assigned:
Status: Not a bug Package: *General Issues
PHP Version: 5.3.1RC2 OS:
Private report: No CVE-ID: None
 [2009-10-23 17:27 UTC] e dot ehritt at web dot de
Description:
------------
It occurs in all current versions
Incoming request data are malformed:


        POST / HTTP/1.1
        Host: localhost
        Content-Type: application/x-www-form-urlencoded
        Content-Length: 17

        a%5Bb%5Bc%5D%5D=d


Reproduce code:
---------------
<form action="s.php" method="post">
        <p>
                <input name="a[b[c]]" type="text"/>
                <input type="submit">
        </p>
</form>
#####################################################
<?php
# s.php
$a=array('a'=>array('b[c]'=>'d'));
print_r($_POST);
print_r($a);
?>

Expected result:
----------------
Array
(
    [a] => Array
        (
            [b[c]] => d
        )

)
Array
(
    [a] => Array
        (
            [b[c]] => d
        )

)

Actual result:
--------------
Array
(
    [a] => Array
        (
            [b[c] => d
        )

)
Array
(
    [a] => Array
        (
            [b[c]] => d
        )

)

So, I miss "]" in POST data.

Patches

Add a Patch

Pull Requests

Add a Pull Request

History

AllCommentsChangesGit/SVN commitsRelated reports
 [2009-10-23 20:46 UTC] sniper@php.net
Please do not submit the same bug more than once. An existing
bug report already describes this very problem. Even if you feel
that your issue is somewhat different, the resolution is likely
to be the same. 

Thank you for your interest in PHP.

See bug #48597
 
PHP Copyright © 2001-2019 The PHP Group
All rights reserved.
Last updated: Sat Dec 14 21:01:23 2019 UTC