From d9ce522e0a9c92d45c5220cef313cfa965388f4e Mon Sep 17 00:00:00 2001 From: kaetemi Date: Sat, 6 Sep 2014 06:40:33 +0200 Subject: [PATCH 1/2] Now really, don't execute any scripts here --- code/web/public_php/ams/files/.htaccess | 1 + 1 file changed, 1 insertion(+) diff --git a/code/web/public_php/ams/files/.htaccess b/code/web/public_php/ams/files/.htaccess index 655df6494..6e11c1a83 100644 --- a/code/web/public_php/ams/files/.htaccess +++ b/code/web/public_php/ams/files/.htaccess @@ -1,3 +1,4 @@ +SetHandler default-handler Options -Indexes Options -ExecCGI DirectoryIndex disabled From 7499ed408c87a4feb78831e7804d9bec4e5a7d7c Mon Sep 17 00:00:00 2001 From: kaetemi Date: Sat, 6 Sep 2014 06:49:42 +0200 Subject: [PATCH 2/2] Add more paranoia --- code/web/public_php/ams/files/.htaccess | 16 ++++++++++++++-- 1 file changed, 14 insertions(+), 2 deletions(-) diff --git a/code/web/public_php/ams/files/.htaccess b/code/web/public_php/ams/files/.htaccess index 6e11c1a83..65a3a44db 100644 --- a/code/web/public_php/ams/files/.htaccess +++ b/code/web/public_php/ams/files/.htaccess @@ -1,8 +1,20 @@ +SetHandler none SetHandler default-handler -Options -Indexes Options -ExecCGI + + php_flag engine off + +RemoveHandler .cgi .php .php3 .php4 .php5 .phtml .pl .py .pyc .pyo +Options -Indexes DirectoryIndex disabled - + + SetHandler none + SetHandler default-handler + Options -ExecCGI + + php_flag engine off + + RemoveHandler .cgi .php .php3 .php4 .php5 .phtml .pl .py .pyc .pyo ForceType application/octet-stream Header set Content-Disposition attachment