[Zope3-dev] securitypolicy bug

Roger Ineichen r.ineichen at projekt01.ch
Sat May 15 12:04:15 EDT 2004


Zope3 is running, but theres a small bug in 
src\zope\app\securitypolicy\zopepolicy.py", line 73, in checkPermission
    assert len(interaction.participations) == 1 # XXX
AttributeError: 'NoneType' object has no attribute 'participations'

If you start the server an connect with the browser, it popup's a 
login windows. In the background you see the ERROR Tracback.
It seems that we have at this time no interaction.

2004-05-15T17:56:05 ERROR SiteError http://localhost:8080/manage
Traceback (most recent call last):
  File
"C:\projektCompiler\Zope3\src\zope\app\publication\zopepublication.py", line
297, in handleException
    response.setBody(self.callObject(request, view))
  File
"C:\projektCompiler\Zope3\src\zope\app\publication\zopepublication.py", line
148, in callObject
    return mapply(ob, request.getPositionalArguments(), request)
  File "C:\projektCompiler\Zope3\src\zope\publisher\publish.py", line 113,
in mapply
    return debug_call(object, args)
  File "C:\projektCompiler\Zope3\src\zope\publisher\publish.py", line 119,
in debug_call
    return object(*args)
  File
"C:\projektCompiler\Zope3\src\zope\app\pagetemplate\simpleviewclass.py",
line 43, in __call__
    return self.index(*args, **kw)
  File
"C:\projektCompiler\Zope3\src\zope\app\pagetemplate\viewpagetemplatefile.py"
, line 68, in __call__
    return self.im_func(self.im_self, **kw)
  File
"C:\projektCompiler\Zope3\src\zope\app\pagetemplate\viewpagetemplatefile.py"
, line 48, in __call__
    return self.pt_render(namespace)
  File "C:\projektCompiler\Zope3\src\zope\pagetemplate\pagetemplate.py",
line 113, in pt_render
    context, output, tal=not source, strictinsert=0)()
  File "C:\projektCompiler\Zope3\src\zope\tal\talinterpreter.py", line 164,
in __call__
    self.interpret(self.program)
  File "C:\projektCompiler\Zope3\src\zope\tal\talinterpreter.py", line 207,
in interpret
    handlers[opcode](self, args)
  File "C:\projektCompiler\Zope3\src\zope\tal\talinterpreter.py", line 674,
in do_useMacro
    self.interpret(macro)
  File "C:\projektCompiler\Zope3\src\zope\tal\talinterpreter.py", line 207,
in interpret
    handlers[opcode](self, args)
  File "C:\projektCompiler\Zope3\src\zope\tal\talinterpreter.py", line 376,
in do_optTag_tal
    self.do_optTag(stuff)
  File "C:\projektCompiler\Zope3\src\zope\tal\talinterpreter.py", line 361,
in do_optTag
    return self.no_tag(start, program)
  File "C:\projektCompiler\Zope3\src\zope\tal\talinterpreter.py", line 356,
in no_tag
    self.interpret(program)
  File "C:\projektCompiler\Zope3\src\zope\tal\talinterpreter.py", line 207,
in interpret
    handlers[opcode](self, args)
  File "C:\projektCompiler\Zope3\src\zope\tal\talinterpreter.py", line 707,
in do_defineSlot
    self.interpret(block)
  File "C:\projektCompiler\Zope3\src\zope\tal\talinterpreter.py", line 207,
in interpret
    handlers[opcode](self, args)
  File "C:\projektCompiler\Zope3\src\zope\tal\talinterpreter.py", line 426,
in do_setLocal_tal
    self.engine.setLocal(name, self.engine.evaluateValue(expr))
  File "C:\projektCompiler\Zope3\src\zope\tales\tales.py", line 693, in
evaluate
    return expression(self)
  File "C:\projektCompiler\Zope3\src\zope\tales\expressions.py", line 207,
in __call__
    return self._eval(econtext)
  File "C:\projektCompiler\Zope3\src\zope\tales\expressions.py", line 194,
in _eval
    ob = self._subexprs[-1](econtext)
  File "C:\projektCompiler\Zope3\src\zope\tales\expressions.py", line 126,
in _eval
    ob = self._traverser(ob, element, econtext)
  File "C:\projektCompiler\Zope3\src\zope\app\pagetemplate\engine.py", line
46, in zopeTraverser
    request=getattr(econtext, 'request', None))
  File "C:\projektCompiler\Zope3\src\zope\app\traversing\adapters.py", line
119, in traverse
    curr = traversePathElement(curr, name, path, request=request)
  File "C:\projektCompiler\Zope3\src\zope\app\traversing\adapters.py", line
172, in traversePathElement
    next_item = traversable.traverse(nm, further_path)
  File "C:\projektCompiler\Zope3\src\zope\app\traversing\adapters.py", line
55, in traverse
    return subject[name]
  File "C:\projektCompiler\Zope3\src\zope\app\menu\browser\__init__.py",
line 36, in __getitem__
    self.request)
  File
"C:\projektCompiler\Zope3\src\zope\app\publisher\browser\globalbrowsermenuse
rvice.py", line 139, in getMenu
    v = traverser.traverseRelativeURL(
  File "C:\projektCompiler\Zope3\src\zope\app\publication\browser.py", line
37, in traverseRelativeURL
    ob, path = adapter.browserDefault(request)
  File "C:\projektCompiler\Zope3\src\zope\security\checker.py", line 138, in
check_getattr
    self.check(object, name)
  File "C:\projektCompiler\Zope3\src\zope\security\checker.py", line 165, in
check
    if policy.checkPermission(permission, object, interaction):
  File "C:\projektCompiler\Zope3\src\zope\app\securitypolicy\zopepolicy.py",
line 73, in checkPermission
    assert len(interaction.participations) == 1 # XXX
AttributeError: 'NoneType' object has no attribute 'participations'
127.0.0.1 - zope.anybody [15/May/2004:17:56:05 +0200] "GET /manage HTTP/1.1"
401 370 "" "Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.1)"

Regards
Roger Ineichen
_____________________________
END OF MESSAGE




More information about the Zope3-dev mailing list