Commit 639b50f3 authored by Frédéric Buclin's avatar Frédéric Buclin

Bug 1133690: .htaccess incorrectly assumes that Apache 2.2.x can read new 2.4 directives

r=dkl a=glob
parent 9f1e3658
# Don't allow people to retrieve non-cgi executable files or our private data # Don't allow people to retrieve non-cgi executable files or our private data
<FilesMatch (\.pm|\.pl|\.tmpl|localconfig.*)$> <FilesMatch (\.pm|\.pl|\.tmpl|localconfig.*)$>
<IfModule mod_version.c> <IfModule mod_version.c>
<IfVersion <= 2.2> <IfVersion < 2.4>
Deny from all Deny from all
</IfVersion> </IfVersion>
<IfVersion > 2.2> <IfVersion >= 2.4>
Require all denied Require all denied
</IfVersion> </IfVersion>
</IfModule> </IfModule>
......
...@@ -48,10 +48,10 @@ use constant HT_DEFAULT_DENY => <<EOT; ...@@ -48,10 +48,10 @@ use constant HT_DEFAULT_DENY => <<EOT;
# nothing in this directory is retrievable unless overridden by an .htaccess # nothing in this directory is retrievable unless overridden by an .htaccess
# in a subdirectory # in a subdirectory
<IfModule mod_version.c> <IfModule mod_version.c>
<IfVersion <= 2.2> <IfVersion < 2.4>
Deny from all Deny from all
</IfVersion> </IfVersion>
<IfVersion > 2.2> <IfVersion >= 2.4>
Require all denied Require all denied
</IfVersion> </IfVersion>
</IfModule> </IfModule>
...@@ -350,10 +350,10 @@ EOT ...@@ -350,10 +350,10 @@ EOT
# Allow access to .png and .gif files. # Allow access to .png and .gif files.
<FilesMatch (\\.gif|\\.png)\$> <FilesMatch (\\.gif|\\.png)\$>
<IfModule mod_version.c> <IfModule mod_version.c>
<IfVersion <= 2.2> <IfVersion < 2.4>
Allow from all Allow from all
</IfVersion> </IfVersion>
<IfVersion > 2.2> <IfVersion >= 2.4>
Require all granted Require all granted
</IfVersion> </IfVersion>
</IfModule> </IfModule>
...@@ -364,10 +364,10 @@ EOT ...@@ -364,10 +364,10 @@ EOT
# And no directory listings, either. # And no directory listings, either.
<IfModule mod_version.c> <IfModule mod_version.c>
<IfVersion <= 2.2> <IfVersion < 2.4>
Deny from all Deny from all
</IfVersion> </IfVersion>
<IfVersion > 2.2> <IfVersion >= 2.4>
Require all denied Require all denied
</IfVersion> </IfVersion>
</IfModule> </IfModule>
...@@ -383,11 +383,11 @@ EOT ...@@ -383,11 +383,11 @@ EOT
# webdot server, you'll need to edit this # webdot server, you'll need to edit this
<FilesMatch \\.dot\$> <FilesMatch \\.dot\$>
<IfModule mod_version.c> <IfModule mod_version.c>
<IfVersion <= 2.2> <IfVersion < 2.4>
Allow from 192.20.225.0/24 Allow from 192.20.225.0/24
Deny from all Deny from all
</IfVersion> </IfVersion>
<IfVersion > 2.2> <IfVersion >= 2.4>
Require ip 192.20.225.0/24 Require ip 192.20.225.0/24
Require all denied Require all denied
</IfVersion> </IfVersion>
...@@ -401,10 +401,10 @@ EOT ...@@ -401,10 +401,10 @@ EOT
# Allow access to .png files created by a local copy of 'dot' # Allow access to .png files created by a local copy of 'dot'
<FilesMatch \\.png\$> <FilesMatch \\.png\$>
<IfModule mod_version.c> <IfModule mod_version.c>
<IfVersion <= 2.2> <IfVersion < 2.4>
Allow from all Allow from all
</IfVersion> </IfVersion>
<IfVersion > 2.2> <IfVersion >= 2.4>
Require all granted Require all granted
</IfVersion> </IfVersion>
</IfModule> </IfModule>
...@@ -415,10 +415,10 @@ EOT ...@@ -415,10 +415,10 @@ EOT
# And no directory listings, either. # And no directory listings, either.
<IfModule mod_version.c> <IfModule mod_version.c>
<IfVersion <= 2.2> <IfVersion < 2.4>
Deny from all Deny from all
</IfVersion> </IfVersion>
<IfVersion > 2.2> <IfVersion >= 2.4>
Require all denied Require all denied
</IfVersion> </IfVersion>
</IfModule> </IfModule>
...@@ -432,10 +432,10 @@ EOT ...@@ -432,10 +432,10 @@ EOT
# Allow access to .css files # Allow access to .css files
<FilesMatch \\.(css|js)\$> <FilesMatch \\.(css|js)\$>
<IfModule mod_version.c> <IfModule mod_version.c>
<IfVersion <= 2.2> <IfVersion < 2.4>
Allow from all Allow from all
</IfVersion> </IfVersion>
<IfVersion > 2.2> <IfVersion >= 2.4>
Require all granted Require all granted
</IfVersion> </IfVersion>
</IfModule> </IfModule>
...@@ -446,10 +446,10 @@ EOT ...@@ -446,10 +446,10 @@ EOT
# And no directory listings, either. # And no directory listings, either.
<IfModule mod_version.c> <IfModule mod_version.c>
<IfVersion <= 2.2> <IfVersion < 2.4>
Deny from all Deny from all
</IfVersion> </IfVersion>
<IfVersion > 2.2> <IfVersion >= 2.4>
Require all denied Require all denied
</IfVersion> </IfVersion>
</IfModule> </IfModule>
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment