Bug 42955 - StringSanitizer should allow a error message
StringSanitizer should allow a error message
Status: REOPENED
Product: UCS
Classification: Unclassified
Component: UMC (Generic)
UCS 4.4
Other Linux
: P5 normal (vote)
: ---
Assigned To: UMC maintainers
:
Depends on: 43326
Blocks:
  Show dependency treegraph
 
Reported: 2016-11-15 13:29 CET by Florian Best
Modified: 2019-06-26 12:14 CEST (History)
2 users (show)

See Also:
What kind of report is it?: Bug Report
What type of bug is this?: 6: Setup Problem: Issue for the setup process
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.137
Enterprise Customer affected?: Yes
School Customer affected?: Yes
ISV affected?:
Waiting Support:
Flags outvoted (downgraded) after PO Review:
Ticket number: 2019032221000441
Bug group (optional):
Max CVSS v3 score:


Attachments
Screenshot (35.78 KB, image/png)
2016-11-15 13:29 CET, Florian Best
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Florian Best univentionstaff 2016-11-15 13:29:43 CET
Created attachment 8221 [details]
Screenshot

A regular expression can be given to StringSanitizer.
StringSanitizer currently only tells that the "Value is invalid". This is not helpful.
If one could overwrite this error message via another parameter it could show a user friendly message.

I had to support some of our colleagues twice because the UCS@school installer shows this error message when the DC Slave hostname doesn't match a specific regex. They only needed this information. See attached Screenshot.
Comment 1 Florian Best univentionstaff 2016-11-15 14:42:47 CET
And even nicer would be if one could add a label for the field. Otherwise the error message always contains the internal name.
Comment 2 Stefan Gohmann univentionstaff 2019-01-03 07:22:47 CET
This issue has been filled against UCS 4.1. The maintenance with bug and security fixes for UCS 4.1 has ended on 5st of April 2018.

Customers still on UCS 4.1 are encouraged to update to UCS 4.3. Please contact
your partner or Univention for any questions.

If this issue still occurs in newer UCS versions, please use "Clone this bug" or simply reopen the issue. In this case please provide detailed information on how this issue is affecting you.
Comment 3 Christian Völker univentionstaff 2019-03-25 15:48:35 CET
As customer is affected switching to "Bug report" instead of "Development internal".

Customer trying to configure ucsschool wizard:

25.03.19 14:33:11.098  MAIN        ( PROCESS ) : CPCommand (192.168.1.2:48484) response status code: 422
25.03.19 14:33:11.098  MAIN        ( PROCESS ) : CPCommand (192.168.1.2:48484) response message: 1 Fehler aufgetreten
25.03.19 14:33:11.099  MAIN        ( PROCESS ) : CPCommand (192.168.1.2:48484) response result: {'master': u'Wert ist ung\xfcltig'}
25.03.19 14:33:11.099  MAIN        ( PROCESS ) : CPCommand (192.168.1.2:48484) response error: {'traceback': None, 'command': 'install'}
25.03.19 14:35:30.324  DEBUG_INIT
Comment 4 Florian Best univentionstaff 2019-03-25 15:51:12 CET
If this is added we should change in UCS@school:
ucsschool/ucs-school-umc-installer/umc/python/schoolinstaller/__init__.py
Every sanititer could have a meaningfull message like:
"The hostname of a UCS@school Domaincontroller must be ..."
Comment 5 Florian Best univentionstaff 2019-06-26 12:14:12 CEST
The fix is probably a bit tricky because the sanitizer arguments are evaluated at import time. Therefore the _() translation is fixed. But as the locale is already set this should work for UMC module processes.

Nice is, that the sanitizers already accept all keyword arguments, so there will no package dependencies and UCS@school modules and the fix can be released independently.