mirror of
https://github.com/cwinfo/powerdns-admin.git
synced 2024-12-28 14:05:41 +00:00
Fix issue with LDAP search filter. It is necessary to bracket the expression with additional filter conditions
This commit is contained in:
parent
b6ed658cbd
commit
6f4cc42805
@ -188,7 +188,7 @@ class User(db.Model):
|
|||||||
|
|
||||||
searchFilter = "(&(objectcategory=person)(samaccountname=%s))" % self.username
|
searchFilter = "(&(objectcategory=person)(samaccountname=%s))" % self.username
|
||||||
if LDAP_TYPE == 'ldap':
|
if LDAP_TYPE == 'ldap':
|
||||||
searchFilter = "(&(%s=%s)%s)" % (LDAP_USERNAMEFIELD, self.username, LDAP_FILTER)
|
searchFilter = "(&(%s=%s)(%s))" % (LDAP_USERNAMEFIELD, self.username, LDAP_FILTER)
|
||||||
logging.info('Ldap searchFilter "%s"' % searchFilter)
|
logging.info('Ldap searchFilter "%s"' % searchFilter)
|
||||||
|
|
||||||
result = self.ldap_search(searchFilter, LDAP_SEARCH_BASE)
|
result = self.ldap_search(searchFilter, LDAP_SEARCH_BASE)
|
||||||
|
Loading…
Reference in New Issue
Block a user