Block public access to .git directory (leaked GitHub PAT, same issue found on sibling sites)

This commit is contained in:
2026-07-04 16:04:05 -05:00
parent 13c0fd6e4c
commit ffebe87210
+5
View File
@@ -7,3 +7,8 @@ RewriteEngine On
RewriteRule ^db\.php$ - [F,L] RewriteRule ^db\.php$ - [F,L]
RewriteCond %{REQUEST_URI} ^/db\.php$ RewriteCond %{REQUEST_URI} ^/db\.php$
RewriteRule .* - [F,L] RewriteRule .* - [F,L]
# .git/ was found directly downloadable (leaked GitHub PAT) - same class of
# issue found and fixed on sibling sites this session.
RewriteCond %{REQUEST_URI} ^/\.git
RewriteRule .* - [F,L]