chore: upgrade dependencies and secure passwords

This commit is contained in:
2026-08-10 12:53:23 +08:00
parent 1a1fa521c0
commit 581a503883
53 changed files with 298 additions and 143 deletions

View File

@@ -9,11 +9,12 @@ import (
"bsm/full/module/ec/mall/internal/excode"
"bsm/full/module/ec/mall/internal/impl"
"bsm/full/module/ec/mall/internal/models"
"bsm/full/module/ec/mall/internal/password"
pb "bsm/full/module/ec/mall/pb"
"git.apinb.com/bsm-sdk/core/crypto/encipher"
"git.apinb.com/bsm-sdk/core/errcode"
"git.apinb.com/bsm-sdk/core/printer"
"git.apinb.com/bsm-sdk/core/utils"
"git.apinb.com/bsm-sdk/core/vars"
"gorm.io/gorm"
)
@@ -37,7 +38,7 @@ func Login(ctx context.Context, in *pb.LoginRequest) (reply *pb.LoginReply, err
return nil, errcode.ErrDB
}
// 密码校验 - 使用MD5加盐验证
if record.Password != utils.Md5(in.Password+record.Salt) {
if !password.Verify(record.Password, in.Password) {
return nil, errcode.ErrPassword
}