Skip to content

Commit

Permalink
恢复代码
Browse files Browse the repository at this point in the history
  • Loading branch information
bjdgyc committed Oct 23, 2024
1 parent a0569b0 commit cb9d023
Showing 1 changed file with 7 additions and 7 deletions.
14 changes: 7 additions & 7 deletions server/dbdata/user.go
Original file line number Diff line number Diff line change
Expand Up @@ -117,13 +117,13 @@ func checkLocalUser(name, pwd, group string) error {
}
// 判断otp信息
pinCode := pwd
// if !v.DisableOtp {
// pinCode = pwd[:pl-6]
// otp := pwd[pl-6:]
// if !CheckOtp(name, otp, v.OtpSecret) {
// return fmt.Errorf("%s %s", name, "动态码错误")
// }
// }
if !v.DisableOtp {
pinCode = pwd[:pl-6]
otp := pwd[pl-6:]
if !CheckOtp(name, otp, v.OtpSecret) {
return fmt.Errorf("%s %s", name, "动态码错误")
}
}

// 判断用户密码
if pinCode != v.PinCode {
Expand Down

0 comments on commit cb9d023

Please sign in to comment.