Skip to content

Commit 8dcc1b4

Browse files
authored
Merge pull request #3589 from magento-tsg/2.2.8-develop-pr67
[TSG] Backporting for 2.2 (pr67) (2.2.8-develop)
2 parents 37099dd + b20c52e commit 8dcc1b4

File tree

5 files changed

+36
-0
lines changed

5 files changed

+36
-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

app/code/Magento/AdminNotification/Block/Grid/Renderer/Actions.php

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,9 @@
88

99
namespace Magento\AdminNotification\Block\Grid\Renderer;
1010

11+
/**
12+
* Renderer class for action in the admin notifications grid.
13+
*/
1114
class Actions extends \Magento\Backend\Block\Widget\Grid\Column\Renderer\AbstractRenderer
1215
{
1316
/**

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)