diff --git a/backend/app/service/database_mysql.go b/backend/app/service/database_mysql.go index 06feef640..b93cf16a4 100644 --- a/backend/app/service/database_mysql.go +++ b/backend/app/service/database_mysql.go @@ -141,6 +141,10 @@ func (u *MysqlService) Create(ctx context.Context, req dto.MysqlDBCreate) (*mode } func (u *MysqlService) BindUser(req dto.BindUser) error { + if cmd.CheckIllegal(req.Username, req.Password, req.Permission) { + return buserr.New(constant.ErrCmdIllegal) + } + dbItem, err := mysqlRepo.Get(mysqlRepo.WithByMysqlName(req.Database), commonRepo.WithByName(req.DB)) if err != nil { return err