Bug 39819 - Opening object raises TypeError: must be string, not list
Opening object raises TypeError: must be string, not list
Status: CLOSED DUPLICATE of bug 39779
Product: UCS
Classification: Unclassified
Component: UMC - Domain management (Generic)
UCS 4.0
Other Linux
: P5 normal (vote)
: UCS 4.0-3-errata
Assigned To: UMC maintainers
Alexander Kläser
:
Depends on:
Blocks:
  Show dependency treegraph
 
Reported: 2015-11-07 13:00 CET by Florian Best
Modified: 2015-11-09 15:17 CET (History)
3 users (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): Error handling, External feedback
Max CVSS v3 score:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Florian Best univentionstaff 2015-11-07 13:00:46 CET
We received the following traceback 4 times with different UDM flavors.
It seems to be a side effect of http://errata.software-univention.de/ucs/4.0/354.html.

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

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 483, in _thread
    module = get_module(request.flavor, ldap_dn)
  File "%PY2.7%/univention/management/console/modules/udm/udm_ldap.py", line 161, 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 1167, in get_module
    modules = udm_modules.objectType(None, ldap_connection, ldap_dn, module_base=base)
  File "%PY2.7%/univention/admin/modules.py", line 845, in objectType
    attr = lo.get( dn )
  File "%PY2.7%/univention/admin/uldap.py", line 342, in get
    return self.lo.get(dn, attr, required)
  File "%PY2.7%/univention/uldap.py", line 272, in get
    '(objectClass=*)', attr )
  File "/usr/lib/python2.7/dist-packages/ldap/ldapobject.py", line 559, in search_s
    return self.search_ext_s(base,scope,filterstr,attrlist,attrsonly,None,None,timeout=self.timeout)
  File "/usr/lib/python2.7/dist-packages/ldap/ldapobject.py", line 918, in search_ext_s
    return self._apply_method_s(SimpleLDAPObject.search_ext_s,*args,**kwargs)
  File "/usr/lib/python2.7/dist-packages/ldap/ldapobject.py", line 860, in _apply_method_s
    return func(self,*args,**kwargs)
  File "/usr/lib/python2.7/dist-packages/ldap/ldapobject.py", line 552, in search_ext_s
    msgid = self.search_ext(base,scope,filterstr,attrlist,attrsonly,serverctrls,clientctrls,timeout,sizelimit)
  File "/usr/lib/python2.7/dist-packages/ldap/ldapobject.py", line 548, in search_ext
    timeout,sizelimit,
  File "/usr/lib/python2.7/dist-packages/ldap/ldapobject.py", line 106, in _ldap_call
    result = func(*args,**kwargs)
TypeError: must be string, not list
Comment 1 Florian Best univentionstaff 2015-11-07 13:33:19 CET
The following request will trigger the error:
curl 'http://demo.univention.de/umcp/command/udm/get' -H 'Cookie: UMCSessionId=61b837ac-821f-407d-9d7c-58760e819806;' -H 'Accept-Language: en-US'  -H 'Content-Type: application/json' -H 'Accept: */*' -H 'X-Requested-With: XMLHttpRequest' --data-binary '{"options":[["uid=baerbel,ou=Passau,ou=People,dc=demo,dc=univention,dc=de"]],"flavor":"users/user"}'

I just don't know how to reproduce this in the frontend. The javascript is generating broken request options: a list containing lists with the DN instead of a list of DN's.
Comment 2 Stefan Gohmann univentionstaff 2015-11-07 13:37:03 CET
I guess it is a duplicate of Bug #39779.
Comment 3 Florian Best univentionstaff 2015-11-07 14:13:10 CET
yes. the traceback happens when editing multiple objects at once.

*** This bug has been marked as a duplicate of bug 39779 ***
Comment 4 Alexander Kläser univentionstaff 2015-11-09 12:27:50 CET
Yes, duplicate.