Univention Bugzilla – Bug 37802
ucs-test: Minus in hostname should be valid
Last modified: 2015-03-09 12:03:38 CET
Please write a test script, that checks valid and invalid host names against the ucs-school-lib. Please also check if additional test scripts are possible. +++ This bug was initially created as a clone of Bug #36034 +++ Found at #2014092921000445: ucs-school-lib/python/models/attributes.py overrides the valid syntax for hostnames: regex = re.compile('^[a-zA-Z0-9](([a-zA-Z0-9_]*)([a-zA-Z0-9]$))?$') This is wrong! "-" in hostnames is also valid. This leads to unseen erros if a new school dc contains a "-" and the install wizard is used. It just fails without any menaingful error message.
A new test script with the name "106_valid_hostname" is created to test hostname validity/invalidity for domaincontroller names when creating new ou via: 1- ucs-school-lib 2- ucs-school-import script 3- UMCP module The special characters used for testing validation are hard coded, so if any new characters are allowed, this script should be modified.