[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):
  File
"/home/chrism/projects/efr/instances/zope/Products/PluggableAuthService/PluggableAuthService.py", line 722, in _extractUserIds
    user_id, name = auth.authenticateCredentials(
  File
"/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:
/home/dixonhughes_com/cvs_efr/Products/PluggableAuthService/plugins/ZODBUserManager.py,v
retrieving revision 1.1.1.1
diff -r1.1.1.1 ZODBUserManager.py
91c91
<             return None
---
>             return None, None
94c94,97
<         reference = self._user_passwords[ userid ]
---
>         reference = self._user_passwords.get(userid)
>         if reference is None:
>             return None, None
>
105c108
<         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