ZF-3091: Zend_Validate_Hostname incorrect local network name errors
Using the Zend_Validate_Hostname with the default setting of not allowing local hostnames will produce incorrect errors when given an invalid local network name such as machine_local:
- The isValid() method on line 413 checks if the hostname is a valid local network name and correctly sets an error if not.
- Regardless of the result above, line 418 does a check if local names are allowed at all and so also sets an error.
- The result is these errors, both of which cannot be correct simultaneously:
- 'machine_local' does not appear to be a valid local network name - 'machine_local' appears to be a local network name but local network names are not allowed
Attached is a patch to correct line 418 from