Skip to content

Commit

Permalink
MAGETWO-40265: sensitive resources are web-accessible
Browse files Browse the repository at this point in the history
  • Loading branch information
Dale Sikkema committed Jul 16, 2015
1 parent 57a09f4 commit 5bc62a6
Show file tree
Hide file tree
Showing 8 changed files with 88 additions and 9 deletions.
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -47,3 +47,4 @@ atlassian*
/var/*
!/var/.htaccess
/vendor
!/vendor/.htaccess
80 changes: 74 additions & 6 deletions .htaccess
Original file line number Diff line number Diff line change
Expand Up @@ -170,13 +170,81 @@
</IfModule>

###########################################
## Deny access to release notes to prevent disclosure of the installed Magento version

<Files RELEASE_NOTES.txt>
Order allow,deny
Deny from all
## Deny access to root files to hide sensitive application information
<Files composer.json>
order allow,deny
deny from all
</Files>
############################################
<Files composer.lock>
order allow,deny
deny from all
</Files>
<Files .gitignore>
order allow,deny
deny from all
</Files>
<Files .htaccess>
order allow,deny
deny from all
</Files>
<Files .htaccess.sample>
order allow,deny
deny from all
</Files>
<Files .php_cs>
order allow,deny
deny from all
</Files>
<Files .travis.yml>
order allow,deny
deny from all
</Files>
<Files CHANGELOG.md>
order allow,deny
deny from all
</Files>
<Files CONTRIBUTING.md>
order allow,deny
deny from all
</Files>
<Files CONTRIBUTOR_LICENSE_AGREEMENT.html>
order allow,deny
deny from all
</Files>
<Files COPYING.txt>
order allow,deny
deny from all
</Files>
<Files Gruntfile.js>
order allow,deny
deny from all
</Files>
<Files LICENSE.txt>
order allow,deny
deny from all
</Files>
<Files LICENSE_AFL.txt>
order allow,deny
deny from all
</Files>
<Files nginx.conf.sample>
order allow,deny
deny from all
</Files>
<Files package.json>
order allow,deny
deny from all
</Files>
<Files php.ini.sample>
order allow,deny
deny from all
</Files>
<Files README.md>
order allow,deny
deny from all
</Files>

################################
## If running in cluster environment, uncomment this
## http://developer.yahoo.com/performance/rules.html#etags

Expand Down
6 changes: 3 additions & 3 deletions pub/errors/.htaccess
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,6 @@ Options None
<IfModule mod_rewrite.c>
RewriteEngine Off
</IfModule>
<FilesMatch "\.(xml|phtml)$">
Deny from all
</FilesMatch>

order allow,deny
deny from all
2 changes: 2 additions & 0 deletions setup/config/.htaccess
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
order allow,deny
deny from all
2 changes: 2 additions & 0 deletions setup/performance-toolkit/.htaccess
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
order allow,deny
deny from all
2 changes: 2 additions & 0 deletions setup/src/.htaccess
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
order allow,deny
deny from all
2 changes: 2 additions & 0 deletions setup/view/.htaccess
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
order allow,deny
deny from all
2 changes: 2 additions & 0 deletions vendor/.htaccess
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
Order allow,deny
Deny from all

0 comments on commit 5bc62a6

Please sign in to comment.