From: Agnibho Mondal Date: Mon, 17 May 2021 16:35:07 +0000 (+0530) Subject: Sanitized user input X-Git-Url: https://code.agnibho.com/repo?a=commitdiff_plain;h=a4faf5ed1ca328f0e1ac99fd3193c799118da463;p=simpleipd.git Sanitized user input --- 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); + } +} ?>