Bug 39343 - Bad search filter: unknown_clients=*
Bad search filter: unknown_clients=*
Status: CLOSED FIXED
Product: UCS
Classification: Unclassified
Component: UMC - Domain management (Generic)
UCS 4.0
Other Linux
: P5 normal (vote)
: UCS 4.1-1-errata
Assigned To: Florian Best
Jürn Brodersen
:
Depends on:
Blocks:
  Show dependency treegraph
 
Reported: 2015-09-14 17:16 CEST by Florian Best
Modified: 2016-03-18 06:47 CET (History)
1 user (show)

See Also:
What kind of report is it?: ---
What type of bug is this?: ---
Who will be affected by this bug?: ---
How will those affected feel about the bug?: ---
User Pain:
Enterprise Customer affected?:
School Customer affected?:
ISV affected?:
Waiting Support:
Flags outvoted (downgraded) after PO Review:
Ticket number:
Bug group (optional): External feedback
Max CVSS v3 score:


Attachments
patch (1.00 KB, patch)
2015-09-15 15:27 CEST, Florian Best
Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Florian Best univentionstaff 2015-09-14 17:16:18 CEST
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)
Comment 1 Florian Best univentionstaff 2015-09-14 17:32:32 CEST
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"}'
Comment 2 Florian Best univentionstaff 2015-09-15 15:27:44 CEST
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.
Comment 3 Florian Best univentionstaff 2016-03-04 15:25:18 CET
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
Comment 4 Jürn Brodersen univentionstaff 2016-03-11 15:11:45 CET
Changes: OK, search is working as expected.
YAML: OK.

→ VERIFIED

(If you test this over the web interface please note bug 40889)
Comment 5 Florian Best univentionstaff 2016-03-18 06:47:58 CET
<http://errata.software-univention.de/ucs/4.1/131.html>