From c8da875f833bfc82e4aaa81a4c2dd9ade9106f67 Mon Sep 17 00:00:00 2001 From: SongLiang <462039091@qq.com> Date: Mon, 5 Nov 2018 09:51:27 +0800 Subject: [PATCH] add sessionId prefix --- session/session.go | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) 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.