Opened 10 years ago

#1907 new defect

bind_passwd special characters

Reported by: candrews@… Owned by: Emmanuel Blot
Priority: normal Component: LdapPlugin
Severity: normal Keywords:
Cc: Trac Release: 0.10


My LDAP server needs to have an authenticated bind. I know this works, as I have other services on the same machine that use this login information. BTW, the LDAP server is Active Directory.

Here is the login information from the [ldap] section of trac.ini:

I suspect those special characters, either the @ signs, the !, or something else, is messing with the plugin's ability to authenticate, as when I hit trac with the ldapplugin enabled, I get this error:

Traceback (most recent call last):
  File "/var/lib/python-support/python2.5/trac/web/", line 406, in dispatch_request
  File "/var/lib/python-support/python2.5/trac/web/", line 183, in dispatch
    req.perm = PermissionCache(self.env, req.authname)
  File "/var/lib/python-support/python2.5/trac/", line 263, in __init__
    self.perms = PermissionSystem(env).get_user_permissions(username)
  File "/var/lib/python-support/python2.5/trac/", line 227, in get_user_permissions
    for perm in
  File "/var/lib/python-support/python2.5/trac/", line 106, in get_user_permissions
    subjects += list(provider.get_permission_groups(username))
  File "build/bdist.linux-i686/egg/ldapplugin/", line 108, in get_permission_groups
    ldapgroups = self._get_user_groups(username)
  File "build/bdist.linux-i686/egg/ldapplugin/", line 149, in _get_user_groups
    ldap_groups = self._ldap.get_groups()
  File "build/bdist.linux-i686/egg/ldapplugin/", line 541, in get_groups
    groups = self.get_dn(self.basedn, 'objectclass=' + self.groupname)
  File "build/bdist.linux-i686/egg/ldapplugin/", line 564, in get_dn
    sr = self._search(basedn, filterstr, ['dn'], ldap.SCOPE_SUBTREE)
  File "build/bdist.linux-i686/egg/ldapplugin/", line 647, in _search
  File "build/bdist.linux-i686/egg/ldapplugin/", line 640, in _open
    raise TracError("Unable to open LDAP cnx: %s" % e[0]['desc'])
TracError: Unable to open LDAP cnx: Invalid credentials

I suspect that I may need to escape certain characters somehow, but I haven't been able to find (or figure out) what to do.

Attachments (0)

Change History (0)

Modify Ticket

as new The owner will remain Emmanuel Blot.

Add Comment

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

Note: See TracTickets for help on using tickets.