fix web session ID generation

This commit is contained in:
Forrest Marshall 2019-09-16 09:45:29 -07:00 committed by Forrest Marshall
parent 28c518631a
commit 94808fdec1
2 changed files with 3 additions and 2 deletions

View file

@ -1502,7 +1502,9 @@ func (h *Handler) siteSessionGenerate(w http.ResponseWriter, r *http.Request, p
if err := httplib.ReadJSON(r, &req); err != nil {
return nil, trace.Wrap(err)
}
req.Session.ID = session.NewID()
// DELETE IN 4.2: change from session.NewLegacyID() to session.NewID().
req.Session.ID = session.NewLegacyID()
req.Session.Created = time.Now().UTC()
req.Session.LastActive = time.Now().UTC()
req.Session.Namespace = namespace

View file

@ -57,7 +57,6 @@ type SessionContext struct {
remoteClt map[string]auth.ClientI
parent *sessionCache
closers []io.Closer
tc *client.TeleportClient
}
func (c *SessionContext) AddClosers(closers ...io.Closer) {