From bc236c16d12f41f2dcc3aad68ece31cb9c7fd36f Mon Sep 17 00:00:00 2001 From: Israel Blancas Date: Sat, 14 Oct 2023 02:23:37 +0200 Subject: [PATCH] Fix issue related to new encoding in oauth-proxy image (#2345) Signed-off-by: Israel Blancas --- pkg/util/util.go | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/pkg/util/util.go b/pkg/util/util.go index ea4970683..af04e1619 100644 --- a/pkg/util/util.go +++ b/pkg/util/util.go @@ -319,7 +319,9 @@ var seededRand = rand.New(rand.NewSource(time.Now().UnixNano())) // GenerateProxySecret generate random secret key for oauth proxy cookie. func GenerateProxySecret() string { - const secretLength = 16 + // This will be encoded as base64. We want 16 bytes so we need a secret of + // 22 characters + const secretLength = 22 b := make([]byte, secretLength) for i := range b { b[i] = charset[seededRand.Intn(len(charset))]