mirror of
https://github.com/danny-avila/LibreChat.git
synced 2026-09-01 03:27:01 +00:00
fix(mcp): advertise apps per-request for user connections and tear down navigated sandbox frames
User connections now advertise the io.modelcontextprotocol/ui capability using the per-request appsEnabled resolved from resolveAllowlists rather than the static base flag, so a tenant/role/user override of mcpSettings.apps is honored at capability negotiation. The sandbox proxy treats inner-frame navigation as a teardown signal: after the initial blob load, any further load means the allow-scripts app navigated its own frame, so the proxy marks it navigated, revokes the blob, removes the frame, and gates both forwarding paths on that flag. This stops proxied host responses from reaching a navigated page and stops a navigated page from relaying messages to the host.
This commit is contained in:
parent
87341c67c0
commit
1a70dce24b
2 changed files with 24 additions and 4 deletions
|
|
@ -453,7 +453,7 @@ export abstract class UserConnectionManager {
|
|||
graphTokenResolver,
|
||||
});
|
||||
const registry = MCPServersRegistry.getInstance();
|
||||
const { allowedDomains, allowedAddresses, useSSRFProtection } =
|
||||
const { allowedDomains, allowedAddresses, useSSRFProtection, appsEnabled } =
|
||||
await registry.resolveAllowlists({ userId: user?.id, role: user?.role });
|
||||
await this.assertResolvedRuntimeConfigAllowed({
|
||||
config: runtimeConfig,
|
||||
|
|
@ -472,7 +472,7 @@ export abstract class UserConnectionManager {
|
|||
useSSRFProtection,
|
||||
allowedDomains,
|
||||
allowedAddresses,
|
||||
enableApps: registry.getAppsEnabled(),
|
||||
enableApps: appsEnabled,
|
||||
ephemeralConnection,
|
||||
};
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue