Bug 42399 - schoolusers: "Invalid DN syntax" on opening
schoolusers: "Invalid DN syntax" on opening
Status: CLOSED FIXED
Product: UCS@school
Classification: Unclassified
Component: UMC - Password reset
UCS@school 4.1 R2
Other Linux
: P5 normal (vote)
: UCS@school 4.1 R2 vXXX
Assigned To: Florian Best
Daniel Tröder
: interim-3
: 30090 30152 37375 41527 41986 41995 (view as bug list)
Depends on:
Blocks: 43230
  Show dependency treegraph
 
Reported: 2016-09-15 10:55 CEST by Florian Best
Modified: 2016-12-20 15:41 CET (History)
5 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?: 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.091
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-15 10:55:41 CEST
Version: 4.1-3 errata234 (Vahr)

Remark: Beim Aufruf des Moduls Passwörter (Schüler) erschien die Fehlermeldung

Traceback(61cf8fa44bdf8d9bb0b19d160f8f0ce2):
Die Ausführung des Kommandos schoolusers/groups student ist fehlgeschlagen:

Traceback (most recent call last):
  File "%PY2.7%/univention/management/console/base.py", line 283, in execute
    function(self, request)
  File "%PY2.7%/univention/management/console/modules/decorators.py", line 190, in _response
    return function(self, request)
  File "%PY2.7%/ucsschool/lib/schoolldap.py", line 140, in wrapper_func
    return func(*args, **kwargs)
  File "%PY2.7%/ucsschool/lib/schoolldap.py", line 410, in groups
    self.finished(request.id, self._groups(ldap_user_read, school, WorkGroup.get_container(school), request.options['pattern']))
  File "%PY2.7%/ucsschool/lib/schoolldap.py", line 382, in _groups
    groupresult = udm_modules.lookup('groups/group', None, ldap_connection, scope = scope, base = ldap_base, filter = ldapFilter)
  File "%PY2.7%/univention/admin/modules.py", line 710, in lookup
    tmpres=module.lookup(co, lo, filter, base=base, superordinate=superordinate, scope=scope, unique=unique, required=required, timeout=timeout, sizelimit=sizelimit)
  File "%PY2.7%/univention/admin/handlers/groups/group.py", line 1047, in lookup
    for dn, attrs in lo.search(unicode(filter), base, scope, [], unique, required, timeout, sizelimit):
  File "%PY2.7%/univention/admin/uldap.py", line 337, in search
    raise univention.admin.uexceptions.ldapError(_err2str(msg), original_exception=msg)
