mirror of
https://github.com/lukaszraczylo/traefikoidc.git
synced 2026-10-14 04:07:46 +00:00
R68: cache expiry TOCTOU, logout open-redirect, session max-age
This commit is contained in:
Vendored
+4
-2
@@ -179,8 +179,10 @@ func (m *MemoryCacheBackend) Get(ctx context.Context, key string) (interface{},
|
||||
value, exists, expired := shard.get(key)
|
||||
|
||||
if expired {
|
||||
// Clean up expired item
|
||||
shard.delete(key)
|
||||
// Clean up expired item. Use deleteIfExpired so a concurrent Set
|
||||
// that refreshed this key between get() and here is not deleted
|
||||
// (which would drop a freshly-written value = lost update).
|
||||
shard.deleteIfExpired(key)
|
||||
m.misses.Add(1)
|
||||
return nil, ErrCacheMiss
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user