Bug #76472 [NEW]: Array functions ignore object property permissions

From: Date: Wed, 13 Jun 2018 16:28:26 +0000
Subject: Bug #76472 [NEW]: Array functions ignore object property permissions
Groups: php.bugs 
Request: Send a blank email to php-bugs+get-215703@lists.php.net to get a copy of this message
From:             php at darkain dot com
Operating system: Debian 9
PHP version:      7.2.6
Package:          Scripting Engine problem
Bug Type:         Bug
Bug description:Array functions ignore object property permissions

Description:
------------
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.

https://3v4l.org/5e6Ok


-- 
Edit bug report at https://bugs.php.net/bug.php?id=76472&edit=1
-- 
Try a snapshot (PHP 5.4):   https://bugs.php.net/fix.php?id=76472&r=trysnapshot54
Try a snapshot (PHP 5.5):   https://bugs.php.net/fix.php?id=76472&r=trysnapshot55
Try a snapshot (trunk):     https://bugs.php.net/fix.php?id=76472&r=trysnapshottrunk
Fixed in SVN:               https://bugs.php.net/fix.php?id=76472&r=fixed
Fixed in release:           https://bugs.php.net/fix.php?id=76472&r=alreadyfixed
Need backtrace:             https://bugs.php.net/fix.php?id=76472&r=needtrace
Need Reproduce Script:      https://bugs.php.net/fix.php?id=76472&r=needscript
Try newer version:          https://bugs.php.net/fix.php?id=76472&r=oldversion
Not developer issue:        https://bugs.php.net/fix.php?id=76472&r=support
Expected behavior:          https://bugs.php.net/fix.php?id=76472&r=notwrong
Not enough info:            https://bugs.php.net/fix.php?id=76472&r=notenoughinfo
Submitted twice:            https://bugs.php.net/fix.php?id=76472&r=submittedtwice
register_globals:           https://bugs.php.net/fix.php?id=76472&r=globals
PHP 4 support discontinued: https://bugs.php.net/fix.php?id=76472&r=php4
Daylight Savings:           https://bugs.php.net/fix.php?id=76472&r=dst
IIS Stability:              https://bugs.php.net/fix.php?id=76472&r=isapi
Install GNU Sed:            https://bugs.php.net/fix.php?id=76472&r=gnused
Floating point limitations: https://bugs.php.net/fix.php?id=76472&r=float
No Zend Extensions:         https://bugs.php.net/fix.php?id=76472&r=nozend
MySQL Configuration Error:  https://bugs.php.net/fix.php?id=76472&r=mysqlcfg



Thread (2 messages)

« previous php.bugs (#215703) next »