Changes between Initial Version and Version 1 of Ticket #13490, comment 6


Ignore:
Timestamp:
Nov 28, 2018, 11:57:48 PM (5 years ago)
Author:
Jun Omae
Comment:

Legend:

Unmodified
Added
Removed
Modified
  • Ticket #13490, comment 6

    initial v1  
    33{{{#!diff
    44diff --git a/ldapacctmngrplugin/trunk/ldapacctmngrplugin/security/ldapstore.py b/ldapacctmngrplugin/trunk/ldapacctmngrplugin/security/ldapstore.py
    5 index 2ee361972..a2b670e73 100644
     5index 2ee361972..8c39c4768 100644
    66--- a/ldapacctmngrplugin/trunk/ldapacctmngrplugin/security/ldapstore.py
    77+++ b/ldapacctmngrplugin/trunk/ldapacctmngrplugin/security/ldapstore.py
     
    2424                 con = self.init_connection()
    2525-                resp = con.search_s(base, ldap.SCOPE_SUBTREE, filter, ['dn'])
    26 +                resp = self._ldap_search_user(user, ['dn'])
     26+                resp = self._ldap_search_user(con, user, ['dn'])
    2727
    2828                 # Added to prevent empty password authentication (some server allows that)
     
    3535+        con = self.init_connection()
    3636+        try:
    37 +            resp = self._ldap_search_user(user, ['dn'])
     37+            resp = self._ldap_search_user(con, user, ['dn'])
    3838+            return len(resp) != 0
    3939+        finally:
     
    5252+        return con.search_s(self.user_searchbase, ldap.SCOPE_SUBTREE, filter_,
    5353+                            attrs)
    54 
    5554}}}