Security fix for MCP

This commit is contained in:
2026-10-12 14:47:50 +02:00
parent 73eacb09c2
commit 24fa3fdcdf
6 changed files with 20 additions and 6 deletions
+5 -1
View File
@@ -190,7 +190,11 @@ export function createMcpRoute(args) {
}
return rpcResult(id, toolText(`Unknown tool: ${p.name}`, true));
} catch (err) {
return rpcResult(id, toolText(err instanceof Error ? err.message : 'Tool error', true));
// Log the real error server-side; return a GENERIC message to the
// (anonymous) caller so internal details — DB schema, host, stack —
// never leak over a public endpoint.
console.warn('[ipal] createMcpRoute: tool execution failed:', err);
return rpcResult(id, toolText('Tool execution failed.', true));
}
}
case 'tools/list':
File diff suppressed because one or more lines are too long