[Zope-PAS] Authenticator errors...

Chris McDonough chrism at plope.com
Sat Nov 6 08:21:28 EST 2004

An error is emanated when visiting an object that contains a PAS
configured to authenticate from a ZODBUserManager and when the current
user is logged in via another (legacy) acl_users closer to the root. 

The error is:

2004-11-06T08:10:41 PROBLEM(100) PluggableAuthService
AuthenticationPlugin zodb_user_manager error
Traceback (most recent call last):
"/home/chrism/projects/efr/instances/zope/Products/PluggableAuthService/PluggableAuthService.py", line 722, in _extractUserIds
    user_id, name = auth.authenticateCredentials(
"/home/chrism/projects/efr/instances/zope/Products/PluggableAuthService/plugins/ZODBUserManager.py", line 94, in authenticateCredentials
    reference = self._user_passwords[ userid ]
KeyError: 'admin'

A patch that prevents it is:

Index: plugins/ZODBUserManager.py
RCS file:
retrieving revision
diff -r1.1.1.1 ZODBUserManager.py
<             return None
>             return None, None
<         reference = self._user_passwords[ userid ]
>         reference = self._user_passwords.get(userid)
>         if reference is None:
>             return None, None
<         return None
>         return None, None

Is this acceptable or should the PAS itself detect a None return value
from within _extractUserIds?


More information about the Zope-PAS mailing list