From: mkanat%bugzilla.org <> Date: Sat, 23 Sep 2006 06:02:23 +0000 (+0000) Subject: Bug 351243: Public webdot server changed its IP address X-Git-Tag: bugzilla-2.22.1~15 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=b66468fdff01fc92666409dabbaa95e5fea3dada;p=thirdparty%2Fbugzilla.git Bug 351243: Public webdot server changed its IP address Patch By Max Kanat-Alexander r=colin, a=justdave --- diff --git a/checksetup.pl b/checksetup.pl index b35f965f60..f7d3513e48 100755 --- a/checksetup.pl +++ b/checksetup.pl @@ -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 - Allow from 192.20.225.10 + Allow from 192.20.225.0/24 Deny from all @@ -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; + } + } }