Do not allow underscores in hostname
User was allowed to enter the underscore character in the GUI setting for hostname; underscores are not permitted, causes error to be reported in log.
Solution: The input should be sanitized to allow only alnum, hyphen, and dot.
#9 Updated by Timur Bakeyev about 1 year ago
- Severity set to New
I wonder, why this REGEXP wasn't used. It's the correct, RFC-compliant one, so prevents hostnames like
-0, etc. Applied REGEXP is still too broad.
Timur Bakeyev wrote:
The correct hostname regexp should look something like:
#12 Updated by Dru Lavigne about 1 year ago
- Needs Doc changed from Yes to No
#13 Updated by Ethan Large about 1 year ago
- Status changed from Ready for Testing to Passed Testing
- Needs QA changed from Yes to No
Tested with FreeNAS-11.2-MASTER-201806060445-62522c5.iso.
Working as intended. Attempting to enter a hostname with an underscore or other invalid characters will result in an error message and an inability to save the name.