File tree Expand file tree Collapse file tree 2 files changed +24
-5
lines changed Expand file tree Collapse file tree 2 files changed +24
-5
lines changed Original file line number Diff line number Diff line change @@ -124,3 +124,7 @@ RedirectMatch 403 ^/main/inc/lib/javascript/bigupload/files
124
124
<IfModule mod_headers.c >
125
125
Header always set X-Content-Type-Options nosniff
126
126
</IfModule >
127
+
128
+ <Files "web.config" >
129
+ Require all denied
130
+ </Files >
Original file line number Diff line number Diff line change @@ -757,11 +757,22 @@ <h3>Apache RewriteRules</h3>
757
757
RewriteRule ^(tests|.git) - [F,L,NC]
758
758
</Directory>
759
759
760
- AddType application/font-woff .woff .woff2
761
- <IfModule mod_expires.c>
762
- ExpiresActive On
763
- ExpiresByType application/font-woff "access plus 1 month"
764
- </IfModule>
760
+ AddType application/font-woff .woff .woff2
761
+ <IfModule mod_expires.c>
762
+ ExpiresActive On
763
+ ExpiresByType application/font-woff "access plus 1 month"
764
+ </IfModule>
765
+ # Disallow direct access to /main/inc/lib/javascript/bigupload/files
766
+ RedirectMatch 403 ^/main/inc/lib/javascript/bigupload/files
767
+
768
+ # Disallow MIME sniffing to prevent XSS from unknown/incorrect file extensions
769
+ < IfModule mod_headers.c >
770
+ Header always set X-Content-Type-Options nosniff
771
+ </ IfModule >
772
+
773
+ < Files "web.config">
774
+ Require all denied
775
+ </ Files >
765
776
</ pre >
766
777
767
778
< h4 > Special note on sharing questions between courses</ h4 >
@@ -856,6 +867,10 @@ <h3>Nginx</h3>
856
867
}
857
868
location ^~ /tests/ {
858
869
deny all;
870
+ }
871
+ location ~* /web.config$ {
872
+ deny all;
873
+ return 403;
859
874
}
860
875
</ pre >
861
876
You can’t perform that action at this time.
0 commit comments