Commit 3b0560db authored by mkanat%bugzilla.org's avatar mkanat%bugzilla.org

Bug 351243: Public webdot server changed its IP address

Patch By Max Kanat-Alexander <mkanat@bugzilla.org> r=colin, a=justdave
parent 4c0d90b0
...@@ -380,7 +380,7 @@ sub bz_locations { ...@@ -380,7 +380,7 @@ sub bz_locations {
# change showdependencygraph.cgi to set image_url to the correct # change showdependencygraph.cgi to set image_url to the correct
# location. # location.
# The script should really generate these graphs directly... # The script should really generate these graphs directly...
'webdotdir' => "$libpath/$datadir/webdot", 'webdotdir' => "$datadir/webdot",
'extensionsdir' => "$libpath/extensions", 'extensionsdir' => "$libpath/extensions",
}; };
} }
......
...@@ -257,7 +257,7 @@ EOT ...@@ -257,7 +257,7 @@ EOT
# if research.att.com ever changes their IP, or if you use a different # if research.att.com ever changes their IP, or if you use a different
# webdot server, you'll need to edit this # webdot server, you'll need to edit this
<FilesMatch \\.dot\$> <FilesMatch \\.dot\$>
Allow from 192.20.225.10 Allow from 192.20.225.0/24
Deny from all Deny from all
</FilesMatch> </FilesMatch>
...@@ -385,6 +385,22 @@ sub create_htaccess { ...@@ -385,6 +385,22 @@ sub create_htaccess {
print $htaccess $old_data; print $htaccess $old_data;
$htaccess->close; $htaccess->close;
} }
my $webdot_dir = bz_locations()->{'webdotdir'};
# The public webdot IP address changed.
my $webdot = new IO::File("$webdot_dir/.htaccess", 'r')
|| die "$webdot_dir/.htaccess: $!";
my $webdot_data;
{ local $/; $webdot_data = <$webdot>; }
$webdot->close;
if ($webdot_data =~ /192\.20\.225\.10/) {
print "Repairing $webdot_dir/.htaccess...\n";
$webdot_data =~ s/192\.20\.225\.10/192.20.225.0\/24/g;
$webdot = new IO::File("$webdot_dir/.htaccess", 'w') || die $!;
print $webdot $webdot_data;
$webdot->close;
}
} }
# A helper for the above functions. # A helper for the above functions.
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment