From 3625ab6faad7732d15218e34ee203108640dea0c Mon Sep 17 00:00:00 2001 From: andres-portainer <91705312+andres-portainer@users.noreply.github.com> Date: Fri, 30 Dec 2022 14:52:18 -0300 Subject: [PATCH] fix(rand): seed the RNG EE-4845 (#8252) --- api/cmd/portainer/main.go | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/api/cmd/portainer/main.go b/api/cmd/portainer/main.go index 52752bd59..e03896b86 100644 --- a/api/cmd/portainer/main.go +++ b/api/cmd/portainer/main.go @@ -4,10 +4,12 @@ import ( "context" "crypto/sha256" "fmt" + "math/rand" "os" "path" "strconv" "strings" + "time" libstack "github.com/portainer/docker-compose-wrapper" "github.com/portainer/docker-compose-wrapper/compose" @@ -785,6 +787,8 @@ func buildServer(flags *portainer.CLIFlags) portainer.Server { } func main() { + rand.Seed(time.Now().UnixNano()) + configureLogger() setLoggingMode("PRETTY")