File tree Expand file tree Collapse file tree 4 files changed +35
-0
lines changed Expand file tree Collapse file tree 4 files changed +35
-0
lines changed Original file line number Diff line number Diff line change @@ -114,6 +114,15 @@ DirectoryIndex index.php
114
114
order allow,deny
115
115
deny from all
116
116
</Files >
117
+ <Files .user.ini >
118
+ <IfVersion < 2.4 >
119
+ order allow,deny
120
+ deny from all
121
+ </IfVersion >
122
+ <IfVersion >= 2.4 >
123
+ Require all denied
124
+ </IfVersion >
125
+ </Files >
117
126
ErrorDocument 404 /pub/errors/404 .php
118
127
ErrorDocument 403 /pub/errors/404 .php
119
128
<IfModule mod_headers.c >
Original file line number Diff line number Diff line change @@ -278,6 +278,15 @@ DirectoryIndex index.php
278
278
order allow,deny
279
279
deny from all
280
280
</Files>
281
+ <Files .user.ini>
282
+ <IfVersion < 2.4>
283
+ order allow,deny
284
+ deny from all
285
+ </IfVersion>
286
+ <IfVersion >= 2.4>
287
+ Require all denied
288
+ </IfVersion>
289
+ </Files>
281
290
282
291
# For 404s and 403s that aren't handled by the application, show plain 404 response
283
292
ErrorDocument 404 /pub/errors/404.php
Original file line number Diff line number Diff line change @@ -33,6 +33,11 @@ charset UTF-8;
33
33
error_page 404 403 = /errors/404.php;
34
34
#add_header "X-UA-Compatible" "IE=Edge";
35
35
36
+ # Deny access to sensitive files
37
+ location /.user.ini {
38
+ deny all;
39
+ }
40
+
36
41
# PHP entry point for setup application
37
42
location ~* ^/setup($|/) {
38
43
root $MAGE_ROOT;
Original file line number Diff line number Diff line change @@ -210,6 +210,18 @@ ErrorDocument 403 /errors/404.php
210
210
deny from all
211
211
</Files >
212
212
213
+ ###########################################
214
+ ## Deny access to .user.ini
215
+ <Files .user.ini >
216
+ <IfVersion < 2.4 >
217
+ order allow,deny
218
+ deny from all
219
+ </IfVersion >
220
+ <IfVersion >= 2.4 >
221
+ Require all denied
222
+ </IfVersion >
223
+ </Files >
224
+
213
225
<IfModule mod_headers.c >
214
226
############################################
215
227
## Prevent clickjacking
You can’t perform that action at this time.
0 commit comments