Univention Bugzilla – Bug 50009
Computerroom "crashes" when a roomname contains umlauts
Last modified: 2019-09-26 10:32:49 CEST
A customer reported that computerroom "crashes" when a roomname contains umlauts. The logfile shows: 14.08.19 15:06:26.950 MAIN ( PROCESS ) : LDAP bind for user u'uid=Administrator,cn=users,dc=schein,dc=me'. 14.08.19 15:07:49.112 MODULE ( PROCESS ) : Invalid room DN: cn=sun-überraum,cn=raeume,cn=groups,ou=sun,dc=schein,dc=me 14.08.19 15:08:37.302 MODULE ( PROCESS ) : Invalid room DN: cn=sun-überraum,cn=raeume,cn=groups,ou=sun,dc=schein,dc=me 14.08.19 15:10:24.433 MODULE ( PROCESS ) : Invalid room DN: cn=sun-überraum,cn=raeume,cn=groups,ou=sun,dc=schein,dc=me 14.08.19 15:17:02.506 MODULE ( PROCESS ) : Invalid room DN: cn=sun-räume,cn=raeume,cn=groups,ou=sun,dc=schein,dc=me
Created attachment 10158 [details] first message
Created attachment 10159 [details] second message
How to reproduce: Add a room with umlauts, and then access the education → computers room
The customer needs a patch asap, because school starts tomorrow
Regression caused by Bug #43039.
Created attachment 10160 [details] hotfix hotfix for /usr/share/pyshares/univention/management/console/modules/computerroom/__init__.py. Probably not suitable for the product.
(In reply to Florian Best from comment #6) > Created attachment 10160 [details] > hotfix > > hotfix for > /usr/share/pyshares/univention/management/console/modules/computerroom/ > __init__.py. > > Probably not suitable for the product. Correct path: /usr/share/pyshared/univention/management/console/modules/computerroom/__init__.py
the ou part is also wrong
root@dc1:/usr/share/pyshared/univention/management/console/modules/computerroom# diff __init__.py{,.orig} 83c83 < ROOM_DN_REGEX_TEMPLATE = r'cn=([\w0-9_][\w0-9. _-]+?[\w0-9_]+?),cn={container},cn=groups,ou=([\w0-9_]+?),{ldap_base}' --- > ROOM_DN_REGEX_TEMPLATE = r'cn=([a-zA-Z0-9_][a-zA-Z0-9. _-]+?[a-zA-Z0-9_]+?),cn={container},cn=groups,ou=(\w+?),{ldap_base}' 85,86c85 < container=ucr.get('ucsschool/ldap/default/container/rooms', 'raeume'), ldap_base=ucr['ldap/base']), flags=re.U)) < --- > container=ucr.get('ucsschool/ldap/default/container/rooms', 'raeume'), ldap_base=ucr['ldap/base']))) 249,250d247 < if type(value) == str: < value = unicode(value) 257c254 < raise UMC_Error(_('Invalid room DN: %s') % (value, )) --- > raise UMC_Error(_('Invalid room DN: %s') % value)
[4.4 472ba079d] Bug #50009: Fix computerroom crash with umlauts [4.4 0c5fb4870] Bug #50009: yaml Package: ucs-school-umc-computerroom Version: 11.0.0-6A~4.4.0.201909192040 Branch: ucs_4.4-0 Scope: ucs-school-4.4
Tested the ucs-test script 22_computerroom_local_file_exploit with the old and the fixed version of the computerroom module. Also manual tests were performed. Works like a charm. OK: code change OK: installation OK: update OK: ucs-test OK: changelog entry ~OK: advisory OK: functional change OK: package built and installable
UCS@school 4.4 v3 has been released. https://docs.software-univention.de/changelog-ucsschool-4.4v3-de.html If this error occurs again, please clone this bug.