Bug 44479 - modify printer raises: IndexError: string index out of range
modify printer raises: IndexError: string index out of range
Status: NEW
Product: UCS
Classification: Unclassified
Component: UMC - Printers
UCS 5.0
Other Linux
: P5 normal (vote)
: ---
Assigned To: UMC maintainers
UMC maintainers
:
Depends on:
Blocks:
  Show dependency treegraph
 
Reported: 2017-04-27 12:22 CEST by Florian Best
Modified: 2023-04-25 15:36 CEST (History)
2 users (show)

See Also:
What kind of report is it?: Bug Report
What type of bug is this?: 3: Simply Wrong: The implementation doesn't match the docu
Who will be affected by this bug?: 1: Will affect a very few installed domains
How will those affected feel about the bug?: 2: A Pain – users won’t like this once they notice it
User Pain: 0.034
Enterprise Customer affected?:
School Customer affected?:
ISV affected?:
Waiting Support:
Flags outvoted (downgraded) after PO Review:
Ticket number: 2022062421000953, 2017020921000463, 2021111221000637, 2022051821000118, 2023022721000293
Bug group (optional):
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 2017-04-27 12:22:43 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
Comment 1 Florian Best univentionstaff 2017-07-13 14:50:08 CEST
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.
Comment 2 Florian Best univentionstaff 2019-11-28 10:32:23 CET
@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.
Comment 3 Christian Castens univentionstaff 2020-01-29 14:48:49 CET
Bug still occurs on UCS 4.4-3
Comment 4 Maximilian Janßen univentionstaff 2021-11-19 11:53:10 CET
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
Comment 5 Maximilian Janßen univentionstaff 2022-07-06 16:12:53 CEST
reported again: Version: 5.0-1 errata339
Comment 6 Mika Westphal univentionstaff 2023-03-02 14:10:28 CET
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