Category Permission Cache is calculated incorrectly on PHP5

Components

Labels

Description

Noticed that allow/deny category permissions are used for categories,
then they are incorrectly inherited (at least CATEGORY.VIEW permission). To
inherit permission kPermCacheUpdater class assigns permission object without
reference to copy it. This approach works in PHP4, because "=" is used
instead of "=&". PHP5 always passes objects by reference even if "=&"
operator is not used. This way we got random inheritance logic.

To solve this in PHP5 "clone" operator is used, but since this should work
in PHP4 too, then serialize/unserialize is used.

Context Information

None

Additional information (do not use)

Tested on another project, but should be tasted on 5.0.2 as well.

Attachments

1

Activity

Dmitry Andrejev January 12, 2010 at 4:01 AM

Closing completed tasks.

Alex December 20, 2009 at 1:00 PM

Fix committed to [b]5.0.x branch/b. Commit Message:

Fixes #0000449: Category Permission Cache is calculated incorrectly on PHP5

Dmitry Andrejev December 20, 2009 at 7:38 AM

Tested OK, please commit

Fixed

Details

Priority

Assignee

Reporter

Patch Instructions

Patches must be submitted through Phabricator.

External issue ID

External issue URL

Fix versions

Affects versions

Created December 16, 2009 at 5:35 PM
Updated December 29, 2024 at 9:23 PM
Resolved January 12, 2010 at 4:01 AM