Bug 42424 - AttributeError due to "(" in lastname causes internet restrictions to not work
AttributeError due to "(" in lastname causes internet restrictions to not work
Status: CLOSED DUPLICATE of bug 52039
Product: UCS@school
Classification: Unclassified
Component: UMC - Computer room
UCS@school 4.3
Other Linux
: P5 normal (vote)
: ---
Assigned To: UCS@school maintainers
:
Depends on:
Blocks:
  Show dependency treegraph
 
Reported: 2016-09-16 10:06 CEST by Florian Best
Modified: 2023-06-12 15:39 CEST (History)
4 users (show)

See Also:
What kind of report is it?: Bug Report
What type of bug is this?: 5: Major Usability: Impairs usability in key scenarios
Who will be affected by this bug?: 2: Will only affect a 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.114
Enterprise Customer affected?:
School Customer affected?: Yes
ISV affected?:
Waiting Support:
Flags outvoted (downgraded) after PO Review:
Ticket number:
Bug group (optional): Error handling, External feedback, Usability
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 2016-09-16 10:06:22 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)"
Comment 1 Florian Best univentionstaff 2016-09-16 10:08:42 CEST
The problem is that the logged in user "ZhuLink1999 (Linke (Toni) Zhu)" does not match the regex r'(?P<username>[^(]*)( \((?P<realname>[^)]*)\))?$'.
Comment 2 Florian Best univentionstaff 2016-09-16 10:53:41 CEST
Hotfix would be the following regex:
r'(?P<username>[^(]*)( \((?P<realname>.*)\))?$'

But I think we should remove the whole AttributeError completely.
Comment 3 Sönke Schwardt-Krummrich univentionstaff 2019-02-05 21:49:41 CET
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.
Comment 4 Jürn Brodersen univentionstaff 2022-01-19 23:59:13 CET

*** This bug has been marked as a duplicate of bug 52039 ***