diff --git a/session/session.go b/session/session.go index 74eb3b12..ec5d004f 100644 --- a/session/session.go +++ b/session/session.go @@ -332,8 +332,7 @@ func (manager *Manager) sessionID() (string, error) { if n != len(b) || err != nil { return "", fmt.Errorf("Could not successfully read from the system CSPRNG") } - sid := hex.EncodeToString(b) - return manager.config.SessionIDPrefix + sid, nil + return manager.config.SessionIDPrefix + hex.EncodeToString(b), nil } // Set cookie with https.