From 0c6b0902e741077d5002311d7ca79290fa671a27 Mon Sep 17 00:00:00 2001 From: kdslkdsaldsal Date: Sat, 8 Jul 2017 11:16:59 +0200 Subject: [PATCH] Only use IndexIgnore if mod_autoindex.c is enabled/loaded. --- build/.htaccess | 2 ++ config/.htaccess | 2 ++ lib/private/Setup.php | 2 ++ 3 files changed, 6 insertions(+) diff --git a/build/.htaccess b/build/.htaccess index c7a7b79feac0..853aed187d3e 100644 --- a/build/.htaccess +++ b/build/.htaccess @@ -9,4 +9,6 @@ deny from all # section for Apache 2.2 and 2.4 + IndexIgnore * + diff --git a/config/.htaccess b/config/.htaccess index c7a7b79feac0..853aed187d3e 100644 --- a/config/.htaccess +++ b/config/.htaccess @@ -9,4 +9,6 @@ deny from all # section for Apache 2.2 and 2.4 + IndexIgnore * + diff --git a/lib/private/Setup.php b/lib/private/Setup.php index d53f9f004c57..3abbb3d8cfe1 100644 --- a/lib/private/Setup.php +++ b/lib/private/Setup.php @@ -473,7 +473,9 @@ public static function protectDataDirectory() { $content.= "Satisfy All\n"; $content.= "\n\n"; $content.= "# section for Apache 2.2 and 2.4\n"; + $content.= "\n"; $content.= "IndexIgnore *\n"; + $content.= "\n"; $baseDir = \OC::$server->getConfig()->getSystemValue('datadirectory', \OC::$SERVERROOT . '/data'); file_put_contents($baseDir . '/.htaccess', $content);