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

@@ -6,6 +6,7 @@ import (
"bsm/full/module/ec/market/internal/impl"
"bsm/full/module/ec/market/internal/models"
"bsm/full/module/ec/market/internal/password"
pb "bsm/full/module/ec/market/pb"
"git.apinb.com/bsm-sdk/core/errcode"
@@ -23,15 +24,17 @@ func Create(ctx context.Context, in *pb.MarketSupplyItem) (reply *pb.IdentitySta
if in.GetName() == "" {
return nil, errcode.ErrInvalidArgument
}
salt := utils.RandomString(8)
passwordHash, err := password.Hash(in.GetPassword())
if err != nil {
return nil, err
}
mktModel := &models.MarketSupply{
Std_IICUDS: types.Std_IICUDS{Identity: utils.ULID(), Status: 1},
Name: in.GetName(),
// Avatar: in.GetAvatar(),
Account: in.GetAccount(),
Phone: in.GetPhone(),
Password: utils.Md5(in.Password + salt),
Salt: salt,
Password: passwordHash,
OrgName: in.GetOrgName(),
Remark: in.GetRemark(),
CommissionRate: in.GetCommissionRate(),