Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
Migrates Apache Access Syntax to 2.4 on Apaxhe >= 2.4
  • Loading branch information
jonashrem committed Oct 14, 2017
1 parent 08ec8ce commit 64943cd
Show file tree
Hide file tree
Showing 24 changed files with 309 additions and 78 deletions.
162 changes: 126 additions & 36 deletions .htaccess
Original file line number Diff line number Diff line change
Expand Up @@ -203,76 +203,166 @@
RedirectMatch 403 /\.git

<Files composer.json>
order allow,deny
deny from all
<IfVersion < 2.4>
order allow,deny
deny from all
</IfVersion>
<IfVersion >= 2.4>
Require all denied
</IfVersion>
</Files>
<Files composer.lock>
order allow,deny
deny from all
<IfVersion < 2.4>
order allow,deny
deny from all
</IfVersion>
<IfVersion >= 2.4>
Require all denied
</IfVersion>
</Files>
<Files .gitignore>
order allow,deny
deny from all
<IfVersion < 2.4>
order allow,deny
deny from all
</IfVersion>
<IfVersion >= 2.4>
Require all denied
</IfVersion>
</Files>
<Files .htaccess>
order allow,deny
deny from all
<IfVersion < 2.4>
order allow,deny
deny from all
</IfVersion>
<IfVersion >= 2.4>
Require all denied
</IfVersion>
</Files>
<Files .htaccess.sample>
order allow,deny
deny from all
<IfVersion < 2.4>
order allow,deny
deny from all
</IfVersion>
<IfVersion >= 2.4>
Require all denied
</IfVersion>
</Files>
<Files .php_cs.dist>
order allow,deny
deny from all
<IfVersion < 2.4>
order allow,deny
deny from all
</IfVersion>
<IfVersion >= 2.4>
Require all denied
</IfVersion>
</Files>
<Files .travis.yml>
order allow,deny
deny from all
<IfVersion < 2.4>
order allow,deny
deny from all
</IfVersion>
<IfVersion >= 2.4>
Require all denied
</IfVersion>
</Files>
<Files CHANGELOG.md>
order allow,deny
deny from all
<IfVersion < 2.4>
order allow,deny
deny from all
</IfVersion>
<IfVersion >= 2.4>
Require all denied
</IfVersion>
</Files>
<Files CONTRIBUTING.md>
order allow,deny
deny from all
<IfVersion < 2.4>
order allow,deny
deny from all
</IfVersion>
<IfVersion >= 2.4>
Require all denied
</IfVersion>
</Files>
<Files COPYING.txt>
order allow,deny
deny from all
<IfVersion < 2.4>
order allow,deny
deny from all
</IfVersion>
<IfVersion >= 2.4>
Require all denied
</IfVersion>
</Files>
<Files Gruntfile.js>
order allow,deny
deny from all
<IfVersion < 2.4>
order allow,deny
deny from all
</IfVersion>
<IfVersion >= 2.4>
Require all denied
</IfVersion>
</Files>
<Files LICENSE.txt>
order allow,deny
deny from all
<IfVersion < 2.4>
order allow,deny
deny from all
</IfVersion>
<IfVersion >= 2.4>
Require all denied
</IfVersion>
</Files>
<Files LICENSE_AFL.txt>
order allow,deny
deny from all
<IfVersion < 2.4>
order allow,deny
deny from all
</IfVersion>
<IfVersion >= 2.4>
Require all denied
</IfVersion>
</Files>
<Files nginx.conf.sample>
order allow,deny
deny from all
<IfVersion < 2.4>
order allow,deny
deny from all
</IfVersion>
<IfVersion >= 2.4>
Require all denied
</IfVersion>
</Files>
<Files package.json>
order allow,deny
deny from all
<IfVersion < 2.4>
order allow,deny
deny from all
</IfVersion>
<IfVersion >= 2.4>
Require all denied
</IfVersion>
</Files>
<Files php.ini.sample>
order allow,deny
deny from all
<IfVersion < 2.4>
order allow,deny
deny from all
</IfVersion>
<IfVersion >= 2.4>
Require all denied
</IfVersion>
</Files>
<Files README.md>
order allow,deny
deny from all
<IfVersion < 2.4>
order allow,deny
deny from all
</IfVersion>
<IfVersion >= 2.4>
Require all denied
</IfVersion>
</Files>
<Files magento_umask>
order allow,deny
deny from all
<IfVersion < 2.4>
order allow,deny
deny from all
</IfVersion>
<IfVersion >= 2.4>
Require all denied
</IfVersion>
</Files>

# For 404s and 403s that aren't handled by the application, show plain 404 response
Expand Down
10 changes: 8 additions & 2 deletions app/.htaccess
Original file line number Diff line number Diff line change
@@ -1,2 +1,8 @@
Order deny,allow
Deny from all
<IfVersion < 2.4>
order allow,deny
deny from all
</IfVersion>
<IfVersion >= 2.4>
Require all denied
</IfVersion>

