You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
This commit was created on GitHub.com and signed with GitHub’s verified signature.
Security
One request can no longer stop tina4 serve (GHSA-q36h-qvr9-vgj4, high). The socket server parses a request in its own process before it hands it off, and an exception raised while parsing one connection's request unwound out of the accept loop and ended the server for every client. The official tina4stack/tina4-php image runs this server, so rebuild images based on it. A per-connection safety net now logs the failure without the request body, answers that connection 500, closes it and keeps serving; in a forked request child it ends the child. PHP-FPM, Apache and php -S were not affected (#392).
A query string or form body with more fields than php.ini's max_input_vars keeps the first max_input_vars fields, logs PHP's "Input variables exceeded" warning through Tina4\Log, and the request runs, as under PHP-FPM. Raise max_input_vars in php.ini to accept more (#395).
One WebSocket frame can no longer hang tina4 serve (GHSA-xwww-f5w8-v9g9, high). WebSocket::decodeFrame() read a frame's 64-bit length signed and had no size limit. It now refuses a declared length that RFC 6455 forbids or that is past TINA4_WS_MAX_FRAME_SIZE (default 1 MiB, the same setting and default as tina4-python) before it waits for the payload, and the socket server and the standalone WebSocket server log a warning and close that connection. Upgrade: an app that sends frames over 1 MiB must raise TINA4_WS_MAX_FRAME_SIZE (#397).
A raw NUL byte in a query string or application/x-www-form-urlencoded body parses like %00 on every PHP version, through the new Request::parseQueryString(), which the socket server, Request, TestClient and WebSocket::wsToken() all use. PHP 8.6 makes parse_str() throw on one, and PHP 8.2-8.5 silently dropped everything after it (#392).
The dev-admin file endpoints refuse a path holding a NUL byte. On PHP 8.2-8.5 a trailing NUL was trimmed and the endpoint read, served or deleted the file it named; on PHP 8.6 it answered 500 (#392).
Fixed
PHP 8.5 and 8.6 support. No deprecated calls are left on the framework's own paths: response headers are read with http_get_last_response_headers() where it exists (PHP 8.4+) instead of $http_response_header, the dev-admin supervisor transport no longer calls curl_close(), and the AMQP frame-end check no longer calls ord() on the empty string fread() returns at EOF (#392).
Api and AI clients: a chunked response whose chunk size is not 1-15 hex digits is refused with ApiStreamError / AIHTTPError, instead of being read as the end of the body or failing with a TypeError (#392).
The demo app bundled in the Docker image serves its pages again: / and the shop pages answered 500, /admin answered 500 instead of redirecting to /login, and an unknown product answered 500 instead of 404. The image CI gate now requires those pages to answer, not just /health (#393).
Changed
CI runs the suite on PHP 8.2, 8.5 and 8.6, the last both non-thread-safe and thread-safe, in the official php images, and a PHP deprecation on any of them fails the build (#392). From PHP 8.6 the official php:8.6-cli image is the thread-safe build; the non-thread-safe build is php:8.6-nts.