From aebacfccd75cf7be00bf6775f2c8cf954089ba0d Mon Sep 17 00:00:00 2001 From: Brad Rydzewski Date: Mon, 13 Apr 2015 19:11:33 -0700 Subject: [PATCH] fixed token expiration calculation --- server/session/session.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/server/session/session.go b/server/session/session.go index 6061d309..bc2e3f48 100644 --- a/server/session/session.go +++ b/server/session/session.go @@ -70,7 +70,7 @@ func (s *session) GetLogin(r *http.Request) *common.Token { return token } - if time.Now().UTC().Add(s.expire).Unix() > token.Issued { + if time.Unix(token.Issued, 0).Add(s.expire).Before(time.Now()) { return nil } return token