From a1953bc7acdf56533f4ec12b9775bb3a209d84fd Mon Sep 17 00:00:00 2001 From: Terence Eden Date: Sun, 18 Feb 2024 14:32:12 +0000 Subject: [PATCH] Sanitise log file names --- index.php | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/index.php b/index.php index 03cb861..87e9d0e 100644 --- a/index.php +++ b/index.php @@ -48,7 +48,8 @@ // Get the type of request - used in the log filename if ( isset( $body["type"] ) ) { - $type = " " . $body["type"]; + // Sanitise type to only include letter + $type = " " . preg_replace( '/[^a-zA-Z]/', '', $body["type"] ); } else { $type = ""; }