Modify

Opened 4 years ago

Last modified 4 years ago

#8335 new defect

Connections erroneously closed when using mod_wsgi

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

Description (last modified by rjollos)

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

    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 
    677677 
    678678            # Following methods moved from LdapUtil since many of them really need access to the connection 

Attachments (0)

Change History (1)

comment:1 Changed 4 years ago by rjollos

  • Description modified (diff)

Add Comment

Modify Ticket

Action
as new .
Author


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

 
Note: See TracTickets for help on using tickets.