Opened 13 years ago

Last modified 13 years ago

#8335 new defect

Connections erroneously closed when using mod_wsgi — at Initial Version

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

Description

When multiple connections are made concurrently, an error may occur:

"AttributeError: 'bool' object has no attribute 'compare_s'". This is most likely a concurrency issue. Without delving too deep into the source code, changing the following line seems to fix the issue:

--- api.py 2010-12-23 10:41:01.000000000 +0100 +++ api.py.orig 2010-11-16 16:31:34.000000000 +0100 @@ -668,11 +668,11 @@

return cr

except ldap.NO_SUCH_OBJECT, e:

self.log.warn("LDAP error: %s (%s)", e[0]desc?, dn)

  • return False;

+ return False;

except ldap.LDAPError, e:

if attribute != 'member':

  • self.log.error("LDAP error: %s (%s - %s - %s) [_compare]", e[0]desc?, dn, attribute, value)
  • self._ds = False

+ self.log.error("LDAP error: %s (%s - %s - %s) [_compare]", e[0]desc?, dn, attribute, value) + self._ds = False

return False

# Following methods moved from LdapUtil since many of them really need access to the connection

Change History (0)

Note: See TracTickets for help on using tickets.