LibreChat/api/server
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
..
controllers fix: Keep Elapsed Expiries Elapsed and Revoke the Superseded Session 2026-08-29 17:29:39 +00:00
middleware 🪢 feat: show Langfuse session link in shared chats (#15273) 2026-08-27 14:29:57 -04:00
routes 🔒 fix: Refresh MCP OBO Tokens From the Live OpenID Session 2026-08-29 13:40:21 +00:00
services fix: harden OBO refresh coordination 2026-08-29 13:16:56 -04:00
utils 🎟️ refactor: Require Credentials for Local Image Access by Default (#15252) 2026-08-27 09:55:27 -04:00
cleanup.js
csp.spec.js 🔣 fix: Escape SPA Language Attribute (#15248) 2026-08-26 07:37:36 -04:00
experimental.js 🪂 feat: Make Event Actor Detached Actions Durable (#15307) 2026-08-28 14:21:04 -04:00
experimental.spec.js 🧾 feat: Store Durable Event Actor Receipts (#15265) 2026-08-27 06:00:43 -04:00
index.js 🪂 feat: Make Event Actor Detached Actions Durable (#15307) 2026-08-28 14:21:04 -04:00
index.metrics.spec.js ⏱️ feat: Run Scheduled Chats Through Durable Agent Triggers (#14939) 2026-08-20 11:51:30 -04:00
index.spec.js 🦺 feat: Configurable Baseline HTTP Security Headers (#14445) 2026-08-25 08:21:39 -04:00
socialLogins.js
socialLogins.spec.js
telemetry.js
telemetry.spec.js