Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Replaced vulnerable uuid library, dependency version bumps #133

Merged
merged 1 commit into from
Sep 9, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 3 additions & 2 deletions db.go
Original file line number Diff line number Diff line change
Expand Up @@ -7,13 +7,13 @@ import (
"fmt"
"sync/atomic"

uuid "github.com/gofrs/uuid"
d "github.com/ostafen/clover/v2/document"
"github.com/ostafen/clover/v2/index"
"github.com/ostafen/clover/v2/internal"
"github.com/ostafen/clover/v2/query"
"github.com/ostafen/clover/v2/store"
"github.com/ostafen/clover/v2/store/bbolt"
uuid "github.com/satori/go.uuid"
)

// Collection creation errors
Expand Down Expand Up @@ -138,7 +138,8 @@ func (db *DB) HasCollection(name string) (bool, error) {
}

func NewObjectId() string {
return uuid.NewV4().String()
objId, _ := uuid.NewV4()
return objId.String()
}

// Insert adds the supplied documents to a collection.
Expand Down
2 changes: 1 addition & 1 deletion document/document.go
Original file line number Diff line number Diff line change
Expand Up @@ -5,9 +5,9 @@ import (
"strings"
"time"

uuid "github.com/gofrs/uuid"
"github.com/ostafen/clover/v2/internal"
"github.com/ostafen/clover/v2/util"
uuid "github.com/satori/go.uuid"
)

const (
Expand Down
25 changes: 12 additions & 13 deletions go.mod
Original file line number Diff line number Diff line change
Expand Up @@ -3,22 +3,21 @@ module github.com/ostafen/clover/v2
go 1.13

require (
github.com/brianvoe/gofakeit/v6 v6.17.0
github.com/cespare/xxhash/v2 v2.1.2 // indirect
github.com/dgraph-io/badger/v3 v3.2103.2
github.com/brianvoe/gofakeit/v6 v6.23.2
github.com/cespare/xxhash/v2 v2.2.0 // indirect
github.com/dgraph-io/badger/v3 v3.2103.5
github.com/gofrs/uuid v4.4.0+incompatible
github.com/golang/glog v1.0.0 // indirect
github.com/golang/groupcache v0.0.0-20210331224755-41bb18bfe9da // indirect
github.com/golang/protobuf v1.5.2 // indirect
github.com/golang/snappy v0.0.4 // indirect
github.com/google/flatbuffers v2.0.6+incompatible // indirect
github.com/google/flatbuffers v23.5.26+incompatible // indirect
github.com/google/orderedcode v0.0.1
github.com/klauspost/compress v1.15.9 // indirect
github.com/kr/pretty v0.2.0 // indirect
github.com/satori/go.uuid v1.2.0
github.com/stretchr/testify v1.7.1
github.com/klauspost/compress v1.16.7 // indirect
github.com/kr/pretty v0.3.1 // indirect
github.com/stretchr/testify v1.8.4
github.com/vmihailenco/msgpack/v5 v5.3.5
go.etcd.io/bbolt v1.3.6
go.opencensus.io v0.23.0 // indirect
golang.org/x/net v0.0.0-20220728211354-c7608f3a8462 // indirect
google.golang.org/protobuf v1.28.1 // indirect
go.etcd.io/bbolt v1.3.7
go.opencensus.io v0.24.0 // indirect
golang.org/x/net v0.14.0 // indirect
google.golang.org/protobuf v1.31.0 // indirect
)
Loading
Loading