CC: | <sonnen [...] richardsonnen.com> |
Subject: | Data::Validate::URI (v0.03) - Numerical IP address URIs incorrectly fail validation |
Date: | Mon, 19 Nov 2007 16:48:22 -0500 |
To: | <bug-Data-Validate-URI [...] rt.cpan.org> |
From: | "Kindlund, Darien F." <kindlund [...] mitre.org> |
Using: Data::Validate::URI v0.03
For example:
is_web_uri("http://192.168.0.1") fails
is_http_uri("http://192.168.0.1") fails
These URLs should not fail validation. They are valid URLs and simply
correspond with IP addresses (not domain names). Specifically, I do
not understand why the following code exists in URI.pm:is_http_uri()
(line 277):
return unless Data::Validate::Domain::is_domain($authority);
Why do you check if the URL has a valid domain?
At the least, please update the is_http_uri() to do the right thing
with proper URLs that have IP addresses.
Thanks,
--
Darien Kindlund
The MITRE Corporation
InfoSec Engineer / Scientist, Sr.