Modify

Opened 17 years ago

#1036 new defect

SCOPE_ONELEVEL vs SCOPE_SUBTREE

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

Description

I'm using ldapplugin-0.5.1dev_r1611 and have found that anonymous users are unable to browser and I cannot login with my admin ID. Looking into this further I've discovered that I can manually search my ldap tree for the uid=anonymous (for example) but using a scope = SCOPE_SUBTREE. However, when trac searches for this uid it's using a scope = SCOPE_ONELEVEL. I applied the following patch to get this working. Is this the correct to fix this or is there a parameter that can be used in trac.ini to modify the search depth?

--- api.py      2006-12-10 11:39:17.000000000 -0500
+++ api_20061220.py     2006-12-20 12:27:46.000000000 -0500
@@ -640,7 +640,7 @@
             raise TracError("Unable to open LDAP cnx: %s" % e[0]['desc'])
 
     def _search(self, basedn, filterstr='(objectclass=*)', attributes=None, 
-                scope=ldap.SCOPE_ONELEVEL):
+                scope=ldap.SCOPE_SUBTREE):
         """Search the LDAP directory"""
         try:
             if not self.__dict__.has_key('_ds') or not self.__dict__['_ds']:

Attachments (0)

Change History (0)

Modify Ticket

Change Properties
Set your email in Preferences
Action
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.