Skip to content

Commit

Permalink
Merge pull request #4180 from nickmango/bug/rand-gen-docsign
Browse files Browse the repository at this point in the history
Bug/Random generator
  • Loading branch information
nickmango authored Nov 20, 2023
2 parents 271f918 + 8de390b commit 53b9c5b
Showing 1 changed file with 4 additions and 3 deletions.
7 changes: 4 additions & 3 deletions cla-backend-go/v2/sign/service.go
Original file line number Diff line number Diff line change
Expand Up @@ -883,10 +883,11 @@ func (s *service) populateSignURL(ctx context.Context,
}
}

// seed the random number generator
rand.Seed(time.Now().UnixNano())
// create a new source and rand object
src := rand.NewSource(time.Now().UnixNano())
r := rand.New(src) //nolint:gosec

randomInteger := rand.Intn(1000000) //nolint:gosec
randomInteger := r.Intn(1000000) //nolint:gosec
documentID := strconv.Itoa(randomInteger)

tab := getTabsFromDocument(&document, documentID, defaultValues)
Expand Down

0 comments on commit 53b9c5b

Please sign in to comment.