Skip Menu |

This queue is for tickets about the CGI-Untaint-url CPAN distribution.

Report information
The Basics
Id: 11582
Status: resolved
Priority: 0/
Queue: CGI-Untaint-url

People
Owner: Nobody in particular
Requestors: simonw [...] digitalcraftsmen.net
Cc:
AdminCc:

Bug Information
Severity: (no value)
Broken in: 1.00
Fixed in: (no value)



Subject: make test still broken for uri::find > 0.12
URI::Find removes schemeless checking from version 0.13 so most tests now fail. Attached patch fixes it at the expense of moving one test into the OK list. Please consider updating this module as using CGI::Untaint quickly becomes frustrating when you have to debug the untainters. Many thanks, Simon W.
diff -ur CGI-Untaint-url-0.03.orig/lib/CGI/Untaint/url.pm CGI-Untaint-url-0.03.new/lib/CGI/Untaint/url.pm --- CGI-Untaint-url-0.03.orig/lib/CGI/Untaint/url.pm 2002-02-03 14:25:16.000000000 +0000 +++ CGI-Untaint-url-0.03.new/lib/CGI/Untaint/url.pm 2005-02-20 08:11:32.000000000 +0000 @@ -2,7 +2,7 @@ use strict; use base 'CGI::Untaint::printable'; -use URI::Find; +use URI::Find::Schemeless; use vars qw/$VERSION/; $VERSION = '0.03'; @@ -11,7 +11,8 @@ my $self = shift; my $value = $self->value or die "No value\n"; my @urls; - find_uris($value, sub { push @urls, shift }); + my $finder = URI::Find::Schemeless->new( sub { push @urls, shift } ); + $finder->find(\$value); return $self->value($urls[0]) if @urls; return; } diff -ur CGI-Untaint-url-0.03.orig/Makefile.PL CGI-Untaint-url-0.03.new/Makefile.PL --- CGI-Untaint-url-0.03.orig/Makefile.PL 2002-02-03 14:25:04.000000000 +0000 +++ CGI-Untaint-url-0.03.new/Makefile.PL 2005-02-20 08:22:03.000000000 +0000 @@ -5,7 +5,7 @@ VERSION_FROM => 'lib/CGI/Untaint/url.pm', PREREQ_PM => { CGI::Untaint => 0.07, - URI::Find => 0.01, + URI::Find => 0.14, }, ($] > 5.005 ? () : ( ABSTRACT_FROM => 'lib/CGI/Untaint/url.pm', diff -ur CGI-Untaint-url-0.03.orig/t/url.t CGI-Untaint-url-0.03.new/t/url.t --- CGI-Untaint-url-0.03.orig/t/url.t 2002-02-03 14:26:13.000000000 +0000 +++ CGI-Untaint-url-0.03.new/t/url.t 2005-02-20 08:12:45.000000000 +0000 @@ -1,6 +1,6 @@ #!/usr/bin/perl -w -use Test::More tests => 15; +use Test::More tests => 16; use strict; use CGI; @@ -13,11 +13,11 @@ 'See: http://www.redmeat.com/redmeat/1996-09-30/', '[http://www.angelfire.com/la/carlosmay/Tof.html]', 'ftp://ftp.ftp.org/', + 'tmtm.com', ); my @not = ( 'random string of text', - 'tmtm.com', ); my $count = 1;