Repository navigation
v3.1.0
Security
- Parser: byte-accurate
strlenpayload limit (wasmb_strlen); per-
transaction body cap (default 256 KiB); strict whitelist of forwarded
parent headers (default: accept, accept-language, content-type,
user-agent); blacklist now drops cookie, set-cookie, authorization,
x-csrf-token;$_SERVERfiltered through whitelist;parse_str
guarded against array-bomb (max 1000 fields). - Validator: combined path-traversal regex; URI re-checked after
iterativerawurldecode(defeats double-encoded%2e%2e%2f,
protocol-relative variants); per-transaction content-length guard;
recursive sub-batch SSRF guard via metadata flag. - ResponseFormatter: strips
set-cookie,authorization,proxy-auth*,
server,x-powered-byfrom sub-responses to prevent session/header
leakage through the batch envelope. - Facades: parent
Authorizationheader never propagated; new top-level
"authorization"field in each sub-request injects a per-transaction
bearer token; trace logs redactauthorization|password|token|secret| api_keyand truncate to 4 KiB; rate-limit decoding done once.
Performance
- Handler: optional
ExecutionStrategyInterface(default sequential,
BC-safe). NewFiberExecutionStrategyparallelises contiguous read-
only blocks (GET/HEAD only, write ops always serialised) via PHP
Fibers with boundedmaxConcurrency(default 8). - Parser: generator-driven transaction yielding; pre-flipped O(1) header
maps; single-pass header/cookie/server filtering. - ResponseFormatter:
BinaryFileResponsestreamed in 8190-byte chunks
(peak RAM ≈ chunk size instead of full file); pre-compiled regex/map
constants. - BatchResponse: manual loop in
getFailureCount(noarray_filter
closure allocation).
Testing
- Add
FiberVsSequentialBenchmarkTestcovering pure-CPU, blocking I/O
and cooperative I/O scenarios with deterministic assertions. - Update
LaravelTransactionExecutorTestto assertSet-Cookieis
stripped from sub-responses (new secure default).
BREAKING CHANGE: Set-Cookie headers are no longer forwarded from sub-
responses into the batch envelope; parent-request Authorization /
Cookie headers are no longer forwarded into sub-requests. Use the new
top-level "authorization" payload field per sub-request, or override
forwardedHeadersWhitelist in the facade constructor.