From 545a57e3d1866c18cce29dae67da2bd48e775ef0 Mon Sep 17 00:00:00 2001 From: "lpsolit%gmail.com" <> Date: Mon, 12 Dec 2005 10:55:46 +0000 Subject: Bug 319241: Bugzilla.pm is freely accessible from the web - Patch by Frédéric Buclin r/a=myk MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- checksetup.pl | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) (limited to 'checksetup.pl') diff --git a/checksetup.pl b/checksetup.pl index 5d901b646..614d1d7aa 100755 --- a/checksetup.pl +++ b/checksetup.pl @@ -1014,7 +1014,7 @@ if ($my_create_htaccess) { open HTACCESS, '>', '.htaccess'; print HTACCESS <<'END'; # don't allow people to retrieve non-cgi executable files or our private data - + deny from all END @@ -1028,7 +1028,15 @@ END $oldaccess .= $_; } close HTACCESS; + my $repaired = 0; if ($oldaccess =~ s/\|localconfig\|/\|.*localconfig.*\|/) { + $repaired = 1; + } + if ($oldaccess !~ /\(\.\*\\\.pm\|/) { + $oldaccess =~ s/\(/(.*\\.pm\|/; + $repaired = 1; + } + if ($repaired) { print "Repairing .htaccess...\n"; open HTACCESS, '>', '.htaccess'; print HTACCESS $oldaccess; -- cgit v1.2.3-24-g4f1b