Bug 55768 - Prevent or encode colons in exam names to prevent invalid ucsschoolRole value
Prevent or encode colons in exam names to prevent invalid ucsschoolRole value
Product: UCS@school
Classification: Unclassified
Component: Ucsschool-lib
UCS@school 5.0
Other Linux
: P5 normal (vote)
: UCS@school 5.0 v3-errata
Assigned To: J Leadbetter
Carlos García-Mauriño
Depends on:
Blocks: 55671
  Show dependency treegraph
Reported: 2023-03-01 08:59 CET by Ole Schwiegert
Modified: 2023-05-08 13:08 CEST (History)
6 users (show)

See Also:
What kind of report is it?: Bug Report
What type of bug is this?: 4: Minor Usability: Impairs usability in secondary scenarios
Who will be affected by this bug?: 3: Will affect average number of installed domains
How will those affected feel about the bug?: 5: Blocking further progress on the daily work
User Pain: 0.343
Enterprise Customer affected?:
School Customer affected?: Yes
ISV affected?:
Waiting Support:
Flags outvoted (downgraded) after PO Review:
Ticket number: 2023020821000481
Bug group (optional):
Max CVSS v3 score:


Note You need to log in before you can comment on or make changes to this bug.
Description Ole Schwiegert univentionstaff 2023-03-01 08:59:49 CET
+++ This bug was initially created as a clone of Bug #55671 +++

07.02.23 10:14:15.578  MODULE      ( PROCESS ) : _thread:646  start_exam() Requesting exam user 04/26 to be created: u'uid=schein.c,cn=schueler,cn=users,ou=sun,dc=schule,dc=schein'
07.02.23 10:14:15.578  MODULE      ( PROCESS ) : info:75  Vorbereitung der Klassenarbeitskonten - (04/26) Charly, Schein (schein.c)
07.02.23 10:14:15.703  MODULE      ( WARN    ) : _thread:670  start_exam() Could not create exam user account for u'uid=kimberleyn.b,cn=schueler,cn=users,ou=bk191796,dc=schule,dc=koeln': 591 on master.schule.koeln (command/schoolexam-master/create-exam-user): {u'status': 591, u'message': u'Interner Server-Fehler in "schoolexam-master/create-exam-user".', u'location': u'https://master.schule.schein/univention/command'}
Interner Server-Fehler in "schoolexam-master/create-exam-user".
Request: schoolexam-master/create-exam-user

Traceback (most recent call last):
  File "/usr/lib/python2.7/dist-packages/univention/management/console/base.py", line 359, in __error_handling
    six.reraise(etype, exc, etraceback)
  File "/usr/lib/python2.7/dist-packages/univention/management/console/base.py", line 262, in execute
    function.__func__(self, request, *args, **kwargs)
  File "/usr/lib/python2.7/dist-packages/univention/management/console/modules/decorators.py", line 181, in _response
    return function(self, request)
  File "/usr/lib/python2.7/dist-packages/ucsschool/lib/school_umc_ldap_connection.py", line 145, in wrapper_func
    return func(*args, **kwargs)
  File "/usr/lib/python2.7/dist-packages/univention/management/console/modules/schoolexam-master/__init__.py", line 265, in create_exam_user
    ldap_admin_write, filter_format("uid=%s", (exam_user_uid,))
  File "/usr/lib/python2.7/dist-packages/ucsschool/lib/models/base.py", line 1186, in get_only_udm_obj
    validate(obj, cls.logger)
  File "/usr/lib/python2.7/dist-packages/ucsschool/lib/models/validator.py", line 498, in validate
    errors = validation_class.validate(dict_obj)
  File "/usr/lib/python2.7/dist-packages/ucsschool/lib/models/validator.py", line 319, in validate
    errors = super(ExamStudentValidator, cls).validate(obj)
  File "/usr/lib/python2.7/dist-packages/ucsschool/lib/models/validator.py", line 182, in validate
    errors.append(cls.validate_part_of_school(roles, schools))
  File "/usr/lib/python2.7/dist-packages/ucsschool/lib/models/validator.py", line 228, in validate_part_of_school
    missing_schools = set([s for r, c, s in roles if c == "school" and s.lower() not in schools])
ValueError: too many values to unpack

There are existing exam-users, which have these ucschoolRoles from a previous exam start, which was named 12:20

  ucsschoolRole: exam_user:school:sun
  ucsschoolRole: exam_user:exam:12:20-sun

This is a problem: exam_user:exam:12:20-sun. When split by : it'll create 4 strings instead of 3.

:~ # univention-app info
UCS: 4.4-9 errata1280
:~ # univention-app info
UCS: 4.4-9 errata1355
Comment 1 J Leadbetter univentionstaff 2023-03-14 14:16:08 CET
Fixed in:

Package: ucs-school-lib
Version: 13.0.33A~
Comment 3 Carlos García-Mauriño univentionstaff 2023-03-27 10:30:04 CEST
Errata updates for UCS@school 5.0 v3 have been released.


If this error occurs again, please clone this bug.