Skip to content

Commit 4daa54d

Browse files
committed
MAGETWO-71157: Servers Configurations Needs Update
1 parent 7351cbb commit 4daa54d

File tree

4 files changed

+33
-0
lines changed

4 files changed

+33
-0
lines changed

.htaccess

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -364,6 +364,15 @@
364364
Require all denied
365365
</IfVersion>
366366
</Files>
367+
<Files .user.ini>
368+
<IfVersion < 2.4>
369+
order allow,deny
370+
deny from all
371+
</IfVersion>
372+
<IfVersion >= 2.4>
373+
Require all denied
374+
</IfVersion>
375+
</Files>
367376

368377
# For 404s and 403s that aren't handled by the application, show plain 404 response
369378
ErrorDocument 404 /pub/errors/404.php

.htaccess.sample

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -341,6 +341,15 @@
341341
Require all denied
342342
</IfVersion>
343343
</Files>
344+
<Files .user.ini>
345+
<IfVersion < 2.4>
346+
order allow,deny
347+
deny from all
348+
</IfVersion>
349+
<IfVersion >= 2.4>
350+
Require all denied
351+
</IfVersion>
352+
</Files>
344353

345354
# For 404s and 403s that aren't handled by the application, show plain 404 response
346355
ErrorDocument 404 /pub/errors/404.php

nginx.conf.sample

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -33,6 +33,11 @@ charset UTF-8;
3333
error_page 404 403 = /errors/404.php;
3434
#add_header "X-UA-Compatible" "IE=Edge";
3535

36+
# Deny access to sensitive files
37+
location /.user.ini {
38+
deny all;
39+
}
40+
3641
# PHP entry point for setup application
3742
location ~* ^/setup($|/) {
3843
root $MAGE_ROOT;

pub/.htaccess

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -220,6 +220,16 @@ ErrorDocument 403 /errors/404.php
220220
Require all denied
221221
</IfVersion>
222222
</Files>
223+
## Deny access to .user.ini##
224+
<Files .user.ini>
225+
<IfVersion < 2.4>
226+
order allow,deny
227+
deny from all
228+
</IfVersion>
229+
<IfVersion >= 2.4>
230+
Require all denied
231+
</IfVersion>
232+
</Files>
223233

224234
<IfModule mod_headers.c>
225235
############################################

0 commit comments

Comments
 (0)