From f3c2539e1255ed9ff6aeff89af7cb1d35d15330f Mon Sep 17 00:00:00 2001 From: James Elliott Date: Fri, 8 Oct 2021 12:34:43 +1100 Subject: [PATCH] fix(session): session id generator situational panic (#2471) * fix(session): replace session id generator This replaces the fasthttp session generator with a more generic one. --- internal/session/provider_config.go | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/internal/session/provider_config.go b/internal/session/provider_config.go index 70ec4621a..24d9cd727 100644 --- a/internal/session/provider_config.go +++ b/internal/session/provider_config.go @@ -19,6 +19,10 @@ import ( func NewProviderConfig(configuration schema.SessionConfiguration, certPool *x509.CertPool) ProviderConfig { config := session.NewDefaultConfig() + config.SessionIDGeneratorFunc = func() []byte { + return []byte(utils.RandomString(30, utils.AlphaNumericCharacters)) + } + // Override the cookie name. config.CookieName = configuration.Name