From c0a487c47e731576f373f061e03015847ddb4355 Mon Sep 17 00:00:00 2001 From: kaziu687 Date: Mon, 5 Jul 2021 00:07:46 +0200 Subject: [PATCH] Fix environment variables with the same prefix being skipped unintentionally (#98) If you have two env variables (for example ONE_VARIABLE and ONE_VARIABLE_NAME) ONE_VARIABLE_NAME has prefix ONE_VARIABLE and will be skipped. Co-authored-by: Jakob --- server/server.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/server/server.go b/server/server.go index 118a5f7..08aa895 100644 --- a/server/server.go +++ b/server/server.go @@ -129,7 +129,7 @@ eloop: for k := range s.Config().EnvVars { // Don't allow any environment variables that we have already set above. for _, e := range out { - if strings.HasPrefix(e, strings.ToUpper(k)) { + if strings.HasPrefix(e, strings.ToUpper(k) + "=") { continue eloop } }