Univention Bugzilla – Bug 41032
uid=foo+cn=bar,cn=users,dc=foo DN breaks UDM handlers
Last modified: 2018-04-13 13:29:46 CEST
Created attachment 7589 [details] patch If there is a DN with multiple components in the RDN UDM handles this incorrectly. It prevents e.g. searching/listing objects. It e.g. causes objects to raise the following exception which is masked by another exception (below): File "/usr/lib/pymodules/python2.7/univention/admin/handlers/__init__.py", line 108, in __init__ self.position.setDn(dn) File "/usr/lib/pymodules/python2.7/univention/admin/uldap.py", line 150, in setDn mytype, ign = string.split(i,'=') ValueError: too many values to unpack Die Ausführung des Kommandos udm/query users/user ist fehlgeschlagen: Traceback (most recent call last): 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 536, 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 84, in _decorated return method(*args, **kwargs) File "%PY2.7%/univention/management/console/ldap.py", line 135, in _decorated result = func(*args, **kwargs) File "%PY2.7%/univention/management/console/modules/udm/udm_ldap.py", line 488, in search UDM_Error(e).reraise() File "%PY2.7%/univention/management/console/modules/udm/udm_ldap.py", line 471, 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/users/user.py", line 2766, in lookup res.append( object( co, lo, None, dn, attributes = attrs ) ) File "%PY2.7%/univention/admin/handlers/users/user.py", line 1352, in __init__ univention.admin.handlers.simpleLdap.__init__(self, co, lo, position, dn, superordinate, attributes = attributes ) File "%PY2.7%/univention/admin/handlers/__init__.py", line 562, in __init__ base.__init__(self, co, lo, position, dn, superordinate ) File "%PY2.7%/univention/admin/handlers/__init__.py", line 108, in __init__ self.position.setDn(dn) File "%PY2.7%/univention/admin/uldap.py", line 155, in setDn raise univention.admin.uexceptions.noObject, _("DN not found: %s.") % dn UDM_Error: Das Objekt existiert nicht. DN nicht gefunden: cn=Anton Meyer+uid=anton3,cn=schueler,cn=users,ou=gsmitte,dc=school,dc=local. This may be used for DoS in UCS@school when we allow to make changes via machine connection. The patch fixes the search and the correct modification of such objects.
*** This bug has been marked as a duplicate of bug 40041 ***
<http://errata.software-univention.de/ucs/4.1/207.html> <http://errata.software-univention.de/ucs/4.1/208.html>