1
0
mirror of https://github.com/astaxie/beego.git synced 2024-11-22 11:40:55 +00:00

add sessionId prefix

This commit is contained in:
SongLiang 2018-11-05 09:51:27 +08:00 committed by GitHub
parent 501d8a97f6
commit c8da875f83
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

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