From a2a773d714509654d95f6b559c186db29ce1eafb Mon Sep 17 00:00:00 2001 From: slawkens Date: Mon, 5 Jul 2021 02:59:41 +0200 Subject: [PATCH] This is the actual security fix --- index.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/index.php b/index.php index 4eda1eac..a6c6bea7 100644 --- a/index.php +++ b/index.php @@ -334,7 +334,7 @@ if($load_it) } } else { $file = SYSTEM . 'pages/' . $page . '.php'; - if(!@file_exists($file)) + if(!@file_exists($file) || preg_match('/[^A-z0-9_\-]/', $page)) { $page = '404'; $file = SYSTEM . 'pages/404.php';