10 changes: 8 additions & 2 deletions bin/.htaccess
Original file line number Diff line number Diff line change
@@ -1,2 +1,8 @@
Order deny,allow
Deny from all
<IfVersion < 2.4>
order allow,deny
deny from all
</IfVersion>
<IfVersion >= 2.4>
Require all denied
</IfVersion>

10 changes: 8 additions & 2 deletions dev/.htaccess
Original file line number Diff line number Diff line change
@@ -1,2 +1,8 @@
Order deny,allow
Deny from all
<IfVersion < 2.4>
order allow,deny
deny from all
</IfVersion>
<IfVersion >= 2.4>
Require all denied
</IfVersion>

Original file line number Diff line number Diff line change
@@ -1 +1,7 @@
Deny from all
<IfVersion < 2.4>
deny from all
</IfVersion>
<IfVersion >= 2.4>
Require all denied
</IfVersion>

Original file line number Diff line number Diff line change
@@ -1 +1,7 @@
Deny from all
<IfVersion < 2.4>
deny from all
</IfVersion>
<IfVersion >= 2.4>
Require all denied
</IfVersion>

Original file line number Diff line number Diff line change
@@ -1 +1,7 @@
Deny from all
<IfVersion < 2.4>
deny from all
</IfVersion>
<IfVersion >= 2.4>
Require all denied
</IfVersion>

Original file line number Diff line number Diff line change
@@ -1 +1,7 @@
Deny from all
<IfVersion < 2.4>
deny from all
</IfVersion>
<IfVersion >= 2.4>
Require all denied
</IfVersion>

Original file line number Diff line number Diff line change
@@ -1 +1,7 @@
Deny from all
<IfVersion < 2.4>
deny from all
</IfVersion>
<IfVersion >= 2.4>
Require all denied
</IfVersion>

Original file line number Diff line number Diff line change
@@ -1 +1,7 @@
Deny from all
<IfVersion < 2.4>
deny from all
</IfVersion>
<IfVersion >= 2.4>
Require all denied
</IfVersion>

10 changes: 8 additions & 2 deletions generated/.htaccess
Original file line number Diff line number Diff line change
@@ -1,2 +1,8 @@
Order deny,allow
Deny from all
<IfVersion < 2.4>
order allow,deny
deny from all
</IfVersion>
<IfVersion >= 2.4>
Require all denied
</IfVersion>

10 changes: 8 additions & 2 deletions lib/.htaccess
Original file line number Diff line number Diff line change
@@ -1,2 +1,8 @@
Order deny,allow
Deny from all
<IfVersion < 2.4>
order allow,deny
deny from all
</IfVersion>
<IfVersion >= 2.4>
Require all denied
</IfVersion>

10 changes: 8 additions & 2 deletions phpserver/.htaccess
Original file line number Diff line number Diff line change
@@ -1,2 +1,8 @@
Order deny,allow
Deny from all
<IfVersion < 2.4>
order allow,deny
deny from all
</IfVersion>
<IfVersion >= 2.4>
Require all denied
</IfVersion>

18 changes: 14 additions & 4 deletions pub/.htaccess
Original file line number Diff line number Diff line change
Expand Up @@ -190,8 +190,13 @@
## Deny access to release notes to prevent disclosure of the installed Magento version

<Files RELEASE_NOTES.txt>
order allow,deny
deny from all
<IfVersion < 2.4>
order allow,deny
deny from all
</IfVersion>
<IfVersion >= 2.4>
Require all denied
</IfVersion>
</Files>

# For 404s and 403s that aren't handled by the application, show plain 404 response
Expand All @@ -207,8 +212,13 @@ ErrorDocument 403 /errors/404.php
###########################################
## Deny access to cron.php
<Files cron.php>
order allow,deny
deny from all
<IfVersion < 2.4>
order allow,deny
deny from all
</IfVersion>
<IfVersion >= 2.4>
Require all denied
</IfVersion>
</Files>

<IfModule mod_headers.c>
Expand Down
10 changes: 8 additions & 2 deletions pub/media/customer/.htaccess
Original file line number Diff line number Diff line change
@@ -1,2 +1,8 @@
Order deny,allow
Deny from all
<IfVersion < 2.4>
order allow,deny
deny from all
</IfVersion>
<IfVersion >= 2.4>
Require all denied
</IfVersion>

10 changes: 8 additions & 2 deletions pub/media/downloadable/.htaccess
Original file line number Diff line number Diff line change
@@ -1,2 +1,8 @@
Order deny,allow
Deny from all
<IfVersion < 2.4>
order allow,deny
deny from all
</IfVersion>
<IfVersion >= 2.4>
Require all denied
</IfVersion>

10 changes: 8 additions & 2 deletions pub/media/import/.htaccess
Original file line number Diff line number Diff line change
@@ -1,2 +1,8 @@
Order deny,allow
Deny from all
<IfVersion < 2.4>
order allow,deny
deny from all
</IfVersion>
<IfVersion >= 2.4>
Require all denied
</IfVersion>

Loading

0 comments on commit 64943cd

Please sign in to comment.