Univention Bugzilla – Bug 44479
modify printer raises: IndexError: string index out of range
Last modified: 2023-04-25 15:36:07 CEST
4.2-0 errata0 (Lesum) Die Ausführung des Kommandos udm/put shares/print 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 406, in _thread module.modify(properties) File "%PY2.7%/univention/management/console/modules/udm/udm_ldap.py", line 86, in _decorated return method(*args, **kwargs) File "%PY2.7%/univention/management/console/ldap.py", line 143, in _decorated result = func(*args, **kwargs) File "%PY2.7%/univention/management/console/modules/udm/udm_ldap.py", line 446, in modify obj.modify() File "%PY2.7%/univention/admin/handlers/__init__.py", line 318, in modify return self._modify(modify_childs, ignore_license=ignore_license) File "%PY2.7%/univention/admin/handlers/__init__.py", line 793, in _modify self._ldap_pre_modify() File "%PY2.7%/univention/admin/handlers/shares/printer.py", line 331, in _ldap_pre_modify if self['uri'] and self['uri'][0] == 'file:/' and self['uri'][1][0] == '/': IndexError: string index out of range Remark: curl 'https://xen3.school.local/univention/command/udm/put' -H 'Pragma: no-cache' -H 'Origin: https://xen3.school.local' -H 'Accept-Encoding: gzip, deflate, br' -H 'Accept-Language: de-DE' -H 'User-Agent: Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/53.0.2785.143 Safari/537.36' -H 'Content-Type: application/json' -H 'Accept: application/json; q=1.0, text/html; q=0.3; */*; q=0.1' -H 'X-XSRF-Protection: 1fa724d0-6d1f-4a27-b9ed-e5935d4834da' -H 'Cache-Control: no-cache' -H 'X-Requested-With: XMLHttpRequest' -H 'Cookie: UMCSessionId=1fa724d0-6d1f-4a27-b9ed-e5935d4834da; UMCUsername=Administrator' -H 'Connection: keep-alive' -H 'Referer: https://xen3.school.local/univention/management/' --data-binary '{"options":[{"object":{"ACLUsers":["uid=bprqxy8bka,cn=users,dc=school,dc=local","uid=dpaxtwqtbj,cn=users,dc=school,dc=local"],"ACLtype":"allow","$dn$":"cn=test,cn=printers,dc=school,dc=loca l"},"options":null}],"flavor":"shares/print"}' --compressed --insecure
Reproducible: Create a printer with "file:/" Protocol and "/" as Destination. Save it. Open for modify. Change any other property (e.g. spool host) and click on Save.
@Christian: Could you check if this still occurs in UCS 4.4. If yes, please change the Version field of this bug to UCS 4.4.
Bug still occurs on UCS 4.4-3
Version: 5.0-0 errata152 Error: Interner Server-Fehler in "udm/add (shares/print)". Request: udm/add (shares/print) Traceback (most recent call last): File "%PY3%/notifier/threads.py", line 80, in _run result = self._function() File "%PY3%/notifier/__init__.py", line 105, in __call__ return self._function(*tmp, **self._kwargs) File "%PY3%/univention/management/console/modules/udm/__init__.py", line 404, in _thread dn = module.create(properties, container=options.get('container'), superordinate=options.get('superordinate')) File "%PY3%/univention/management/console/modules/udm/udm_ldap.py", line 570, in create obj.create() File "%PY3%/univention/admin/handlers/__init__.py", line 540, in create self._ldap_pre_ready() File "%PY3%/univention/admin/handlers/shares/printer.py", line 234, in _ldap_pre_ready if self['uri'] and self['uri'][0] == 'file:/' and self['uri'][1][0] == '/': IndexError: string index out of range
reported again: Version: 5.0-1 errata339
Version: 5.0-3 errata595 Error: Internal server error during "udm/add (shares/print)". Request: udm/add (shares/print) Traceback (most recent call last): File "%PY3%/notifier/threads.py", line 80, in _run result = self._function() File "%PY3%/notifier/__init__.py", line 105, in __call__ return self._function(*tmp, **self._kwargs) File "%PY3%/univention/management/console/modules/udm/__init__.py", line 410, in _thread dn = module.create(properties, container=options.get('container'), superordinate=options.get('superordinate')) File "%PY3%/univention/management/console/modules/udm/udm_ldap.py", line 563, in create obj.create() File "%PY3%/univention/admin/handlers/__init__.py", line 554, in create self._ldap_pre_ready() File "%PY3%/univention/admin/handlers/shares/printer.py", line 236, in _ldap_pre_ready if self['uri'] and self['uri'][0] == 'file:/' and self['uri'][1][0] == '/': IndexError: string index out of range Role: domaincontroller_master