Skip to content
Snippets Groups Projects
Commit ca680333 authored by ale's avatar ale
Browse files

Check the deadline independently from securecookie

parent 79c42231
Branches
No related tags found
No related merge requests found
......@@ -162,6 +162,11 @@ func (l *Login) fetchOrInitSession(req *http.Request) *loginSession {
if err != nil {
return new(loginSession)
}
// Check our own Deadline anyway (for authenticated sessions), do not
// necessarily trust the securecookie.
if !session.Deadline.IsZero() && time.Now().UTC().After(session.Deadline) {
return new(loginSession)
}
return session
}
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment