Details
-
Type: Improvement
-
Status: Closed
-
Priority: Major
-
Resolution: Fixed
-
Affects Version/s: None
-
Fix Version/s: 4.8.0-b1
-
Component/s: None
-
Labels:None
Description
It would be useful to have a validation service that checks whether a hostname is valid. Currently, there are multiple places in modules, and in the core, that perform similar/identical hostname validation checks. See https://www.blesta.com/forums/index.php?/topic/11833-validatehostname-should-accept-uppercase-characters/
I'm thinking a new utility under /core/Util/Validate/Server that provides a method to validate a server's hostname. Perhaps another to validate an IP address.
The Zend framework supports a Hostname validator that appears to handle domain/IDN/IP validation but it's apart of a larger library that requires php 5.6+ and adds up to almost 2MB of files. It may be best in the interim to use php's filter_var with FILTER_VALIDATE_DOMAIN and FILTER_VALIDATE_IP.
Issue Links
- blocks
-
CORE-3294 Update hostname validation for extensions
- Closed