LibreChat/packages
Claude 32d5986923
fix: Reject placeholder-bearing admin keys from shared backfill
Codex round three P1, verified end-to-end before fixing: processMCPEnv
injects an admin `apiKey.key` into the request headers (env.ts:448)
BEFORE header values get per-user placeholder resolution (env.ts:478),
so a key like `{{LIBRECHAT_OPENID_ACCESS_TOKEN}}` makes the connection
identity-scoped — while `placeholderBearingFields` never inspects
`apiKey.key` and the gate rejected only `source: 'user'`. Instructions
fetched under one user's identity could then be stored for everyone.

The gate now scans the admin key value with the same runtime-placeholder
predicate. Kept narrow deliberately: widening
`placeholderBearingFields` itself would change
`requiresUserScopedConnection` for every caller — connection pooling
included — which is its own decision.

Static admin keys still backfill (positive control test); both new
refusal tests verified red without the gate change. Suite 39/39.

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01SxKWxwqxAGckYpRsYTqx3F
2026-08-30 19:32:21 +00:00
..
api fix: Reject placeholder-bearing admin keys from shared backfill 2026-08-30 19:32:21 +00:00
client 🖼️ refactor: Consolidate Provider Icons Into a Single Registry (#15148) 2026-08-24 13:00:38 -04:00
data-provider 📬 feat: Establish Background Continuation Admission (#15348) 2026-08-30 06:51:36 -04:00
data-schemas 🛄 feat: Restore Compaction Guidance Across Continuations (#15356) 2026-08-30 08:13:24 -04:00