Category permission cache is calculated incorrectly on PHP5

1 view
Skip to first unread message

Alexander Obuhovich

unread,
Nov 17, 2009, 8:24:14 AM11/17/09
to in-port...@googlegroups.com
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,

http://www.in-portal.org
http://www.alex-time.com
wrong_category_permissions_on_php5.patch

Dmitry A.

unread,
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

http://tracker.in-portal.org/view.php?id=449


Patch attached and ready to be tested!


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