Block attempts to access keys at an earlier stage

main
Bob Mottram 2025-05-19 11:57:48 +01:00
parent 9cbd7fe1aa
commit 50ad8aa6f2
1 changed files with 6 additions and 0 deletions

View File

@ -319,6 +319,12 @@ def daemon_http_get(self) -> None:
http_404(self, 145)
return
# keys directory should not be accessible
if self.path.startswith('/keys/'):
print('GET HTTP Attempt to get keys file ' + self.path)
http_404(self, 145)
return
# php
if self.path.endswith('.php'):
print('GET HTTP Attempt to access PHP file ' + self.path)