Do not allow direct download of .inc files (unparsed PHP source). Fixes #8005

This commit is contained in:
jim-p 2017-10-25 14:33:34 -04:00
parent e48ae6f294
commit b1fccd4254

View File

@ -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