LibreChat/api/server/controllers/__tests__
Marco Beretta a0f063b1c7
🔐 fix: Fence ACL Viewers and Surface Revocation Failures When Removing Shared MCP Servers (#17506)
* fix: Fence ACL Viewers and Surface Revocation Failures When Removing Shared MCP Servers

Account erasure and server deletion now enumerate users the view ACL names
directly or through a group, so viewers without a personal OAuth token are
fenced and disconnected too. Erasure runs the OAuth teardown in strict mode,
which clears local credentials and then fails when the provider refuses a
revocation, keeping the server as the retry anchor, and holds every user's
teardown fence until the server delete commits.

* test: Type the Revocation Failure Cleanup Fixtures

* fix: Renew Retained OAuth Teardown Fences Before Deleting the Server

A teardown lease lasts 15 minutes, so a large erasure could outlive the
first fences it holds. Leases can now be renewed by their owner, and
erasure renews every retained fence right before the delete, failing
without deleting when one lapsed and another writer took it.

* fix: Report Refused MCP Revocations Without Blocking Account Erasure

A provider that refuses revocation, combined with a viewer who signs in
again between attempts, could keep an erasure failing indefinitely. The
strict teardown now throws a coded MCPOAuthRevocationError after clearing
local state and handing over its fence; server removal collects those as
refusals, logs each user and token type whose grant may remain valid, and
proceeds. Local failures (token delete, fence, ACL) still fail closed.

* fix: Annotate the Revocation Error Code for Isolated Declarations
2026-10-28 00:37:07 +01:00
..
deleteUser.spec.js 🌳 fix: Preserve Primary Files Until Secondary Cleanup Succeeds (#17228) 2026-10-23 07:00:20 +02:00
deleteUserMcpServers.spec.js 🙈 feat: Let Config Profiles Hide librechat.yaml MCP Servers and Remove Their Fields (#17327) 2026-10-22 14:10:31 +02:00
deleteUserResourceCoverage.spec.js 🗑️ fix: Route Delete-User CLI Through the Shared Account Erasure Cascade (#17033) 2026-10-14 23:53:16 +02:00
maybeUninstallOAuthMCP.spec.js 🚿 fix: Bound Chat Message IDs and Remove Backtracking (#17388) 2026-10-24 10:16:25 +02:00
mcp.servers.spec.js 🔐 fix: Fence ACL Viewers and Surface Revocation Failures When Removing Shared MCP Servers (#17506) 2026-10-28 00:37:07 +01:00
PermissionsController.spec.js 🛂 feat: Audit Resource Sharing Changes and Fail Closed on Reversible Audit Writes (#17053) 2026-10-15 00:30:16 +02:00
tools.callTool.contentFilter.spec.js ⏳ fix: Separate Temporary and General Chat Retention (#15734) 2026-09-08 11:22:54 -04:00
tools.verifyToolAuth.spec.js 🕸️ feat: Complete Keenable Web Search Provider (#15288) 2026-08-27 14:29:20 -04:00
TwoFactorController.spec.js 🔐 feat: Enforce Required Two-Factor Authentication (#14731) 2026-10-01 23:39:51 +02:00
UserController.mcpOAuth.spec.js 🚿 fix: Bound Chat Message IDs and Remove Backtracking (#17388) 2026-10-24 10:16:25 +02:00