php-sdk/tests/Unit
Repository files (latest commit first)
Filename Latest commit message Latest commit date
Antoine Bluchet 529099f463
Merge commit from fork
processInput() appended every 8 KiB stdout chunk to $inputBuffer and only
drained it on a "\n". A spawned server that streams stdout without ever
emitting a newline grew the buffer without bound, exhausting client
memory (GHSA-6vrr-g4hw-f3hj).

Cap the buffer (default 4 MiB, configurable via the constructor). When
appending the next chunk would exceed the cap before a newline is seen,
abort the read and resolve the in-flight request with an error
immediately, so the caller fails fast instead of spinning until its
request timeout.

Based on localden's suggested fix in the advisory: makes the cap
configurable, but resolves the pending request with an error (keeping
runRequest's Response|Error contract) instead of throwing a
TransportException out of the read loop, and leaves connection teardown
to the caller. Adds regression tests.

Co-authored-by: localden <53200638+localden@users.noreply.github.com>
2026-07-27 11:16:14 +02:00
..
Capability [Server] Always emit items for array tool parameter schemas (#378) 2026-07-14 23:56:50 +02:00
Client Merge commit from fork 2026-07-27 11:16:14 +02:00
Fixtures/Enum Split testsuite for unit and inspector based tests (#82) 2025-09-25 22:27:41 +01:00
JsonRpc [Client] Add client-side elicitation support (#371) 2026-07-14 23:55:06 +02:00
Schema [Schema] Fix Implementation::fromArray rejecting falsy-but-valid name/version (#393) 2026-07-14 23:41:51 +02:00
Server [Server] Expose OAuth protected resource metadata as a reusable request handler (#391) 2026-07-15 00:24:04 +02:00
ServerTest.php Update codestyle based on updated Symfony rules (#229) 2026-02-01 11:54:31 +01:00