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
Welcome back! If you're the original bug submitter, here's where you can edit the bug or add additional notes.
If this is not your bug, you can add a comment by following this link.
If this is your bug, but you forgot your password, you can retrieve your password here.
Password:
Status:
Package:
Bug Type:
Summary:
From: e dot ehritt at web dot de
New email:
PHP Version: OS:

 

 [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: Thu Mar 28 23:01:26 2024 UTC