util: Fix session token expiration check #1230

Merged
fyrchik merged 1 commit from aarifullin/frostfs-node:fix/1229-sessiontok_exp into master 2024-07-08 08:15:59 +00:00

View file

@ -67,7 +67,7 @@ func (s *KeyStorage) GetKey(info *SessionInfo) (*ecdsa.PrivateKey, error) {
pToken := s.tokenStore.Get(info.Owner, binID)
if pToken != nil {
if pToken.ExpiredAt() <= s.networkState.CurrentEpoch() {
if pToken.ExpiredAt() < s.networkState.CurrentEpoch() {
return nil, new(apistatus.SessionTokenExpired)
}
return pToken.SessionKey(), nil