#26817 [Asn->Csd]: http_build_query adds %00 everywhere and allows people to see every members..
| From: | iliaa@php.net | Date: | Tue, 06 Jan 2004 20:02:28 +0000 |
| Subject: | #26817 [Asn->Csd]: http_build_query adds %00 everywhere and allows people to see every members.. | ||
| References: | 1 | Groups: | php.bugs |
| Request: | Send a blank email to php-bugs+get-52870@lists.php.net to get a copy of this message | ||
ID: 26817
Updated by: iliaa@php.net
Reported By: nicos@php.net
-Status: Assigned
+Status: Closed
Bug Type: *Network Functions
Operating System: Any
PHP Version: 5CVS-2004-01-06 (dev)
Assigned To: iliaa
New Comment:
This bug has been fixed in CVS.
Snapshots of the sources are packaged every three hours; this change
will be in the next snapshot. You can grab the snapshot at
http://snaps.php.net/.
Thank you for the report, and for helping us make PHP better.
Previous Comments:
------------------------------------------------------------------------
[2004-01-06 12:35:03] nicos@php.net
Description:
------------
The http_build_query() function allows people to see every members of
an object (even private/protected) and it adds strange %00 in the
result after every private member (like \0 is converted in hex.).
Reproduce code:
---------------
class test {
private $foo;
private $bar;
function __constructor() {
$bar = 'meuh';
$foo = 'lala';
}
$obj = new test;
var_dump(http_build_query($obj));
Expected result:
----------------
It should ignore privates/protected.
Actual result:
--------------
It doesn't ignore private/protected and it adds %00 at the end of every
private/protected members.
------------------------------------------------------------------------
--
Edit this bug report at http://bugs.php.net/?id=26817&edit=1