Skip to content

Commit 408cdb4

Browse files
committed
Security: Prevent directory indexing globally (no reason to enable it for web requests) - refs BT#22085
1 parent 1d91665 commit 408cdb4

File tree

2 files changed

+10
-2
lines changed

2 files changed

+10
-2
lines changed

.htaccess

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -126,5 +126,9 @@ RedirectMatch 403 ^/main/inc/lib/javascript/bigupload/files
126126
</IfModule>
127127

128128
<Files "web.config">
129-
Require all denied
130-
</Files>
129+
Require all denied
130+
</Files>
131+
132+
<IfModule mod_autoindex.c>
133+
Options -Indexes
134+
</IfModule>

documentation/installation_guide.html

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -773,6 +773,9 @@ <h3>Apache RewriteRules</h3>
773773
<Files "web.config">
774774
Require all denied
775775
</Files>
776+
<IfModule mod_autoindex.c>
777+
Options -Indexes
778+
</IfModule>
776779
</pre>
777780

778781
<h4>Special note on sharing questions between courses</h4>
@@ -872,6 +875,7 @@ <h3>Nginx</h3>
872875
deny all;
873876
return 403;
874877
}
878+
autoindex off;
875879
</pre>
876880

877881
<h3>Apple on OS X servers</h3>

0 commit comments

Comments
 (0)