|  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Bug #26817 http_build_query adds %00 everywhere and allows people to see every members..
Submitted: 2004-01-06 12:35 UTC Modified: 2004-01-06 15:02 UTC
From: Assigned: iliaa (profile)
Status: Closed Package: *Network Functions
PHP Version: 5CVS-2004-01-06 (dev) OS: Any
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:
Solve the problem:
47 + 12 = ?
Subscribe to this entry?

 [2004-01-06 12:35 UTC]
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;

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.


Add a Patch

Pull Requests

Add a Pull Request


AllCommentsChangesGit/SVN commitsRelated reports
 [2004-01-06 15:02 UTC]
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
Thank you for the report, and for helping us make PHP better.

PHP Copyright © 2001-2021 The PHP Group
All rights reserved.
Last updated: Tue Jan 19 17:01:24 2021 UTC