Skip to content

Commit 3adadf2

Browse files
committed
Added .htaccess file to models folder that prevents access to potentially unsafe files.
1 parent 10e960b commit 3adadf2

File tree

2 files changed

+19
-0
lines changed

2 files changed

+19
-0
lines changed

.gitignore

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -177,6 +177,7 @@ development/templates_c/
177177
#Models
178178
models/*
179179
!models/.keep
180+
!models/.htaccess
180181

181182
#Ignore Node Modules
182183
node_modules/

models/.htaccess

Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,18 @@
1+
<IfModule mod_authz_core.c> # Apache 2.4
2+
Require all granted
3+
</IfModule>
4+
<IfModule ! mod_authz_core.c> # Apache 2.2
5+
Allow from all
6+
</IfModule>
7+
8+
<FilesMatch "(?i)\.(php|php3?|phtml|ph3|php4|ph4|php5|ph5|phtm|sh|asp|cgi|py|pl|exe|aspx)$">
9+
<IfModule mod_authz_core.c> # Apache 2.4
10+
Require all denied
11+
</IfModule>
12+
<IfModule ! mod_authz_core.c> # Apache 2.2
13+
Deny from all
14+
Order Deny,Allow
15+
</IfModule>
16+
</FilesMatch>
17+
18+
Options -Indexes

0 commit comments

Comments
 (0)