mirror of
https://github.com/bjdgyc/anylink.git
synced 2025-08-24 23:19:13 +08:00
修复登陆密码判断bug
This commit is contained in:
2
.gitignore
vendored
2
.gitignore
vendored
@@ -1,3 +1,5 @@
|
||||
# Binaries for programs and plugins
|
||||
.idea/
|
||||
anylink-deploy
|
||||
ui
|
||||
|
||||
|
@@ -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
|
||||
|
@@ -2,5 +2,5 @@ package base
|
||||
|
||||
const (
|
||||
APP_NAME = "AnyLink"
|
||||
APP_VER = "0.1.6"
|
||||
APP_VER = "0.1.7"
|
||||
)
|
||||
|
@@ -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, "密码错误")
|
||||
}
|
||||
|
||||
|
Reference in New Issue
Block a user