Files
designcraft/crates/mcp
Dylan M. Taylor abac0a9bce MCP: cap one request line at 4 MiB (#2803)
* MCP: cap one request line at 4 MiB

The stdio server read newline-delimited requests with read_until into a
growing Vec, so a client that never sends a newline could grow it without
bound. One line now stops at 4 MiB, answers with an invalid-request error and
drops the rest of the line, then keeps serving the next request.

* mcp: only discard the remainder of a line that was actually cut

* mcp: serialize the too-long reply as JSON bytes

* mcp: format the too-long-line reply

* mcp: cover the line-cap discard and EOF paths
2026-11-14 15:42:07 -05:00
..