- From: Michael Ernst via cvs-syncmail <cvsmail@w3.org>
- Date: Fri, 17 Oct 2008 04:34:01 +0000
- To: www-validator-cvs@w3.org
Update of /sources/public/perl/modules/W3C/LinkChecker/bin
In directory hutz:/tmp/cvs-serv22967
Modified Files:
checklink
Log Message:
Prevent (some) infinite loops.
Index: checklink
===================================================================
RCS file: /sources/public/perl/modules/W3C/LinkChecker/bin/checklink,v
retrieving revision 4.116
retrieving revision 4.117
diff -u -d -r4.116 -r4.117
--- checklink 22 Sep 2008 19:33:31 -0000 4.116
+++ checklink 17 Oct 2008 04:33:59 -0000 4.117
@@ -1552,6 +1552,9 @@
{
my ($self, $uri, $base, $line) = @_;
if (defined($uri)) {
+ # Remove repeated slashes after the . or .. in relative links, to avoid
+ # duplicated checking or infinite recursion.
+ $uri =~ s|^(\.\.?/)/+|$1|o;
$uri = URI->new_abs($uri, $base) if defined($base);
$self->{Links}{$uri}{$line}++;
}
Received on Friday, 17 October 2008 04:34:10 UTC