ldapError: Invalid DN syntax: invalid DN
Comment 1 Florian Best univentionstaff 2016-09-15 10:56:28 CEST
I guess this is a duplicate of Bug #30090 - happens when no school exists yet.
Comment 2 Florian Best univentionstaff 2016-09-15 11:12:15 CEST
Reported from two different UUID's.
Comment 3 Sönke Schwardt-Krummrich univentionstaff 2016-09-15 14:54:04 CEST
(In reply to Florian Best from comment #1)
> I guess this is a duplicate of Bug #30090 - happens when no school exists
> yet.

I think we should show a popup dialog similar to other UMC wizards if no school has been created, yet.
Comment 4 Florian Best univentionstaff 2016-11-11 15:46:03 CET
*** Bug 41986 has been marked as a duplicate of this bug. ***
Comment 5 Florian Best univentionstaff 2016-11-11 15:48:36 CET
*** Bug 30152 has been marked as a duplicate of this bug. ***
Comment 6 Florian Best univentionstaff 2016-11-11 16:51:58 CET
*** Bug 41995 has been marked as a duplicate of this bug. ***
Comment 7 Florian Best univentionstaff 2016-11-11 16:52:25 CET
*** Bug 30090 has been marked as a duplicate of this bug. ***
Comment 8 Florian Best univentionstaff 2016-11-11 17:06:38 CET
So far, all backend issues are prevented. A error message is shown. I might investigate in beautifying this error message.

ucs-school-umc-internetrules.yaml:
r74366 | Bug #42399: use SchoolSanitizer

ucs-school-umc-helpdesk (12.0.3-1):
r74366 | Bug #42399: use SchoolSanitizer

ucs-school-umc-groups.yaml:
r74366 | Bug #42399: use SchoolSanitizer

ucs-school-lib (9.0.28-1):
r74365 | Bug #42399: Add SchoolSanitizer with correct error handling

ucs-school-umc-printermoderation.yaml:
r74366 | Bug #42399: use SchoolSanitizer

ucs-school-umc-users.yaml:
r74366 | Bug #42399: use SchoolSanitizer

ucs-school-umc-exam (6.0.8-1):
r74366 | Bug #42399: use SchoolSanitizer

ucs-school-umc-helpdesk.yaml:
r74366 | Bug #42399: use SchoolSanitizer

ucs-school-umc-rooms.yaml:
r74366 | Bug #42399: use SchoolSanitizer

ucs-school-lib.yaml:
r74366 | Bug #42399: use SchoolSanitizer

ucs-school-umc-exam.yaml:
r74366 | Bug #42399: use SchoolSanitizer

ucs-school-umc-groups (6.0.4-1):
r74366 | Bug #42399: use SchoolSanitizer

ucs-school-umc-internetrules (12.0.0-2):
r74366 | Bug #42399: use SchoolSanitizer

ucs-school-umc-computerroom.yaml:
r74366 | Bug #42399: use SchoolSanitizer

ucs-school-umc-rooms (13.0.1-1):
r74366 | Bug #42399: use SchoolSanitizer

ucs-school-umc-printermoderation (13.0.4-1):
r74366 | Bug #42399: use SchoolSanitizer

ucs-school-umc-computerroom (8.0.9-1):
r74366 | Bug #42399: use SchoolSanitizer

ucs-school-umc-users (12.0.2-1):
r74366 | Bug #42399: use SchoolSanitizer
Comment 9 Florian Best univentionstaff 2016-11-14 14:42:34 CET
*** Bug 41527 has been marked as a duplicate of this bug. ***
Comment 10 Florian Best univentionstaff 2016-11-14 14:43:39 CET
*** Bug 37375 has been marked as a duplicate of this bug. ***
Comment 11 Florian Best univentionstaff 2016-11-14 14:48:41 CET
I think it is not necessary to beautify the error message and add a real button pointing to the "Add school" module. If you see this differently please REOPEN.
Comment 12 Daniel Tröder univentionstaff 2016-11-25 11:43:29 CET
OK: code change
OK: advisory
OK: automated tests:
- 90_ucsschool/29_schools_module
- 90_ucsschool/40_schoolwizard_school_create
OK: manual test:
--------------
from univention.management.console.modules.computerroom import Instance

class Request(object):
    options = {'school': '', 'id': ''}
Instance().classes(Request())

→ UMC_Error: The request did not specify any school. You have to create a school before continuing. Use the 'Add school' UMC module to create one.
--------------

REOPEN: There is no 'Add school'/'Schule hinzufügen' UMC module. It's called 'Schools'/'Schulen'. Please correct the message and the translation.

Is HTTP 503 correct? Couldn't it be HTTP 412?

Everything else is fine.
Comment 13 Florian Best univentionstaff 2016-11-25 14:52:21 CET
(In reply to Daniel Tröder from comment #12)
> REOPEN: There is no 'Add school'/'Schule hinzufügen' UMC module. It's called
> 'Schools'/'Schulen'. Please correct the message and the translation.
Okay, the text was from the time before the module was renamed.

ucs-school-lib (9.0.30-1):
r74740 | Bug #42399: adjust text

> Is HTTP 503 correct? Couldn't it be HTTP 412?
412 is about a HTTP pre condition (such as If-None-Match / If-Unmodified-Since).
I would also says that this is a server error because on the server side no school exists. 503 tells that the service is not available until then, please come back later. I could change it to 422 in the one case if the request doesn't contain the school. I think it's okay if both of these requests contain 503. It's better for the piwik statistics.
Comment 14 Daniel Tröder univentionstaff 2016-11-25 15:25:14 CET
(In reply to Florian Best from comment #13)
> (In reply to Daniel Tröder from comment #12)
> > REOPEN: There is no 'Add school'/'Schule hinzufügen' UMC module. It's called
> > 'Schools'/'Schulen'. Please correct the message and the translation.
> Okay, the text was from the time before the module was renamed.
> 
> ucs-school-lib (9.0.30-1):
> r74740 | Bug #42399: adjust text
OK: text, rest was already verified
Comment 15 Sönke Schwardt-Krummrich univentionstaff 2016-12-12 13:10:23 CET
UCS@school 4.1 R2 v9 has been released.

http://docs.software-univention.de/changelog-ucsschool-4.1R2v9-de.html