From ddba116fbf9f0c21e74465e8bcaef7cc9af4a22d Mon Sep 17 00:00:00 2001 From: bjdgyc Date: Tue, 2 Mar 2021 15:28:08 +0800 Subject: [PATCH] =?UTF-8?q?=E4=BF=AE=E5=A4=8D=E7=99=BB=E9=99=86=E5=AF=86?= =?UTF-8?q?=E7=A0=81=E5=88=A4=E6=96=ADbug?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .gitignore | 2 ++ README.md | 4 +++- server/base/app_ver.go | 2 +- server/dbdata/user.go | 5 +++-- 4 files changed, 9 insertions(+), 4 deletions(-) diff --git a/.gitignore b/.gitignore index 5f0089e..bb9bfa4 100644 --- a/.gitignore +++ b/.gitignore @@ -1,3 +1,5 @@ # Binaries for programs and plugins .idea/ anylink-deploy +ui + diff --git a/README.md b/README.md index 2aaecc8..2333538 100644 --- a/README.md +++ b/README.md @@ -34,7 +34,7 @@ AnyLink 服务端仅在CentOS 7、Ubuntu 18.04测试通过,如需要安装在 git clone https://github.com/bjdgyc/anylink.git cd anylink -sh build.sh +sh -x build.sh # 注意使用root权限运行 cd anylink-deploy @@ -42,6 +42,8 @@ sudo ./anylink -conf="conf/server.toml" # 默认管理后台访问地址 # http://host:8800 +# 默认日志文件 +# log/anylink.log ``` ## Feature diff --git a/server/base/app_ver.go b/server/base/app_ver.go index 65be4f3..8c9ea13 100644 --- a/server/base/app_ver.go +++ b/server/base/app_ver.go @@ -2,5 +2,5 @@ package base const ( APP_NAME = "AnyLink" - APP_VER = "0.1.6" + APP_VER = "0.1.7" ) diff --git a/server/dbdata/user.go b/server/dbdata/user.go index f19cb00..f020f5d 100644 --- a/server/dbdata/user.go +++ b/server/dbdata/user.go @@ -86,8 +86,9 @@ func CheckUser(name, pwd, group string) error { } // 判断otp信息 + pinCode := pwd if !v.DisableOtp { - pwd = pwd[:pl-6] + pinCode = pwd[:pl-6] otp := pwd[pl-6:] if !checkOtp(name, otp, v.OtpSecret) { return fmt.Errorf("%s %s", name, "动态码错误") @@ -95,7 +96,7 @@ func CheckUser(name, pwd, group string) error { } // 判断用户密码 - if pwd != v.PinCode { + if pinCode != v.PinCode { return fmt.Errorf("%s %s", name, "密码错误") }