Univention Bugzilla – Bug 42424
AttributeError due to "(" in lastname causes internet restrictions to not work
Last modified: 2023-06-12 15:39:34 CEST
Version: 3.2-8 errata445 (Borgfeld) Remark: Die Internetsperre funktioniert nicht mehr. Traceback(aaa624a6f971dcca26f5939f69eca554): Die Ausführung des Kommandos computerroom/settings/set ist fehlgeschlagen: Traceback (most recent call last): File "%PY2.6%/univention/management/console/modules/__init__.py", line 218, in execute func( request ) File "%PY2.6%/univention/management/console/modules/computerroom/__init__.py", line 192, in _decorated return func(self, request) File "%PY2.6%/univention/management/console/modules/computerroom/__init__.py", line 812, in settings_set italc_users = [x.lower() for x in self._italc.users if x] File "%PY2.6%/univention/management/console/modules/computerroom/italc2.py", line 659, in users return map( lambda x: _usermap[ x.user.current ].username, filter( lambda comp: comp.user.current and comp.connected, self.values() ) ) File "%PY2.6%/univention/management/console/modules/computerroom/italc2.py", line 659, in <lambda> return map( lambda x: _usermap[ x.user.current ].username, filter( lambda comp: comp.user.current and comp.connected, self.values() ) ) File "%PY2.6%/univention/management/console/modules/computerroom/italc2.py", line 105, in __getitem__ self._read_user( user ) File "%PY2.6%/ucsschool/lib/schoolldap.py", line 205, in wrapper_func return func( *args, **kwargs ) File "%PY2.6%/univention/management/console/modules/computerroom/italc2.py", line 113, in _read_user raise AttributeError( 'invalid key "%s"' % userstr ) AttributeError: invalid key "ZhuLink1999 (Linke (Toni) Zhu)"
The problem is that the logged in user "ZhuLink1999 (Linke (Toni) Zhu)" does not match the regex r'(?P<username>[^(]*)( \((?P<realname>[^)]*)\))?$'.
Hotfix would be the following regex: r'(?P<username>[^(]*)( \((?P<realname>.*)\))?$' But I think we should remove the whole AttributeError completely.
This issue has been filled against UCS@school 3. The maintenance with bug and security fixes for the last UCS@school version for UCS 3.x (→ UCS@school 3.2) has ended on Dec 31, 2016. Customers still on UCS 3.x are encouraged to update to UCS 4.3 (or later). Please contact your partner or Univention for any questions. If this issue still occurs in newer UCS versions, please use "Clone this bug" or simply reopen the issue. In this case please provide detailed information on how this issue is affecting you.
*** This bug has been marked as a duplicate of bug 52039 ***