Bug 33387 - Wrong dcname validation
Wrong dcname validation
Status: CLOSED FIXED
Product: UCS@school
Classification: Unclassified
Component: UMC - Wizards
UCS@school 3.2
Other Linux
: P5 normal (vote)
: UCS@school 3.2 Errata
Assigned To: Florian Best
Sönke Schwardt-Krummrich
:
: 28827 31427 (view as bug list)
Depends on:
Blocks:
  Show dependency treegraph
 
Reported: 2013-11-14 16:08 CET by Stefan Gohmann
Modified: 2014-02-07 13:51 CET (History)
3 users (show)

See Also:
What kind of report is it?: ---
What type of bug is this?: ---
Who will be affected by this bug?: ---
How will those affected feel about the bug?: ---
User Pain:
Enterprise Customer affected?:
School Customer affected?:
ISV affected?:
Waiting Support:
Flags outvoted (downgraded) after PO Review:
Ticket number:
Bug group (optional):
Max CVSS v3 score:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Stefan Gohmann univentionstaff 2013-11-14 16:08:52 CET
The school create wizard does not allow a '-' in the dcname. That makes it impossible to install / join a schooldc with a '-' in the hostname.

****************************************************************************
14.11.13 09:46:49.910  MODULE      ( INFO    ) : Starting creation of LDAP school OU structure...
14.11.13 09:46:49.911  MODULE      ( INFO    ) : Executing: /usr/sbin/umc-command -U Administrator -y /tmp/tmpFPnyiY -s master203.autotest203.local schoolwizards/schools/create -o name=Schule1 -o schooldc=slave203-1 -f schoolwizards/scho
ols
14.11.13 09:46:51.977  MODULE      ( INFO    ) : created school OU
14.11.13 09:46:51.977  MODULE      ( INFO    ) : Trying to move the slave entry in the right OU structure...
14.11.13 09:46:51.977  MODULE      ( INFO    ) : Executing: /usr/sbin/umc-command -U Administrator -y /tmp/tmpVWTi7Q -s master203.autotest203.local schoolwizards/schools/move_dc -o schooldc=slave203-1 -o schoolou=Schule1 -f schoolwizards

root@slave203-1:~# /usr/sbin/umc-command -U Administrator -P XXXXXXXX -s master203.autotest203.local schoolwizards/schools/create -o name=Schule1 -o schooldc=slave203-1 -f schoolwizards/schools
14.11.13 09:50:02.379  DEBUG_INIT
Response: COMMAND
  data length   :  176
  message length:   91
  ---
  ARGUMENTS: schoolwizards/schools/create
MIMETYPE   : application/json
  STATUS   : 200
  MESSAGE  : None
  RESULT   : {'message': u'Ung\xfcltiger Schulserver name'}
****************************************************************************

The status code should not be 200.
Comment 1 Florian Best univentionstaff 2013-11-15 11:36:57 CET
Plus: can we use a real syntax class for the validation?
currently there are also checks for the name length, etc. (copied from system-setup). That code probably exists on multiple modules.
Comment 2 Florian Best univentionstaff 2013-11-27 08:33:08 CET
*** Bug 28827 has been marked as a duplicate of this bug. ***
Comment 3 Florian Best univentionstaff 2013-11-27 08:36:22 CET
*** Bug 31427 has been marked as a duplicate of this bug. ***
Comment 4 Florian Best univentionstaff 2013-12-09 17:04:17 CET
(In reply to Stefan Gohmann from comment #0)
> The status code should not be 200.
→ Changed to 400

(In reply to Florian Best from comment #3)
> *** Bug 31427 has been marked as a duplicate of this bug. ***
> (In reply to Felix Botner from comment #1)
> The restriction of the school server name to 13 characters works.
> 
> But, if i create a school dc with 13 characters a seconds computers object
> with the same name + "v" is created for the administrational network. 
> This computer has invalid NetBIOS name.
> 
> DN: cn=aaaaaaaaaaaaa,cn=dc,cn=server,cn=computers,ou=school2,dc=test,dc=fb
> 
> DN: cn=aaaaaaaaaaaaav,cn=dc,cn=server,cn=computers,ou=school2,dc=test,dc=fb
> 
> Maybe we should restrict the name of the school server to 12 characters?
→ Has been changed to 12 characters (also for the domainname maxlength of 64 chars)

(In reply to Florian Best from comment #1)
> Plus: can we use a real syntax class for the validation?
> currently there are also checks for the name length, etc. (copied from
> system-setup). That code probably exists on multiple modules.
There is no syntax class which could be used. Afaics the same code is only used in system setup.

The fix:
The regex from the create_ou script has been copied into the module :/...

Package: ucs-school-umc-wizards
Version: 4.0.0-4.79.201312091654
Comment 5 Sönke Schwardt-Krummrich univentionstaff 2014-01-23 14:42:34 CET
OK: Code change
REOPEN: if no big deal, please limit the length of the input text widget for the 
        school server name → otherwise OK
REOPEN: missing changelog entry
Comment 6 Florian Best univentionstaff 2014-01-24 08:48:24 CET
(In reply to Sönke Schwardt-Krummrich from comment #5)
> OK: Code change
> REOPEN: if no big deal, please limit the length of the input text widget for
> the 
>         school server name → otherwise OK
The limit has been set, also a description / tooltip.

> REOPEN: missing changelog entry
Changlog created.
Comment 7 Sönke Schwardt-Krummrich univentionstaff 2014-02-03 17:49:13 CET
OK: changelog
Comment 8 Sönke Schwardt-Krummrich univentionstaff 2014-02-07 13:51:28 CET
UCS@school 3.2v2 has been released:
http://docs.univention.de/release-notes-ucsschool-3.2v2-de.pdf

If this error occurs again, please use "Clone This Bug".