Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Only use IndexIgnore if mod_autoindex.c is enabled/loaded.
  • Loading branch information
kdslkdsaldsal committed Aug 5, 2017
commit 4b96ccfeb5d014967f4bb0176d6c0e2dc3144725
2 changes: 2 additions & 0 deletions build/.htaccess
Original file line number Diff line number Diff line change
Expand Up @@ -9,4 +9,6 @@ deny from all
</ifModule>

# section for Apache 2.2 and 2.4
<ifModule mod_autoindex.c>
IndexIgnore *
</ifModule>
2 changes: 2 additions & 0 deletions config/.htaccess
Original file line number Diff line number Diff line change
Expand Up @@ -9,4 +9,6 @@ deny from all
</ifModule>

# section for Apache 2.2 and 2.4
<ifModule mod_autoindex.c>
IndexIgnore *
</ifModule>
2 changes: 2 additions & 0 deletions lib/private/Setup.php
Original file line number Diff line number Diff line change
Expand Up @@ -473,7 +473,9 @@ public static function protectDataDirectory() {
$content.= "Satisfy All\n";
$content.= "</ifModule>\n\n";
$content.= "# section for Apache 2.2 and 2.4\n";
$content.= "<ifModule mod_autoindex.c>\n";
$content.= "IndexIgnore *\n";
$content.= "</ifModule>\n";

$baseDir = \OC::$server->getConfig()->getSystemValue('datadirectory', \OC::$SERVERROOT . '/data');
file_put_contents($baseDir . '/.htaccess', $content);
Expand Down