LibreChat/api/server/controllers
Claude cb26a6f7d2
fix: Keep Elapsed Expiries Elapsed and Revoke the Superseded Session
Two of the five findings from the Codex pass on fcdc15885 — the two that are
defects in code this branch introduced rather than design questions about the
bridge.

`getSkewedTokenExpiresAtMs` floored every result at a second in the future,
including an expiry the provider had already declared elapsed. An exchange
answering `expires_in: 0` or a past `expires_at` was handed to the MCP
connection stamped valid for another second, which only moves the failure
downstream. The floor now applies to a lifetime that is still live, which is
what it was for; an elapsed one stays elapsed so the caller rejects it. Same
for the cache TTL, which falls back to the elapsed-credential floor.

Bridge recovery left the stale token's durable Session behind. Only the token
it recovered through was passed as `existingRefreshToken`, so that one's
session was replaced while the token the browser actually presented kept its
record until its original expiry. That record, with the marker cookie still
bound to it, is what authorizes local image access for OpenID users — so a
copy of the stale cookie outlived the rotation it had lost. Revoked
explicitly on successful recovery.

Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01SxKWxwqxAGckYpRsYTqx3F
2026-08-29 17:29:39 +00:00
..
__tests__ 🕸️ feat: Complete Keenable Web Search Provider (#15288) 2026-08-27 14:29:20 -04:00
agents 🎠 refactor: Route Every Event Actor Turn Through One Lifecycle (#15325) 2026-08-28 17:30:23 -04:00
assistants fix: harden OBO refresh coordination 2026-08-29 13:16:56 -04:00
auth 🔒 fix: Refresh MCP OBO Tokens From the Live OpenID Session 2026-08-29 13:40:21 +00:00
AuthController.js fix: Keep Elapsed Expiries Elapsed and Revoke the Superseded Session 2026-08-29 17:29:39 +00:00
AuthController.spec.js fix: Keep Elapsed Expiries Elapsed and Revoke the Superseded Session 2026-08-29 17:29:39 +00:00
avatar.contentFilter.spec.js 🛂 feat: Filter Model-Bound Content by Source (#14425) 2026-08-21 22:43:32 -04:00
Balance.js
Balance.spec.js
EndpointController.js
FavoritesController.js
FavoritesController.spec.js
mcp.js ✂️ fix: Strip Redundant Server-Name Prefixes from MCP Tool Keys (#14732) 2026-08-21 14:30:29 -04:00
ModelController.js perf: Reduce Agent Chat Startup Latency (#14423) 2026-07-25 07:58:20 -04:00
ModelController.spec.js perf: Reduce Agent Chat Startup Latency (#14423) 2026-07-25 07:58:20 -04:00
PermissionsController.js
PluginController.js
PluginController.spec.js
SkillStatesController.js
TokenConfigController.js
tools.js 🕸️ feat: Complete Keenable Web Search Provider (#15288) 2026-08-27 14:29:20 -04:00
TwoFactorController.js
UserController.js 🕸️ feat: Complete Keenable Web Search Provider (#15288) 2026-08-27 14:29:20 -04:00
UserController.spec.js 🕸️ feat: Complete Keenable Web Search Provider (#15288) 2026-08-27 14:29:20 -04:00