Skip to content

Commit

Permalink
Fix issue related to new encoding in oauth-proxy image (#2345)
Browse files Browse the repository at this point in the history
Signed-off-by: Israel Blancas <[email protected]>
  • Loading branch information
iblancasa authored Oct 14, 2023
1 parent 22288a9 commit bc236c1
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion pkg/util/util.go
Original file line number Diff line number Diff line change
Expand Up @@ -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))]
Expand Down

0 comments on commit bc236c1

Please sign in to comment.