mirror of
https://github.com/pfsense/pfsense.git
synced 2025-10-26 11:38:35 +00:00
Do not allow direct download of .inc files (unparsed PHP source). Fixes #8005
This commit is contained in:
parent
e48ae6f294
commit
b1fccd4254
@ -1532,7 +1532,10 @@ EOD;
|
||||
location / {
|
||||
index index.php index.html index.htm;
|
||||
}
|
||||
|
||||
location ~ \.inc$ {
|
||||
deny all;
|
||||
return 403;
|
||||
}
|
||||
location ~ \.php$ {
|
||||
try_files \$uri =404; # This line closes a potential security hole
|
||||
# ensuring users can't execute uploaded files
|
||||
|
||||
Loading…
Reference in New Issue
Block a user