Bug 50231 - Password module crashes if a teacher can not read all class members
Password module crashes if a teacher can not read all class members
Status: CLOSED FIXED
Product: UCS@school
Classification: Unclassified
Component: UMC - Password reset
UCS@school 4.4
Other Linux
: P5 normal (vote)
: UCS@school 5.0 v4-errata
Assigned To: Alexander Steffen
Johannes Königer
:
Depends on:
Blocks: 56581
  Show dependency treegraph
 
Reported: 2019-09-20 12:20 CEST by Jürn Brodersen
Modified: 2023-12-19 16:01 CET (History)
8 users (show)

See Also:
What kind of report is it?: Bug Report
What type of bug is this?: 7: Crash: Bug causes crash or data loss
Who will be affected by this bug?: 2: Will only affect a few installed domains
How will those affected feel about the bug?: 3: A User would likely not purchase the product
User Pain: 0.240
Enterprise Customer affected?:
School Customer affected?: Yes
ISV affected?:
Waiting Support:
Flags outvoted (downgraded) after PO Review:
Ticket number: 2021092021000288, 2019091221000646, 2020031621000281, 2019082121001022
Bug group (optional): Error handling, External feedback
Max CVSS v3 score:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Jürn Brodersen univentionstaff 2019-09-20 12:20:11 CEST
Password module crashes if a teacher can not read all class members

In a customer environment a student was still in a class from a school he wasn't a member of any more. If a teacher now tries to open that class he gets a noObject traceback because he can not open that user.


Interner Server-Fehler in "schoolusers/query (student)".
Request: schoolusers/query (student)
 
Traceback (most recent call last):
  File "/usr/lib/pymodules/python2.7/univention/management/console/base.py", line 260, in execute
    function.__func__(self, request, *args, **kwargs)
  File "/usr/lib/pymodules/python2.7/univention/management/console/modules/decorators.py", line 181, in _response
    return function(self, request)
  File "/usr/lib/pymodules/python2.7/ucsschool/lib/schoolldap.py", line 145, in wrapper_func
    return func(*args, **kwargs)
  File "/usr/lib/pymodules/python2.7/univention/management/console/modules/schoolusers/__init__.py", line 90, in query
    attr=['givenName', 'sn', 'shadowLastChange', 'shadowMax', 'uid'])
  File "/usr/lib/pymodules/python2.7/ucsschool/lib/schoolldap.py", line 531, in _users_ldap
    ldap_objs = ldap_connection.search(search_filter, base=userdn, attr=attr)
  File "/usr/lib/pymodules/python2.7/univention/admin/uldap.py", line 755, in search
    raise univention.admin.uexceptions.noObject(_err2str(msg))
noObject: No such object
Comment 1 Christian Castens univentionstaff 2020-05-18 09:51:38 CEST
Reported again:

Version: 4.3-5 errata660 (Neustadt) - UCS@school 4.3 v6

Interner Server-Fehler in "schoolusers/query (student)".
Request: schoolusers/query (student)

Traceback (most recent call last):
  File "%PY2.7%/univention/management/console/base.py", line 253, in execute
    function.__func__(self, request, *args, **kwargs)
  File "%PY2.7%/univention/management/console/modules/decorators.py", line 192, in _response
    return function(self, request)
  File "%PY2.7%/ucsschool/lib/schoolldap.py", line 145, in wrapper_func
    return func(*args, **kwargs)
  File "%PY2.7%/univention/management/console/modules/schoolusers/__init__.py", line 90, in query
    attr=['givenName', 'sn', 'shadowLastChange', 'shadowMax', 'uid'])
  File "%PY2.7%/ucsschool/lib/schoolldap.py", line 531, in _users_ldap
    ldap_objs = ldap_connection.search(search_filter, base=userdn, attr=attr)
  File "%PY2.7%/univention/admin/uldap.py", line 698, in search
    raise univention.admin.uexceptions.noObject(_err2str(msg))
noObject: No such object

Role: domaincontroller_master
Comment 2 Christian Castens univentionstaff 2020-08-19 13:31:41 CEST
reported again:

Version: 4.4-1 errata234 (Blumenthal) - UCS@school 4.4 v3

Traceback(230f9696cfdd958097f2941a291b151c):
Interner Server-Fehler in "schoolusers/query (student)".
Request: schoolusers/query (student)

Traceback (most recent call last):
  File "%PY2.7%/univention/management/console/base.py", line 260, in execute
    function.__func__(self, request, *args, **kwargs)
  File "%PY2.7%/univention/management/console/modules/decorators.py", line 181, in _response
    return function(self, request)
  File "%PY2.7%/ucsschool/lib/schoolldap.py", line 145, in wrapper_func
    return func(*args, **kwargs)
  File "%PY2.7%/univention/management/console/modules/schoolusers/__init__.py", line 90, in query
    attr=['givenName', 'sn', 'shadowLastChange', 'shadowMax', 'uid'])
  File "%PY2.7%/ucsschool/lib/schoolldap.py", line 531, in _users_ldap
    ldap_objs = ldap_connection.search(search_filter, base=userdn, attr=attr)
  File "%PY2.7%/univention/admin/uldap.py", line 755, in search
    raise univention.admin.uexceptions.noObject(_err2str(msg))
noObject: No such object

Role: domaincontroller_slave
Comment 5 Alexander Steffen univentionstaff 2023-12-01 10:01:17 CET
Merged and built. Waiting for Jenkins Jobs to verify success.
Comment 6 Johannes Königer univentionstaff 2023-12-04 15:19:12 CET
Fixed with commit 0ca7b82e2b1f2de7e79502d79074d15cf097107a:

ucs-school-lib 13.0.42
ucs-school-umc-users 16.0.8
Comment 7 Johannes Königer univentionstaff 2023-12-19 16:01:57 CET
Errata updates for UCS@school 5.0 v4 have been released.

https://docs.software-univention.de/ucsschool-changelog/5.0v4/en/changelog.html
https://docs.software-univention.de/ucsschool-changelog/5.0v4/de/changelog.html

If this error occurs again, please clone this bug.