Issues

ZF-3091: Zend_Validate_Hostname incorrect local network name errors

Issue Type: Bug Created: 2008-04-10T06:17:42.000+0000 Last Updated: 2008-09-02T10:39:38.000+0000 Status: Resolved Fix version(s): - 1.6.0 (02/Sep/08)

Reporter: Joakim Nygård (jokke) Assignee: Joakim Nygård (jokke) Tags: - Zend_Validate

Related issues: Attachments: - Zend_Validate_Hostname.diff

Description

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:

  1. The isValid() method on line 413 checks if the hostname is a valid local network name and correctly sets an error if not.
  2. Regardless of the result above, line 418 does a check if local names are allowed at all and so also sets an error.
  3. 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

<pre class="highlight">

to

Comments

Posted by Joakim Nygård (jokke) on 2008-04-10T06:18:15.000+0000

Trivial patch to correct issue described

Posted by Joakim Nygård (jokke) on 2008-04-10T14:53:07.000+0000

Fixed in r9195

Posted by Darby Felton (darby) on 2008-04-22T08:44:18.000+0000

Marked as fixed for next minor release pending merge of changes to release-1.5 branch.

Posted by Joakim Nygård (jokke) on 2008-05-09T07:20:13.000+0000

Merged to 1.5 branch in r9432

Posted by Wil Sinclair (wil) on 2008-09-02T10:39:38.000+0000

Updating for the 1.6.0 release.

Have you found an issue?

See the Overview section for more details.

Copyright

© 2006-2016 by Zend, a Rogue Wave Company. Made with by awesome contributors.

This website is built using zend-expressive and it runs on PHP 7.

Contacts