From 6e07ddc94c4dbac077f25ce60a868982e55f9c16 Mon Sep 17 00:00:00 2001 From: Xuxfff <1683793776@qq.com> Date: Wed, 12 Oct 2022 13:57:35 +0800 Subject: [PATCH 1/6] =?UTF-8?q?fix:=E4=BF=AE=E5=A4=8D=E4=BA=86=E4=BB=BB?= =?UTF-8?q?=E6=84=8F=E6=96=87=E4=BB=B6=E8=AF=BB=E5=8F=96=E6=BC=8F=E6=B4=9E?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- Download.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Download.php b/Download.php index 4ddeb4b..d59e90e 100644 --- a/Download.php +++ b/Download.php @@ -8,7 +8,7 @@ session_start(); // 修改这一行设置你的文件下载目录 // IMPORTANT: Do not delete the following conditional test -if (strpos($_GET['file'], "../") != false) { // 检查是否有 ../,防止用户构造路径,访问某个他不应该访问的目录 +if (strpos($_GET['file'], "../") !== false) { // 检查是否有 ../,防止用户构造路径,访问某个他不应该访问的目录 die("Sorry. Nothing to download."); } -- 2.17.1 From 4bf8d8d9705254285e1c2e52222314075f02a6cb Mon Sep 17 00:00:00 2001 From: Xuxfff <1683793776@qq.com> Date: Wed, 12 Oct 2022 14:05:56 +0800 Subject: [PATCH 2/6] =?UTF-8?q?fix:=E4=BF=AE=E5=A4=8D=E4=BA=86xss=E6=BC=8F?= =?UTF-8?q?=E6=B4=9E?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- Reset_password.php | 4 ++-- recover_password.php | 6 +++--- 2 files changed, 5 insertions(+), 5 deletions(-) diff --git a/Reset_password.php b/Reset_password.php index 7af1740..02a277e 100644 --- a/Reset_password.php +++ b/Reset_password.php @@ -8,8 +8,8 @@ include 'Header.php'; -$token=$_GET['token']; -$email=$_GET['email']; +$token=htmlspecialchars($_GET['token']); +$email=htmlspecialchars($_GET['email']); ?>