From af42f2bdb0f0272c530a5a4233f2176022d3f6a2 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E6=94=BE=E7=A0=81=E8=BF=87=E6=9D=A5?= <695798354@qq.com> Date: Tue, 30 Jun 2020 10:21:34 +0800 Subject: [PATCH] =?UTF-8?q?=E4=BF=AE=E5=A4=8D=E9=AA=8C=E8=AF=81=E7=B1=BB?= =?UTF-8?q?=E6=9F=90=E4=BA=9B=E6=83=85=E5=86=B5=E4=B8=8B=E6=AD=BB=E5=BE=AA?= =?UTF-8?q?=E7=8E=AF=E5=AF=BC=E8=87=B4nginx502?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- application/common/controller/Backend.php | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/application/common/controller/Backend.php b/application/common/controller/Backend.php index 1945fd82b..743549a4d 100644 --- a/application/common/controller/Backend.php +++ b/application/common/controller/Backend.php @@ -516,8 +516,10 @@ class Backend extends Controller { $token = $this->request->post('__token__'); + $res = $this->validate(['__token__' => $token], ['token']); + //验证Token - if (!Validate::is($token, "token", ['__token__' => $token])) { + if (!$res)) { $this->error(__('Token verification error'), '', ['__token__' => $this->request->token()]); } -- Gitee