Modify

Opened 10 years ago

Closed 10 years ago

#11863 closed defect (cantfix)

AttributeError: 'LdapAuthStore' object has no attribute 'util'

Reported by: Varriount Owned by: igoltz
Priority: high Component: LdapAuthStorePlugin
Severity: major Keywords:
Cc: Ryan J Ollos, Steffen Hoffmann Trac Release: 1.0

Description

When using the LDAPAuthStorePlugin in combination with the AccountManagerPlugin and LdapPlugin, trac throws the following when logging in:

Traceback (most recent call last):
  File "/usr/local/lib/python2.7/site-packages/trac/web/api.py", line 514, in send_error
    data, 'text/html')
  File "/usr/local/lib/python2.7/site-packages/trac/web/chrome.py", line 968, in render_template
    message = Markup(req.session.pop('chrome.%s.%d'
  File "/usr/local/lib/python2.7/site-packages/trac/web/api.py", line 316, in __getattr__
    value = self.callbacks[name](self)
  File "/usr/local/lib/python2.7/site-packages/trac/web/main.py", line 268, in _get_session
    return Session(self.env, req)
  File "/usr/local/lib/python2.7/site-packages/trac/web/session.py", line 200, in __init__
    if req.authname == 'anonymous':
  File "/usr/local/lib/python2.7/site-packages/trac/web/api.py", line 316, in __getattr__
    value = self.callbacks[name](self)
  File "/usr/local/lib/python2.7/site-packages/trac/web/main.py", line 135, in authenticate
    authname = authenticator.authenticate(req)
  File "build/bdist.openbsd-5.4-i386/egg/acct_mgr/util.py", line 82, in wrap
    return func(self, *args, **kwds)
  File "build/bdist.openbsd-5.4-i386/egg/acct_mgr/web_ui.py", line 338, in authenticate
    user = self._remote_user(req)
  File "build/bdist.openbsd-5.4-i386/egg/acct_mgr/web_ui.py", line 684, in _remote_user
    if acctmgr.check_password(user, password) == True:
  File "build/bdist.openbsd-5.4-i386/egg/acct_mgr/api.py", line 259, in check_password
    valid = store.check_password(user, password)
  File "build/bdist.openbsd-5.4-i386/egg/ldapauthstore/ldap_store.py", line 123, in check_password
    dn = self.util.user_attrdn(user)
AttributeError: 'LdapAuthStore' object has no attribute 'util'

Attachments (0)

Change History (6)

comment:1 Changed 10 years ago by Ryan J Ollos

Do you have the following in your trac.ini?:

[ldap]
enable = true

comment:2 in reply to:  1 Changed 10 years ago by Varriount

Replying to rjollos:

Do you have the following in your trac.ini?:

[ldap]
enable = true

My bad, it wasn't enabled. In any case, is it possible to add a warning or message saying that the LdapAuthStore is being used when not enabled?

comment:3 Changed 10 years ago by Ryan J Ollos

Cc: Ryan J Ollos Steffen Hoffmann added; anonymous removed

I'm unsure of why the enable option is needed. If you don't wish to use the component, either disable it in the admin panel or remove LdapAuthStore from [account-manager] password_store, right?

igoltz: what do you think about just removing the option?

comment:4 Changed 10 years ago by igoltz

LdapAuthStore needs the LdapPlugin and also use it's ini section [ldap] with own extensions. I don't know much of the LdapPlugin, but guess this entry is needed [ldap] enable = true

comment:5 Changed 10 years ago by Ryan J Ollos

I didn't notice that the enable option is associated with the LdapPlugin rather than the LdapAuthStorePlugin.

When [ldap] enable is not true, if the aim is to force disable the LdapAuthStorePlugin, a better approach could be to remove the Component from the registry.

comment:6 Changed 10 years ago by igoltz

Resolution: cantfix
Status: newclosed

LdapAuthStorePlugin needs rewriting to get rid of LdapPlugin

Modify Ticket

Change Properties
Set your email in Preferences
Action
as closed The owner will remain igoltz.
The resolution will be deleted. Next status will be 'reopened'.

Add Comment


E-mail address and name can be saved in the Preferences.

 
Note: See TracTickets for help on using tickets.