mirror of
https://github.com/woodpecker-ci/woodpecker.git
synced 2025-09-03 22:00:52 +00:00
fixed token expiration calculation
This commit is contained in:
@@ -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
|
||||
|
Reference in New Issue
Block a user