summaryrefslogtreecommitdiffstats
path: root/Bugzilla/Install
diff options
context:
space:
mode:
authormkanat%bugzilla.org <>2006-09-23 08:01:00 +0200
committermkanat%bugzilla.org <>2006-09-23 08:01:00 +0200
commit3b0560db062187054b254a441935ab8d34287e7f (patch)
treee74b013f95fb5caaa146a840d64fd753f8ef0240 /Bugzilla/Install
parent4c0d90b0e04bc1957d781709a12adfc93758175a (diff)
downloadbugzilla-3b0560db062187054b254a441935ab8d34287e7f.tar.gz
bugzilla-3b0560db062187054b254a441935ab8d34287e7f.tar.xz
Bug 351243: Public webdot server changed its IP address
Patch By Max Kanat-Alexander <mkanat@bugzilla.org> r=colin, a=justdave
Diffstat (limited to 'Bugzilla/Install')
-rw-r--r--Bugzilla/Install/Filesystem.pm18
1 files changed, 17 insertions, 1 deletions
diff --git a/Bugzilla/Install/Filesystem.pm b/Bugzilla/Install/Filesystem.pm
index cb2800dd7..c9c090bb0 100644
--- a/Bugzilla/Install/Filesystem.pm
+++ b/Bugzilla/Install/Filesystem.pm
@@ -257,7 +257,7 @@ EOT
# 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>
@@ -385,6 +385,22 @@ sub create_htaccess {
print $htaccess $old_data;
$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.