]> git.ipfire.org Git - thirdparty/bugzilla.git/commitdiff
Bug 351243: Public webdot server changed its IP address
authormkanat%bugzilla.org <>
Sat, 23 Sep 2006 06:02:23 +0000 (06:02 +0000)
committermkanat%bugzilla.org <>
Sat, 23 Sep 2006 06:02:23 +0000 (06:02 +0000)
Patch By Max Kanat-Alexander <mkanat@bugzilla.org> r=colin, a=justdave

checksetup.pl

index b35f965f60ec8c2de9ec0acdebb56d5ec8af5dcc..f7d3513e486872a71afd1cae215f0708d126886c 100755 (executable)
@@ -1094,7 +1094,7 @@ END
 # if research.att.com ever changes their IP, or if you use a different
 # webdot server, you'll need to edit this
 <FilesMatch \.dot$>
-  Allow from 192.20.225.10
+  Allow from 192.20.225.0/24
   Deny from all
 </FilesMatch>
 
@@ -1109,6 +1109,21 @@ END
     close HTACCESS;
     chmod $fileperm, "$webdotdir/.htaccess";
   }
+  else {
+      # The public webdot IP address changed.
+      my $webdot = new IO::File("$webdotdir/.htaccess", 'r')
+         || die "$webdotdir/.htaccess: $!";
+      my $webdot_data;
+      { local $/; $webdot_data = <$webdot>; }
+      $webdot->close;
+      if ($webdot_data =~ /192\.20\.225\.10/) {
+          print "Repairing $webdotdir/.htaccess...\n";
+          $webdot_data =~ s/192\.20\.225\.10/192.20.225.0\/24/g;
+          $webdot = new IO::File("$webdotdir/.htaccess", 'w') || die $!;
+          print $webdot $webdot_data;
+          $webdot->close;
+      }
+  }
 
 }