From d59eaa4c3441d35127bc53f258ff73b6b1ea4970 Mon Sep 17 00:00:00 2001 From: LittleJake <13583702+LittleJake@users.noreply.github.com> Date: Fri, 3 Nov 2023 21:22:24 +0800 Subject: [PATCH 1/3] Update --- application/admin/validate/LoginTokenValidate.php | 3 +-- application/common/lib/SystemMonitor.php | 1 - application/common/view/exception/common.html | 4 ++-- application/index/view/index/index.html | 9 ++++++--- application/index/view/index/info.html | 2 +- 5 files changed, 10 insertions(+), 9 deletions(-) diff --git a/application/admin/validate/LoginTokenValidate.php b/application/admin/validate/LoginTokenValidate.php index 56f96b6..d5db514 100644 --- a/application/admin/validate/LoginTokenValidate.php +++ b/application/admin/validate/LoginTokenValidate.php @@ -12,14 +12,13 @@ class LoginTokenValidate extends Validate { protected $rule = [ 'g-recaptcha-response|Captcha' => ['require', 'checkCaptcha'], - 'token|Token' => ['require', 'length' => 64, 'alphaNum', 'checkToken'], + 'token|Token' => ['require', 'alphaNum', 'checkToken'], ]; protected $message = [ 'g-recaptcha-response.require' => 'Captcha invalid.', 'token.require' => 'Token not empty.', 'token.alphaNum' => 'Wrong Token format.', - 'token.length' => 'Wrong Token format.', ]; protected function checkCaptcha($value, $rule, $data = []){ diff --git a/application/common/lib/SystemMonitor.php b/application/common/lib/SystemMonitor.php index a49afe1..f853851 100644 --- a/application/common/lib/SystemMonitor.php +++ b/application/common/lib/SystemMonitor.php @@ -23,7 +23,6 @@ static public function fetchIPInfo($ip){ if($data == null) throw new Exception("Failed to query country code"); return $data; }, 24*60*60); - Log::info($ip_without_cidr_24); } catch (Exception $e){ Log::error($e->getMessage()); diff --git a/application/common/view/exception/common.html b/application/common/view/exception/common.html index d0d201e..da04f33 100644 --- a/application/common/view/exception/common.html +++ b/application/common/view/exception/common.html @@ -81,7 +81,7 @@