How so? I'm honestly curious here. My permissions are stored in page_restrictions. Its just a simple group read/can't read thing (only groups in the field can read a page. Unless the field is blank, in which case anyone can). I put the restrictions checking in Revision::getText() and Title::getText(). This is working for edit text, history text, etc. The only exception is for the main node itself- there it works only after I edit the page (so if I edit the page, then read it, it works. If I just protect it without editing, it fails). Putting in the fake cache miss seems to fix that bug. What am I missing?
Gabe
-----Original Message----- From: wikitech-l-bounces@wikimedia.org [mailto:wikitech-l-bounces@wikimedia.org] On Behalf Of Brion Vibber Sent: Friday, November 18, 2005 12:07 PM To: Wikimedia developers Subject: Re: [Wikitech-l] Parser caching
Sechan, Gabe wrote:
Does the parser cache the results of pages after parsing them? If so, is there a quick place I could turn it off for certain pages? Such as pretending that they cache miss? The parsing is messing up my read protections on pages- the permissions are working perfectly on special pages like edit or history that try to access the page, but don't always protect the node itself unless I edit it after protecting it.
If this is causing a problem for you, your permissions scheme is inherently flawed and is probably a huge security hole.
-- brion vibber (brion @ pobox.com)
Sechan, Gabe wrote:
How so? I'm honestly curious here.
Me, too, it sounds like all that's happening is it's taking a cache flush for the "this page protected" message to show up instead of the regular content. In fact, for my project I've just turned off client-side caching for the moment, since its been a significant source of problems. I'll no doubt have to revisit that as more people start using my site. :)
Regards, Ben Garney Torque Technologies Director
Sechan, Gabe wrote:
How so? I'm honestly curious here. My permissions are stored in page_restrictions. Its just a simple group read/can't read thing (only groups in the field can read a page. Unless the field is blank, in which case anyone can). I put the restrictions checking in Revision::getText() and Title::getText().
Be very careful; this will prevent all internal functions from loading text properly, and could result in permanent data corruption on internal maintenance processes (compression/uncompression for instance, backup data dumps, perhaps future upgrades).
More generally about the parser cache; if you add per-user changes that affect rendering you need to take this into account in the parser cache option hash. See User.php.
-- brion vibber (brion @ pobox.com)
wikitech-l@lists.wikimedia.org