Browse Source

HUE-1183 [useradmin] Hue assumes that the base_dn string is case sensitive.

Abraham Elmahrek 12 năm trước cách đây
mục cha
commit
1e56aa5
1 tập tin đã thay đổi với 1 bổ sung1 xóa
  1. 1 1
      apps/useradmin/src/useradmin/ldap_access.py

+ 1 - 1
apps/useradmin/src/useradmin/ldap_access.py

@@ -93,7 +93,7 @@ class LdapConnection(object):
     if find_by_dn:
       search_dn = re.sub(r'(\w+=)', lambda match: match.group(0).upper(), name)
 
-      if not search_dn.endswith(re.sub(r'(\w+=)', lambda match: match.group(0).upper(), base_dn)):
+      if not search_dn.upper().endswith(base_dn.upper()):
         raise RuntimeError("Distinguished Name provided does not contain configured Base DN. Base DN: %(base_dn)s, DN: %(dn)s" % {
           'base_dn': base_dn,
           'dn': search_dn