Skip to content

Commit

Permalink
Bug 1133690: .htaccess incorrectly assumes that Apache 2.2.x can read…
Browse files Browse the repository at this point in the history
… new 2.4 directives

r=dkl a=glob
  • Loading branch information
LpSolit committed Feb 20, 2015
1 parent 720e7d4 commit 638dc65
Show file tree
Hide file tree
Showing 2 changed files with 19 additions and 18 deletions.
4 changes: 2 additions & 2 deletions .htaccess
Original file line number Diff line number Diff line change
@@ -1,10 +1,10 @@
# Don't allow people to retrieve non-cgi executable files or our private data
<FilesMatch (\.pm|\.pl|\.tmpl|localconfig.*)$>
<IfModule mod_version.c>
<IfVersion <= 2.2>
<IfVersion < 2.4>
Deny from all
</IfVersion>
<IfVersion > 2.2>
<IfVersion >= 2.4>
Require all denied
</IfVersion>
</IfModule>
Expand Down
33 changes: 17 additions & 16 deletions Bugzilla/Install/Filesystem.pm
Original file line number Diff line number Diff line change
Expand Up @@ -48,10 +48,10 @@ use constant HT_DEFAULT_DENY => <<EOT;
# nothing in this directory is retrievable unless overridden by an .htaccess
# in a subdirectory
<IfModule mod_version.c>
<IfVersion <= 2.2>
<IfVersion < 2.4>
Deny from all
</IfVersion>
<IfVersion > 2.2>
<IfVersion >= 2.4>
Require all denied
</IfVersion>
</IfModule>
Expand Down Expand Up @@ -351,10 +351,10 @@ EOT
# Allow access to .png and .gif files.
<FilesMatch (\\.gif|\\.png)\$>
<IfModule mod_version.c>
<IfVersion <= 2.2>
<IfVersion < 2.4>
Allow from all
</IfVersion>
<IfVersion > 2.2>
<IfVersion >= 2.4>
Require all granted
</IfVersion>
</IfModule>
Expand All @@ -365,10 +365,10 @@ EOT
# And no directory listings, either.
<IfModule mod_version.c>
<IfVersion <= 2.2>
<IfVersion < 2.4>
Deny from all
</IfVersion>
<IfVersion > 2.2>
<IfVersion >= 2.4>
Require all denied
</IfVersion>
</IfModule>
Expand All @@ -384,13 +384,14 @@ EOT
# the IP address of your webdot server.
#<FilesMatch \\.dot\$>
# <IfModule mod_version.c>
# <IfVersion <= 2.2>
# <IfVersion < 2.4>
# Allow from 127.0.0.1/24
# Deny from all
# </IfVersion>
# <IfVersion > 2.2>
# <IfVersion >= 2.4>
# Require ip 127.0.0.1/24
# Require all denied
# </IfVersion>
# </IfModule>
# <IfModule !mod_version.c>
# Allow from 127.0.0.1/24
Expand All @@ -401,10 +402,10 @@ EOT
# Allow access to .png files created by a local copy of 'dot'
<FilesMatch \\.png\$>
<IfModule mod_version.c>
<IfVersion <= 2.2>
<IfVersion < 2.4>
Allow from all
</IfVersion>
<IfVersion > 2.2>
<IfVersion >= 2.4>
Require all granted
</IfVersion>
</IfModule>
Expand All @@ -415,10 +416,10 @@ EOT
# And no directory listings, either.
<IfModule mod_version.c>
<IfVersion <= 2.2>
<IfVersion < 2.4>
Deny from all
</IfVersion>
<IfVersion > 2.2>
<IfVersion >= 2.4>
Require all denied
</IfVersion>
</IfModule>
Expand All @@ -432,10 +433,10 @@ EOT
# Allow access to .css files
<FilesMatch \\.(css|js)\$>
<IfModule mod_version.c>
<IfVersion <= 2.2>
<IfVersion < 2.4>
Allow from all
</IfVersion>
<IfVersion > 2.2>
<IfVersion >= 2.4>
Require all granted
</IfVersion>
</IfModule>
Expand All @@ -446,10 +447,10 @@ EOT
# And no directory listings, either.
<IfModule mod_version.c>
<IfVersion <= 2.2>
<IfVersion < 2.4>
Deny from all
</IfVersion>
<IfVersion > 2.2>
<IfVersion >= 2.4>
Require all denied
</IfVersion>
</IfModule>
Expand Down

0 comments on commit 638dc65

Please sign in to comment.