W3C home > Mailing lists > Public > www-validator-cvs@w3.org > July 2007

perl/modules/W3C/LinkChecker/bin checklink,4.60,4.61

From: Ville Skytta via cvs-syncmail <cvsmail@w3.org>
Date: Sun, 29 Jul 2007 18:56:21 +0000
To: www-validator-cvs@w3.org
Message-Id: <E1IFDwD-0001zZ-Di@lionel-hutz.w3.org>

Update of /sources/public/perl/modules/W3C/LinkChecker/bin
In directory hutz:/tmp/cvs-serv7618

Modified Files:
	checklink 
Log Message:
Protect regexp metacharacters in masquerade URLs.

Index: checklink
===================================================================
RCS file: /sources/public/perl/modules/W3C/LinkChecker/bin/checklink,v
retrieving revision 4.60
retrieving revision 4.61
diff -u -d -r4.60 -r4.61
--- checklink	29 Jul 2007 16:51:00 -0000	4.60
+++ checklink	29 Jul 2007 18:56:18 -0000	4.61
@@ -831,12 +831,12 @@
       if (!defined($abs_link_uri) && $link_uri->scheme() =~ /^sips?$/);
 
     if ($Opts{Masquerade}) {
-      if ($abs_link_uri =~ m|^$Opts{Masquerade_From}|) {
+      if ($abs_link_uri =~ m|^\Q$Opts{Masquerade_From}\E|) {
         printf("processing %s in base %s\n",
                $abs_link_uri, $Opts{Masquerade_To});
         my $nlink = $abs_link_uri;
         $nlink =~
-          s|^$Opts{Masquerade_From}|$Opts{Masquerade_To}|;
+          s|^\Q$Opts{Masquerade_From}\E|$Opts{Masquerade_To}|;
         $abs_link_uri = URI->new($nlink);
       };
     }
Received on Sunday, 29 July 2007 18:56:22 GMT

This archive was generated by hypermail 2.2.0+W3C-0.50 : Thursday, 26 April 2012 12:54:58 GMT