From 67d5ec373e899ab52a23ceecb886c906a5375690 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 6763d9699213c14cd553fd2d0e3e0dc5b80fd1da 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