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
View Add Comment Developer Edit
Anyone can comment on a bug. Have a simpler test case? Does it work for you on a different platform? Let us know!
Just going to say 'Me too!'? Don't clutter the database with that please !
Your email address:
MUST BE VALID
Solve the problem:
7 + 47 = ?
Subscribe to this entry?

 
 [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-2024 The PHP Group
All rights reserved.
Last updated: Fri Apr 19 00:01:29 2024 UTC