Univention Bugzilla – Attachment 9091 Details for
Bug 45134
univention-adsearch misparses multi-attribute filters
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Requests
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
patch
45134.patch (text/plain), 1.08 KB, created by
Florian Best
on 2017-08-04 11:35:21 CEST
(
hide
)
Description:
patch
Filename:
MIME Type:
Creator:
Florian Best
Created:
2017-08-04 11:35:21 CEST
Size:
1.08 KB
patch
obsolete
>diff --git a/services/univention-ad-connector/univention-adsearch b/services/univention-ad-connector/univention-adsearch >index 277b445..c5fdba5 100755 >--- a/services/univention-ad-connector/univention-adsearch >+++ b/services/univention-ad-connector/univention-adsearch >@@ -34,6 +34,7 @@ > > import sys > import os >+import re > import univention.config_registry > from ldap.controls import LDAPControl > from ldap.controls import SimplePagedResultsControl >@@ -193,13 +194,9 @@ page_size = 1000 > > lc2 = SimplePagedResultsControl(True, page_size, '') > >-filter = "" > >-for i in filter_tmp.split(","): >- j = i.split("=") >- if j[0] == "objectSid": >- j[1] = encode_object_sid_to_binary_ldapfilter(j[1]) >- filter += (j[0] + "=" + j[1]) >+objectsid_pattern = re.compile('objectsid=([^)]+)', flags=re.I) >+filter = objectsid_pattern.sub(lambda m: 'objectSid=%s' % encode_object_sid_to_binary_ldapfilter(m.group(1)), filter_tmp) > > if filter_attributes: > msgid = lo.search_ext(configRegistry['%s/ad/ldap/base' % CONFIGBASENAME], ldap.SCOPE_SUBTREE, filter.encode('utf8'), filter_attributes, serverctrls=[lc1, lc2])
You cannot view the attachment while viewing its details because your browser does not support IFRAMEs.
View the attachment on a separate page
.
View Attachment As Diff
View Attachment As Raw
Actions:
View
|
Diff
Attachments on
bug 45134
: 9091