Skip to content

Commit e75f11f

Browse files
bajwa-adobeadorton-adobe
authored andcommitted
Empty base_dn fix #582
Empty DN is valid DN for NetIQ eDirectory and AD Global Catalog.
1 parent 2850528 commit e75f11f

1 file changed

Lines changed: 4 additions & 0 deletions

File tree

user_sync/connector/directory_ldap.py

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -517,6 +517,10 @@ def is_dn_within_base_dn_scope(base_dn, dn):
517517
:param dn: str
518518
:return: bool
519519
"""
520+
# return true if base_dn is empty string such as global scope and no need to check user_dn is part of base_dn
521+
if (not (base_dn and base_dn.strip())):
522+
return True
523+
520524
split_base_dn = ldap3.utils.dn.parse_dn(base_dn.lower())
521525
split_dn = ldap3.utils.dn.parse_dn(dn.lower())
522526
if split_base_dn == split_dn[-len(split_base_dn):]:

0 commit comments

Comments
 (0)