- From: Ville Skytta via cvs-syncmail <cvsmail@w3.org>
- Date: Sun, 04 Jan 2009 22:12:17 +0000
- To: www-validator-cvs@w3.org
Update of /sources/public/validator/httpd/cgi-bin In directory hutz:/tmp/cvs-serv9896 Modified Files: check Log Message: Always allow user agent to access locally configured HTML5 validator. Index: check =================================================================== RCS file: /sources/public/validator/httpd/cgi-bin/check,v retrieving revision 1.629 retrieving revision 1.630 diff -u -d -r1.629 -r1.630 --- check 4 Jan 2009 21:52:22 -0000 1.629 +++ check 4 Jan 2009 22:12:15 -0000 1.630 @@ -3109,9 +3109,17 @@ sub uri_ok { my ($self, $uri) = @_; + return 1 if ($self->{'W3C::Validator::CFG'}->{'Allow Private IPs'} or !$uri->can('host')); + my $h5uri = $self->{'W3C::Validator::CFG'}->{External}->{HTML5}; + if ($h5uri) { + my $clone = $uri->clone(); $clone->query(undef); $clone->fragment(undef); + $h5uri = URI->new($h5uri); $h5uri->query(undef); $h5uri->fragment(undef); + return 1 if $clone->eq($h5uri); + } + my $addr = my $iptype = undef; if (my $host = gethostbyname($uri->host())) { $addr = inet_ntoa($host->addr()) if $host->addr();
Received on Sunday, 4 January 2009 22:12:26 UTC