From: Max Kanat-Alexander Date: Sun, 23 May 2010 05:08:02 +0000 (-0700) Subject: Bug 560733: Move the base .htaccess file into bzr instead of having it X-Git-Tag: bugzilla-3.7.1~57 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=0481e9aa5d957665c206c9de1efc8c7f8c56cb4c;p=thirdparty%2Fbugzilla.git Bug 560733: Move the base .htaccess file into bzr instead of having it generated by checksetup.pl r=LpSolit, a=mkanat --- diff --git a/.htaccess b/.htaccess new file mode 100644 index 0000000000..72a96e0644 --- /dev/null +++ b/.htaccess @@ -0,0 +1,4 @@ +# Don't allow people to retrieve non-cgi executable files or our private data + + deny from all + diff --git a/Bugzilla/Install/Filesystem.pm b/Bugzilla/Install/Filesystem.pm index 4dc8a484d2..eb959f0f3b 100644 --- a/Bugzilla/Install/Filesystem.pm +++ b/Bugzilla/Install/Filesystem.pm @@ -279,14 +279,8 @@ EOT contents => HT_DEFAULT_DENY }, 't/.htaccess' => { perms => $ws_readable, contents => HT_DEFAULT_DENY }, - - '.htaccess' => { perms => $ws_readable, contents => < - deny from all - -EOT - }, + "$datadir/.htaccess" => { perms => $ws_readable, + contents => HT_DEFAULT_DENY }, "$webdotdir/.htaccess" => { perms => $ws_readable, contents => < { perms => $ws_readable, contents => <{htaccess}}); # Repair old .htaccess files - my $htaccess = new IO::File('.htaccess', 'r') || die ".htaccess: $!"; - my $old_data; - { local $/; $old_data = <$htaccess>; } - $htaccess->close; - - my $repaired = 0; - if ($old_data =~ s/\|localconfig\|/\|.*localconfig.*\|/) { - $repaired = 1; - } - if ($old_data !~ /\(\.\*\\\.pm\|/) { - $old_data =~ s/\(/(.*\\.pm\|/; - $repaired = 1; - } - if ($repaired) { - print "Repairing .htaccess...\n"; - $htaccess = new IO::File('.htaccess', 'w') || die $!; - print $htaccess $old_data; - $htaccess->close; - } - my $webdot_dir = bz_locations()->{'webdotdir'}; # The public webdot IP address changed.