Opened 7 years ago

Last modified 7 years ago

#8335 new defect

Connections erroneously closed when using mod_wsgi

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

Description (last modified by Ryan J Ollos)

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:

    old new  
    668668            return cr
    669669        except ldap.NO_SUCH_OBJECT, e:
    670670            self.log.warn("LDAP error: %s (%s)", e[0]['desc'], dn)
    671             return False;
     671            return False;   
    672672        except ldap.LDAPError, e:
    673673            if attribute != 'member':
    674                 self.log.error("LDAP error: %s (%s - %s - %s) [_compare]", e[0]['desc'], dn, attribute, value)
    675                 self._ds = False
     674              self.log.error("LDAP error: %s (%s - %s - %s) [_compare]", e[0]['desc'], dn, attribute, value)
     675            self._ds = False
    676676            return False
    678678            # Following methods moved from LdapUtil since many of them really need access to the connection

Attachments (0)

Change History (1)

comment:1 Changed 7 years ago by Ryan J Ollos

Description: modified (diff)

Modify Ticket

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