Univention Bugzilla – Bug 39343
Bad search filter: unknown_clients=*
Last modified: 2016-03-18 06:47:58 CET
Die Ausführung des Kommandos udm/nav/object/query navigation ist fehlgeschlagen: Traceback (most recent call last): File "%PY2.7%/univention/management/console/base.py", line 207, in _decorated return function(self, request, *args, **kwargs) File "%PY2.7%/notifier/threads.py", line 82, in _run tmp = self._function() File "%PY2.7%/notifier/__init__.py", line 104, in __call__ return self._function( *tmp, **self._kwargs ) File "%PY2.7%/univention/management/console/modules/udm/__init__.py", line 553, in _thread result = module.search(container, objectProperty, objectPropertyValue, superordinate, scope=scope, hidden=hidden) File "%PY2.7%/univention/management/console/modules/udm/udm_ldap.py", line 163, in _decorated return func(*args, **kwargs) File "%PY2.7%/univention/management/console/modules/udm/udm_ldap.py", line 146, in wrapper_func return _func(*args, **kwargs) File "%PY2.7%/univention/management/console/modules/udm/udm_ldap.py", line 139, in _func ret = func(*args, **kwargs) File "%PY2.7%/univention/management/console/modules/udm/udm_ldap.py", line 585, in search result = self.module.lookup(None, ldap_connection, filter_s, base=container, superordinate=superordinate, scope=scope, sizelimit=sizelimit) File "%PY2.7%/univention/admin/handlers/dhcp/pool.py", line 244, in lookup for dn, attrs in lo.search(unicode(filter), base, scope, [], unique, required, timeout, sizelimit): File "%PY2.7%/univention/admin/uldap.py", line 359, in search raise univention.admin.uexceptions.ldapError('%s: %s' % (_err2str(msg), filter)) ldapError: Bad search filter: (&(objectClass=univentionDhcpPool)(unknown_clients=*)) Remark: Suchen in LDAP unterhalb DHCP Pool nach erlaubten nicht erlabten clients Version: 4.0-3 errata302 (Walle)
The & is only the traceback appearance. The problem is the underscore (_) in the attribute name. There is no mapping for this property. Reproducible: curl 'http://master10.dev.local/umcp/command/udm/nav/object/query' -H 'Content-Type: application/json' -H 'Cookie: UMCSessionId=d8401796-b184-4bdc-ab96-b341e7f1a883;' --data-binary '{"options":{"objectType":"dhcp/pool","objectProperty":"known_clients","objectPropertyValue":"allow","container":"cn=foo,cn=dhcp,dc=dev,dc=local","hidden":true},"flavor":"navigation"}'
Created attachment 7169 [details] patch As these attributes have no mapping they should not be searchable/viewable in UMC search list. The patch hides them from the search dropdown so that the traceback cannot occur.
A manual filter rewriting has been added. univention-directory-manager-modules (11.0.2-22): r67920 | Bug #39343: fix searching for DHCP pool properties univention-directory-manager-modules.yaml: r67921 | YAML Bug #39343
Changes: OK, search is working as expected. YAML: OK. → VERIFIED (If you test this over the web interface please note bug 40889)
<http://errata.software-univention.de/ucs/4.1/131.html>