From 6534827c4e25d193393c68b0bb6732f7f8faeb62 Mon Sep 17 00:00:00 2001 From: taoser Date: Wed, 9 Dec 2020 14:17:52 +0800 Subject: [PATCH] =?UTF-8?q?=E7=BD=91=E7=AB=99=E9=85=8D=E7=BD=AE?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- app/middleware/LoginCookie.php | 3 ++- config/taoler.php | 2 +- 2 files changed, 3 insertions(+), 2 deletions(-) diff --git a/app/middleware/LoginCookie.php b/app/middleware/LoginCookie.php index 654b956..31dfc52 100644 --- a/app/middleware/LoginCookie.php +++ b/app/middleware/LoginCookie.php @@ -4,6 +4,7 @@ namespace app\middleware; use think\facade\Session; use think\facade\Cookie; use think\facade\Db; +use think\facade\Config; class LoginCookie { @@ -18,7 +19,7 @@ class LoginCookie $user = Db::name('user')->where('id',$userId)->find(); if($user){ //验证cookie - $salt = 'taoler'; + $salt = Config::get('taoler.salt'); $auth = md5($user['name'].$salt).":".$userId; if($auth==$cooAuth){ Session::set('user_name',$user['name']); diff --git a/config/taoler.php b/config/taoler.php index 5f616b4..dd39b68 100644 --- a/config/taoler.php +++ b/config/taoler.php @@ -5,6 +5,6 @@ return [ //版本配置 - 'version' => '1.6.3', + 'version' => '1.6.4', 'salt' => 'taoler' ]; \ No newline at end of file