Category permission cache is calculated incorrectly on PHP5

1 view
Skip to first unread message

Alexander Obuhovich

Nov 17, 2009, 8:24:14 AM11/17/09
I've 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.

Best Regards,

Dmitry A.

Dec 16, 2009, 12:36:03 PM12/16/09
to In-Portal Bugs
Hi team,

Filed a new task for this, but looks like we would need to review our
Permissions approach as we've talked in other topics. It's just too
complex for 98% of users.

Anyway new task here:

449: Category Permission Cache is calculated incorrectly on PHP5

Patch attached and ready to be tested!

>  wrong_category_permissions_on_php5.patch
> 1KViewDownload
Reply all
Reply to author
0 new messages