-
Bug
-
Resolution: Done
-
Minor
-
None
-
1
-
Interact Sprint 63, Interact Sprint 64
** Note that this is a public ticket, please refrain from adding any sensitive data. **
Description of Problem
It is possible to set both Display name and Ansible hostname to a space character, ' '. Not only this makes the UI confusing, it makes you unable to click the host in the Systems page: you have to click Edit, change the name and only then you can open the host details.
Trailing whitespace is cleaned on some places, but not consistently; display name "test " is stored as such.
How reproducible
Always
Steps to Reproduce
- Open host details
- Edit display name or ansible hostname to be just a space
Or
- Run insights-client --display-name " "
Actual Behavior
You can set their values to a single space character.
Expected Behavior
Both Display name and Ansible hostname should be stripped from whitespace on both prefix and suffix. If the stripped value is an empty string, the value is rejected.
Business Impact / Additional info{}{}
Handling of those two values is also inconsistent. It is possible to run insights-client --ansible-host "", which will result in the value being reset to the value of Hostname. insights-client --display-name "" results in a error 400 'Length must be between 1 and 200.'. There's no preference into which behavior is correct, but they should be consistent.
- mentioned on