Skip to content

Commit d1eaa3f

Browse files
committed
blacklist token freeze
1 parent d0e693a commit d1eaa3f

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

internal/db/sessions/sessions.go

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -39,7 +39,8 @@ func (ss SessionsStore) IsTokenBlacklisted(signature []byte) (bool, error) {
3939
if timeRaw == nil {
4040
return nil
4141
}
42-
blacklisted = true
42+
t := time.Unix(int64(binary.LittleEndian.Uint64(timeRaw)), 0)
43+
blacklisted = t.After(t.Add(time.Minute)) // Freeze for 1 minute for all async requests
4344
return nil
4445
})
4546
return blacklisted, err

0 commit comments

Comments
 (0)