File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -60,6 +60,14 @@ RewriteRule ^(.*)$ app.php [QSA,L]
6060 Order Allow ,Deny
6161 Deny from All
6262 </Files >
63+ <Files "composer.json" >
64+ Order Allow ,Deny
65+ Deny from All
66+ </Files >
67+ <Files "composer.lock" >
68+ Order Allow ,Deny
69+ Deny from All
70+ </Files >
6371 </IfVersion >
6472 <IfVersion >= 2.4 >
6573 <Files "config.php" >
@@ -68,6 +76,12 @@ RewriteRule ^(.*)$ app.php [QSA,L]
6876 <Files "common.php" >
6977 Require all denied
7078 </Files >
79+ <Files "composer.json" >
80+ Require all denied
81+ </Files >
82+ <Files "composer.lock" >
83+ Require all denied
84+ </Files >
7185 </IfVersion >
7286</IfModule >
7387<IfModule !mod_version.c >
@@ -80,6 +94,14 @@ RewriteRule ^(.*)$ app.php [QSA,L]
8094 Order Allow ,Deny
8195 Deny from All
8296 </Files >
97+ <Files "composer.json" >
98+ Order Allow ,Deny
99+ Deny from All
100+ </Files >
101+ <Files "composer.lock" >
102+ Order Allow ,Deny
103+ Deny from All
104+ </Files >
83105 </IfModule >
84106 <IfModule mod_authz_core.c >
85107 <Files "config.php" >
@@ -88,5 +110,11 @@ RewriteRule ^(.*)$ app.php [QSA,L]
88110 <Files "common.php" >
89111 Require all denied
90112 </Files >
113+ <Files "composer.json" >
114+ Require all denied
115+ </Files >
116+ <Files "composer.lock" >
117+ Require all denied
118+ </Files >
91119 </IfModule >
92120</IfModule >
Original file line number Diff line number Diff line change @@ -32,6 +32,11 @@ $HTTP["host"] == "www.myforums.com" {
3232 url.access-deny = ( "" )
3333 }
3434
35+ # Deny access to composer files.
36+ $HTTP["url"] =~ "^/composer\.(json|lock)$" {
37+ url.access-deny = ( "" )
38+ }
39+
3540 # Deny access to version control system directories.
3641 $HTTP["url"] =~ "/\.svn|/\.git" {
3742 url.access-deny = ( "" )
Original file line number Diff line number Diff line change @@ -55,7 +55,7 @@ server {
5555 }
5656
5757 # Deny access to internal phpbb files.
58- location ~ /(config|common\.php|cache|files|images/avatars/upload|includes|(?<!ext/)phpbb(?!\w+)|store|vendor|vendor-ext) {
58+ location ~ /(config|common\.php|composer\.(json|lock)| cache|files|images/avatars/upload|includes|(?<!ext/)phpbb(?!\w+)|store|vendor|vendor-ext) {
5959 deny all;
6060 # deny was ignored before 0.8.40 for connections over IPv6.
6161 # Use internal directive to prohibit access on older versions.
You can’t perform that action at this time.
0 commit comments