Sec Bug->Req #73536 [Opn]: var_dump ignore private permitions in class
| From: | krakjoe@php.net | Date: | Wed, 16 Nov 2016 09:52:41 +0000 |
| Subject: | Sec Bug->Req #73536 [Opn]: var_dump ignore private permitions in class | ||
| References: | 1 | Groups: | php.bugs |
| Request: | Send a blank email to php-bugs+get-205398@lists.php.net to get a copy of this message | ||
Edit report at https://bugs.php.net/bug.php?id=73536&edit=1
ID: 73536
Updated by: krakjoe@php.net
Reported by: peter dot mlich at volny dot cz
Summary: var_dump ignore private permitions in class
Status: Open
-Type: Security
+Type: Feature/Change Request
Package: Unknown/Other Function
PHP Version: 5.6.28
Block user comment: N
Private report: Y
Previous Comments:
------------------------------------------------------------------------
[2016-11-16 08:49:08] peter dot mlich at volny dot cz
Description:
------------
---
From manual page: http://www.php.net/function.var-dump
---
var_dump ignore class permitions 'private'.
Php 5.5.12.
Cannot be upgraded, wamp server problem. But, its only for programing and testing. On server have
top version, but not run test code there.
Test script:
---------------
class classDb
{
private $table;
public $structure;
function __construct($structure)
{
$this->table = array(1,2,3);
}
}
$users_db = new classDb('classUser');
var_dump($users_db); // 2
var_dump($users_db->table); // 1
// 1 - Fatal error: Cannot access private property classDb::$table in C:\wamp\www\
// 2 - Show all + all in private $users_db->table :) easy for hackers
------------------------------------------------------------------------
--
Edit this bug report at https://bugs.php.net/bug.php?id=73536&edit=1