|
php.net | support | documentation | report a bug | advanced search | search howto | statistics | random bug | login |
PatchesPull RequestsHistoryAllCommentsChangesGit/SVN commits
[2015-09-02 10:14 UTC] kalle@php.net
-Status: Open
+Status: Not a bug
-Type: Security
+Type: Bug
[2015-09-02 10:14 UTC] kalle@php.net
[2015-09-02 13:37 UTC] incubeftw at gmail dot com
[2015-09-02 13:57 UTC] rasmus@php.net
[2015-09-02 15:31 UTC] stas@php.net
-Package: PHP Language Specification
+Package: Scripting Engine problem
|
|||||||||||||||||||||||||||
Copyright © 2001-2026 The PHP GroupAll rights reserved. |
Last updated: Thu Oct 08 04:00:01 2026 UTC |
Description: ------------ You can access any variable READ-ONLY on every class by dumping it. Getting it's value is even easier since you can just cast it to an array and then dump it to file. It does NOT matter if it is a protected variable or not. Test script: --------------- <?php class A { private $mysqlUser = 'root'; protected $mysqlPassword = 'test'; private $mysqlDatabase = 'myDatabase'; } $classA = new A(); echo "<pre>"; // Exploit #1 var_dump($classA); // Exploit #2 foreach((array)$classA as $x => $y) { echo "X => ".$x." Y => ".$y."\n"; }