Bug 319241: Bugzilla.pm is freely accessible from the web - Patch by Frédéric Buclin <LpSolit@gmail.com> r/a=myk
git-svn-id: svn://10.0.0.236/trunk@185944 18797224-902f-48f8-a5cc-f745e15eee43
This commit is contained in:
parent
c630732145
commit
2c168c7e77
@ -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
|
||||
<FilesMatch ^(.*\.pl|.*localconfig.*)$>
|
||||
<FilesMatch ^(.*\.pm|.*\.pl|.*localconfig.*)$>
|
||||
deny from all
|
||||
</FilesMatch>
|
||||
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;
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user