Files
mattermost/server
Alejandro García Montoro d6d2c50189 Clear session cache on OAuth token refresh (#37459)
newSessionUpdateToken removed the old session row from the DB but
did not clear the in-memory session cache. Because GetSession
returns the cached entry without querying the DB, the rotated
(old) access token remained valid for up to SessionCacheInMinutes
(default 10 min) after rotation.

Add a ClearSessionCacheForUser call after the DB removal, matching
what RevokeAccessToken already does, so the old token is rejected
immediately.

Add a regression test that verifies the old token hits the cache
before refresh and is rejected right after rotation.
2026-07-17 15:03:47 +00:00
..
2026-06-29 20:33:46 +02:00
2026-04-21 02:33:20 -07:00