searching the dav lock manager is broken

Bug #369796 reported by Godefroid Chapelle
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
Zope 2
Invalid
Low
Unassigned

Bug Description

Some searches in Dav lock manager fail :

Zope 2.10.7

2009-04-24T09:51:02 ERROR Zope.SiteErrorLog http://localhost:21080/Control_Panel/DavLocks/manage_main
Traceback (innermost last):
  Module ZPublisher.Publish, line 119, in publish
  Module ZPublisher.mapply, line 88, in mapply
  Module ZPublisher.Publish, line 42, in call_object
  Module Shared.DC.Scripts.Bindings, line 313, in __call__
  Module Shared.DC.Scripts.Bindings, line 350, in _bindAndExec
  Module App.special_dtml, line 178, in _exec
  Module DocumentTemplate.DT_Let, line 75, in render
  Module DocumentTemplate.DT_Util, line 196, in eval
   - __traceback_info__: from_path
  Module <string>, line 0, in ?
  Module App.DavLockManager, line 57, in findLockedObjects
  Module App.DavLockManager, line 103, in _findapply
  Module App.DavLockManager, line 103, in _findapply
  Module App.DavLockManager, line 103, in _findapply
  Module App.DavLockManager, line 103, in _findapply
  Module App.DavLockManager, line 98, in _findapply
  Module webdav.LockItem, line 104, in getCreatorPath
TypeError: unpack non-sequence

Line 104 of webdav.LockItem is :

        db, name = self._creator

self._creator is created with line 86 in same file

        self._creator = ownerInfo(creator)

line 296 of AccessControl.Owned :

def ownerInfo(user, getattr=getattr):
    if user is None:
        return None
    uid=user.getId()
    if uid is None: return uid

This shows that ownerInfo can return None (not a tuple).

Iow, getCreatorPath needs to be fixed to take this case in account.

I suspect that this has to do with anonymous locks...

If last sentence is right, as getCreatorPath is only used by Dav Lock Manager,

Adding

  if self._creator is None:
      return "anonymous lock"

before the unpacking should fix the problem.

description: updated
description: updated
Changed in zope2:
importance: Undecided → Low
status: New → Confirmed
Revision history for this message
Colin Watson (cjwatson) wrote :

The zope2 project on Launchpad has been archived at the request of the Zope developers (see https://answers.launchpad.net/launchpad/+question/683589 and https://answers.launchpad.net/launchpad/+question/685285). If this bug is still relevant, please refile it at https://github.com/zopefoundation/zope2.

Changed in zope2:
status: Confirmed → Invalid
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.