Description

The dict_groups on disk cache is not invalidated appropriately impacting the use of ACL groups.

Steps to reproduce

  1. Modify a Group.
  2. Note that the dict_groups is not updated in a timely manner.

Example

Details

MoinMoin Version

moin 1.3.1

OS and Version

Linux 2.4.21-27

Python Version

Python 2.4

Server Setup

Apache 2.0.52

Server Details

Workaround

*** wikidicts.py        2005-01-19 10:00:10.000000000 -0800
--- wikidicts.py.orig   2004-12-08 02:28:32.000000000 -0800
***************
*** 325,331 ****
                  dump = 1
  
          # everything is ok and nothing changed
!         if (lastchange < self.namespace_timestamp and dump==0):
              return
          
          # FIXME: Should be compiled only once, and cached in cfg
--- 325,332 ----
                  dump = 1
  
          # everything is ok and nothing changed
!         if (lastchange < wikiutil.timestamp2version(self.namespace_timestamp)
!             and dump==0):
              return
          
          # FIXME: Should be compiled only once, and cached in cfg
***************
*** 333,339 ****
          group_re = re.compile(self.cfg.page_group_regex)
          
          # check for new groups / dicts from time to time...
!         if now - self.namespace_timestamp >= wikiutil.timestamp2version(60):
              # Get all pages in the wiki - without user filtering
              pagelist = self.request.rootpage.getPageList(user='')
  
--- 334,340 ----
          group_re = re.compile(self.cfg.page_group_regex)
          
          # check for new groups / dicts from time to time...
!         if now - self.namespace_timestamp >= 60:
              # Get all pages in the wiki - without user filtering
              pagelist = self.request.rootpage.getPageList(user='')
  
***************
*** 369,375 ****
  
          # check if groups / dicts have been modified on disk
          for pagename in self.dictdict:
!             if Page.Page(self.request, pagename).mtime_usecs() >= self.pageupd
ate_timestamp:
                  if dict_re.search(pagename):
                      self.adddict(self.request, pagename)
                  elif group_re.search(pagename):
--- 370,376 ----
  
          # check if groups / dicts have been modified on disk
          for pagename in self.dictdict:
!             if Page.Page(self.request, pagename).mtime_usecs() >= wikiutil.tim
estamp2version(self.pageupdate_timestamp):
                  if dict_re.search(pagename):
                      self.adddict(self.request, pagename)
                  elif group_re.search(pagename):

Plan


CategoryMoinMoinBugFixed

MoinMoin: MoinMoinBugs/DictGroupsCacheTimestampInvalidationBroken (last edited 2007-10-29 19:22:07 by localhost)