|  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Bug #76472 Array functions ignore object property permissions
Submitted: 2018-06-13 16:28 UTC Modified: -
Avg. Score:3.0 ± 0.0
Reproduced:1 of 1 (100.0%)
Same Version:1 (100.0%)
Same OS:0 (0.0%)
From: php at darkain dot com Assigned:
Status: Open Package: Scripting Engine problem
PHP Version: 7.2.6 OS: Debian 9
Private report: No CVE-ID: None
Have you experienced this issue?
Rate the importance of this bug to you:

 [2018-06-13 16:28 UTC] php at darkain dot com
Using foreach on an object, protected/private members are skipped over.

Using current(), next(), prev(), end(), reset() on an object, private/protected members are accessible.

These functions entirely bypass object property permissions.

Test script:
This effects all versions of PHP.


Add a Patch

Pull Requests

Add a Pull Request

PHP Copyright © 2001-2021 The PHP Group
All rights reserved.
Last updated: Wed Apr 14 18:01:23 2021 UTC