Bug 42423 - UMC crashes if default container contains ","
UMC crashes if default container contains ","
Status: CLOSED FIXED
Product: UCS
Classification: Unclassified
Component: UMC - Domain management (Generic)
UCS 4.2
Other Linux
: P5 normal (vote)
: UCS 4.2-1-errata
Assigned To: Johannes Keiser
Florian Best
:
Depends on:
Blocks:
  Show dependency treegraph
 
Reported: 2016-09-16 09:28 CEST by Florian Best
Modified: 2017-07-05 13:06 CEST (History)
0 users

See Also:
What kind of report is it?: Bug Report
What type of bug is this?: 7: Crash: Bug causes crash or data loss
Who will be affected by this bug?: 1: Will affect a very few installed domains
How will those affected feel about the bug?: 5: Blocking further progress on the daily work
User Pain: 0.200
Enterprise Customer affected?:
School Customer affected?:
ISV affected?:
Waiting Support:
Flags outvoted (downgraded) after PO Review:
Ticket number:
Bug group (optional):
Max CVSS v3 score:
best: Patch_Available+


Attachments
patch (1.56 KB, patch)
2016-09-16 09:28 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 2016-09-16 09:28:14 CEST
Created attachment 8015 [details]
patch

Attached is a patch.
To reproduce create a container with "," in the name and add it to the default containers of e.g. users and open the users object.

Execution of command 'udm/containers users/user' has failed:

Traceback (most recent call last):
  File "/usr/lib/pymodules/python2.7/univention/management/console/base.py", line 283, in execute
    function(self, request, *args, **kwargs)
  File "/usr/lib/pymodules/python2.7/univention/management/console/modules/udm/__init__.py", line 105, in _decorated
    return func(self, request, *a, **kw)
  File "/usr/lib/pymodules/python2.7/univention/management/console/modules/decorators.py", line 318, in _response
    result = _multi_response(self, request)
  File "/usr/lib/pymodules/python2.7/univention/management/console/modules/decorators.py", line 462, in _response
    return list(function(self, iterator, *nones))
  File "/usr/lib/pymodules/python2.7/univention/management/console/modules/decorators.py", line 284, in _fake_func
    yield function(self, *args)
  File "/usr/lib/pymodules/python2.7/univention/management/console/modules/udm/__init__.py", line 702, in containers
    containers += self.settings.containers(flavor)
  File "/usr/lib/pymodules/python2.7/univention/management/console/modules/udm/udm_ldap.py", line 956, in containers
    return map(lambda x: {'id': x, 'label': ldap_dn2path(x)}, self.directory.info.get(base, []))
  File "/usr/lib/pymodules/python2.7/univention/management/console/modules/udm/udm_ldap.py", line 956, in <lambda>
    return map(lambda x: {'id': x, 'label': ldap_dn2path(x)}, self.directory.info.get(base, []))
  File "/usr/lib/pymodules/python2.7/univention/management/console/modules/udm/udm_ldap.py", line 1006, in ldap_dn2path
    dummy, value = item.split('=', 1)
ValueError: need more than 1 value to unpack
Comment 1 Johannes Keiser univentionstaff 2017-06-29 16:27:15 CEST
Applied rebased patch:

r 80639
univention-management-console-module-udm (7.0.10-14) 
* Bug #42423: Applied patch from Florian Best - Fix traceback when default
container contains ","

YAML: r 80640
Comment 2 Florian Best univentionstaff 2017-06-29 17:26:23 CEST
OK: no crash / problem anymore when a default contains contains a ",".
OK: YAML (adjusted in r80650)
Comment 3 Janek Walkenhorst univentionstaff 2017-07-05 13:06:30 CEST
<http://errata.software-univention.de/ucs/4.2/83.html>