Add validation for NFS network and hosts fields in new UI
When creating NFS shares you have the option of setting "Authorized networks" and Authorized IP addresses or hosts". A TrueNAS customer got this backwards and was unable to identify the issue. The logs give the clue, but the customer didn't have the footer enabled. The system had a hostname of "192.168.2.1/24"
May 11 18:05:54 stars mountd3820: can't get address info for host 192.168.2.1/24
May 11 18:05:54 stars mountd3820: bad host 192.168.2.1/24, skipping
May 11 18:05:54 stars mountd3820: bad exports list line /mnt/tank 192.168.2.1/24
In the above example, the hostname or IP was added as an authorized network.
We should add some sane checks and let the WebGUI reject names that aren't clearly IPs or possible hostnames (a / character clearly won't represent an IP or hostname).
#22 Updated by Jeff Ervin over 1 year ago
- File Screen Shot 2018-10-26 at 2.16.14 PM.png Screen Shot 2018-10-26 at 2.16.14 PM.png added
- Status changed from Ready for Testing to Failed Testing
Test Failed FreeNAS-11.2-INTERNAL29
You get the validation with the Authorized Networks input, but not the Authorized Hosts and IP Addresses area. Should the save button be grayed out when there's an issue with an input field on a page? I could still access this (though it didn't save the info, after I backed out and came back in) (See screenshot)
#32 Updated by Jeff Ervin over 1 year ago
- File Screen Shot 2018-11-08 at 4.12.58 PM.png Screen Shot 2018-11-08 at 4.12.58 PM.png added
- File Screen Shot 2018-11-08 at 4.14.21 PM.png Screen Shot 2018-11-08 at 4.14.21 PM.png added
- File Screen Shot 2018-11-08 at 4.17.21 PM.png Screen Shot 2018-11-08 at 4.17.21 PM.png added
- Status changed from Ready for Testing to Passed Testing
- Needs QA changed from Yes to No
Test Passed FreeNAS-11.2-INTERNAL41
Received test case from Vaibhav Chauhan. Values inputted as specified. Option to save is unavailable for erroneous entries. Save available for accurate entries.