Details
-
Bug
-
Resolution: Fixed
-
Minor
-
0.10
-
None
Description
Thirteen WARN sites log the reference string the agent passed when a load, existence check or render fails: MCPGetDocumentTool (about lines 649, 713, 834), MCPGetHistoryTool (824, 846), MCPGetAttachmentTool (671, 694), MCPGetSchemaTool (464), MCPQueryObjectsTool (746), MCPLinksSupport (185, 467), MCPTranslationSupport (244, 266). A reference containing a line break forges a log line, which a log reader or a log-processing tool then takes for a real entry. The same class of issue was closed in the index module by LLMAI-206 (CR/LF stripped from request-controlled names) and the MCP module already owns the helper for it: MCPTextGuards.fragment.
Expected / proposal: Route every logged agent-supplied string through MCPTextGuards.fragment (or a dedicated log-safe variant that strips CR/LF and caps the length), and add a test that a reference with a line break produces one log line. Sweep the remaining WARN sites of the module for other agent-controlled values (attachment names, class names, query strings).