mirror of
https://github.com/cwinfo/powerdns-admin.git
synced 2025-01-07 10:55:40 +00:00
Merge pull request #484 from genericpenguin/genericpenguin-escape-chars-groupsearchfilter
escape special chars when creating group filter.
This commit is contained in:
commit
ae7b41ece2
@ -171,7 +171,7 @@ class User(db.Model):
|
|||||||
whether a user is allowed to enter or not
|
whether a user is allowed to enter or not
|
||||||
"""
|
"""
|
||||||
LDAP_BASE_DN = Setting().get('ldap_base_dn')
|
LDAP_BASE_DN = Setting().get('ldap_base_dn')
|
||||||
groupSearchFilter = "(&(objectcategory=group)(member=%s))" % groupDN
|
groupSearchFilter = "(&(objectcategory=group)(member=%s))" % ldap.filter.escape_filter_chars(groupDN)
|
||||||
result = [groupDN]
|
result = [groupDN]
|
||||||
try:
|
try:
|
||||||
groups = self.ldap_search(groupSearchFilter, LDAP_BASE_DN)
|
groups = self.ldap_search(groupSearchFilter, LDAP_BASE_DN)
|
||||||
|
Loading…
Reference in New Issue
Block a user