mirror of
https://github.com/myronblair/orbis-hosting-portal
synced 2026-07-28 13:13:30 -05:00
Block public access to .git directory (leaked live GitHub PAT)
The docRoot is the git working tree, so .git/ was directly downloadable over HTTPS (curl https://orbis.orbishosting.com/.git/config returned 200), exposing the origin remote URL with an embedded GitHub personal access token in plaintext. Added a .htaccess denying dotfiles/.git and a matching OpenLiteSpeed vhost context as defense in depth. The exposed token should be revoked/rotated on GitHub regardless of this fix.
This commit is contained in:
@@ -62,6 +62,11 @@ rewrite {
|
||||
autoLoadHtaccess 1
|
||||
}
|
||||
|
||||
context /.git {
|
||||
location /dev/null
|
||||
allowBrowse 0
|
||||
}
|
||||
|
||||
context /.well-known/acme-challenge {
|
||||
location /usr/local/lsws/Example/html/.well-known/acme-challenge
|
||||
allowBrowse 1
|
||||
|
||||
Reference in New Issue
Block a user