From a4faf5ed1ca328f0e1ac99fd3193c799118da463 Mon Sep 17 00:00:00 2001 From: Agnibho Mondal Date: Mon, 17 May 2021 22:05:07 +0530 Subject: [PATCH] Sanitized user input --- lib/require.php | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/lib/require.php b/lib/require.php index f2f5f85..f598990 100644 --- a/lib/require.php +++ b/lib/require.php @@ -15,4 +15,14 @@ if($page!="login.php" && $page!="index.php"){ exit(); } } +if(!empty($_GET)){ + foreach($_GET as $k=>$v){ + $_GET[$k]=htmlspecialchars($v); + } +} +if(!empty($_POST)){ + foreach($_POST as $k=>$v){ + $_POST[$k]=htmlspecialchars($v); + } +} ?> -- 2.39.5