From 50ad8aa6f24cafecf843e594176be916f7c337b3 Mon Sep 17 00:00:00 2001 From: Bob Mottram Date: Mon, 19 May 2025 11:57:48 +0100 Subject: [PATCH] Block attempts to access keys at an earlier stage --- daemon_get.py | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/daemon_get.py b/daemon_get.py index 8694b318f..578ff1feb 100644 --- a/daemon_get.py +++ b/daemon_get.py @@ -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)